Bug 15385 - Compiler crash due to invocation on main thread
Summary: Compiler crash due to invocation on main thread
Status: RESOLVED NORESPONSE
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-10-14 14:01 UTC by Allie Miller
Modified: 2014-01-31 06:10 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Allie Miller 2013-10-14 14:01:11 UTC
The following crash occurs:
Unhandled Exception:
Mono.CSharp.InternalErrorException:
/devl/svn/AgDNA_IOS_APP/branches/AgDNA_GoldmanChanges/AgDNA/Utility.cs(2897,31):
---> System.NullReferenceException: Object reference not set to an instance
of an object
at Mono.CSharp.OverloadResolver.VerifyArguments
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& args,
Mono.CSharp.MemberSpec member, IParametersMember pm, Boolean
chose_params_expanded) [0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.ReportOverloadError
(Mono.CSharp.ResolveContext rc, Mono.CSharp.MemberSpec best_candidate,
IParametersMember pm, Mono.CSharp.Arguments args, Boolean params_expanded)
[0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.ResolveMember[MethodSpec]
(Mono.CSharp.ResolveContext rc, Mono.CSharp.Arguments& args) [0x00000] in
<filename unknown>:0
at Mono.CSharp.MethodGroupExpr.OverloadResolve
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& args, IErrorHandler
cerrors, Restrictions restr) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.ResolveContext
ec) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec)
[0x00000] in <filename unknown>:0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.CSharp.AnonymousMethodExpression.Compatible
(Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeSpec type) [0x00000] in
<filename unknown>:0
at Mono.CSharp.AnonymousMethodExpression.ImplicitStandardConversionExists
(Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeSpec delegate_type)
[0x00000] in <filename unknown>:0
at Mono.CSharp.Convert.ImplicitConversionExists
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression expr,
Mono.CSharp.TypeSpec target_type) [0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.IsArgumentCompatible
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Argument argument, Modifier
param_mod, Mono.CSharp.TypeSpec parameter) [0x00000] in <filename
unknown>:0
at Mono.CSharp.OverloadResolver.IsApplicable (Mono.CSharp.ResolveContext
ec, Mono.CSharp.Arguments& arguments, Int32 arg_count,
Mono.CSharp.MemberSpec& candidate, IParametersMember pm, System.Boolean&
params_expanded_form, System.Boolean& dynamicArgument,
Mono.CSharp.TypeSpec& returnType) [0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.ResolveMember[MethodSpec]
(Mono.CSharp.ResolveContext rc, Mono.CSharp.Arguments& args) [0x00000] in
<filename unknown>:0
at Mono.CSharp.MethodGroupExpr.OverloadResolve
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& args, IErrorHandler
cerrors, Restrictions restr) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.ResolveContext
ec) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec)
[0x00000] in <filename unknown>:0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException:
/devl/svn/AgDNA_IOS_APP/branches/AgDNA_GoldmanChanges/AgDNA/Utility.cs(2897,31):
---> System.NullReferenceException: Object reference not set to an instance
of an object
at Mono.CSharp.OverloadResolver.VerifyArguments
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& args,
Mono.CSharp.MemberSpec member, IParametersMember pm, Boolean
chose_params_expanded) [0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.ReportOverloadError
(Mono.CSharp.ResolveContext rc, Mono.CSharp.MemberSpec best_candidate,
IParametersMember pm, Mono.CSharp.Arguments args, Boolean params_expanded)
[0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.ResolveMember[MethodSpec]
(Mono.CSharp.ResolveContext rc, Mono.CSharp.Arguments& args) [0x00000] in
<filename unknown>:0
at Mono.CSharp.MethodGroupExpr.OverloadResolve
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& args, IErrorHandler
cerrors, Restrictions restr) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.ResolveContext
ec) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec)
[0x00000] in <filename unknown>:0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.CSharp.AnonymousMethodExpression.Compatible
(Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeSpec type) [0x00000] in
<filename unknown>:0
at Mono.CSharp.AnonymousMethodExpression.ImplicitStandardConversionExists
(Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeSpec delegate_type)
[0x00000] in <filename unknown>:0
at Mono.CSharp.Convert.ImplicitConversionExists
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression expr,
Mono.CSharp.TypeSpec target_type) [0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.IsArgumentCompatible
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Argument argument, Modifier
param_mod, Mono.CSharp.TypeSpec parameter) [0x00000] in <filename
unknown>:0
at Mono.CSharp.OverloadResolver.IsApplicable (Mono.CSharp.ResolveContext
ec, Mono.CSharp.Arguments& arguments, Int32 arg_count,
Mono.CSharp.MemberSpec& candidate, IParametersMember pm, System.Boolean&
params_expanded_form, System.Boolean& dynamicArgument,
Mono.CSharp.TypeSpec& returnType) [0x00000] in <filename unknown>:0
at Mono.CSharp.OverloadResolver.ResolveMember[MethodSpec]
(Mono.CSharp.ResolveContext rc, Mono.CSharp.Arguments& args) [0x00000] in
<filename unknown>:0
at Mono.CSharp.MethodGroupExpr.OverloadResolve
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& args, IErrorHandler
cerrors, Restrictions restr) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.ResolveContext
ec) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec)
[0x00000] in <filename unknown>:0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0

The problem is in a static class in a property setter that Invokes something on the main thread.

When the compiler encounters the invocation to the main thread the problem arises and crashes.

The compiler should have reported an error of a missing method. This could be reproduced by simply calling this invokeOnMainThread and inside that block have a missing method. In this case, both the property and the missing method were static. 


Version Information:
=== Xamarin Studio ===

Version 4.0.13 (build 38)
Installation UUID: cfe5d70c-4ba2-4530-ae98-682ddad589d6
Runtime:
Mono 3.2.3 ((no/8d3b4b7)
GTK+ 2.24.20 theme: Raleigh
GTK# (2.12.0.0)
Package version: 302030000

=== Apple Developer Tools ===

Xcode 5.0 (3332.25)
Build 5A1413

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.8.3 (Starter Edition)
Android SDK:
/Users/INSERTNAMEHERE/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

=== Xamarin.iOS ===

Version: 7.0.2.7 (Business Edition)
Hash: 57edee2
Branch:
Build date: 2013-04-10 18:05:51-0400

=== Build Information ===

Release ID: 400130038
Git revision: 07afec667f7be5d0ee511eb7115bbac6377fbae8
Build date: 2013-09-24 08:53:29+0000
Xamarin addins: 61140345a5b109633a94409edcbc7a4c19a425c6

=== Operating System ===

Mac OS X 10.8.5
Darwin xxx.home 12.5.0 Darwin Kernel Version 12.5.0
Mon Jul 29 16:33:49 PDT 2013
root:xnu-2050.48.11~1/RELEASE_X86_64 x86_64
Comment 1 Marek Safar 2013-10-14 14:32:51 UTC
Would need some kind of repro for the crash
Comment 4 Marek Safar 2014-01-31 06:10:23 UTC
No response