Bug 7963 - Compile dies while building
Summary: Compile dies while building
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-10-24 07:02 UTC by Paul Johnson
Modified: 2012-10-29 15:26 UTC (History)
2 users (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 FIXED

Description Paul Johnson 2012-10-24 07:02:14 UTC
I'm building my app using monotouch 6.0.4 and have had this come through twice

Unhandled Exception:
0   mono                                0x000df50b mono + 910603
1   mono                                0x000dff50 mono + 913232
2   mono                                0x000e0775 mono + 915317
3   mono                                0x000e1641 mono + 919105
4   mono                                0x001509ed mono + 1374701
5   ???                                 0x00500f8f 0x0 + 5246863
at Mono.CSharp.InflatedTypeSpec.CreateMetaInfo (Mono.CSharp.TypeParameterMutator) <0x00279>
at Mono.CSharp.InflatedTypeSpec.GetMetaInfo () <0x0001c>
at Mono.CSharp.Field.Define () <0x00111>
at Mono.CSharp.AnonymousMethodBody.Emit (Mono.CSharp.EmitContext) <0x001f8>
at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext) <0x0002d>
at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext,bool) <0x000a1>
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext,Mono.CSharp.Expression,Mono.CSharp.MethodSpec,Mono.CSharp.Arguments,Mono.CSharp.Location,bool,bool) <0x00589>
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext,Mono.CSharp.Expression,Mono.CSharp.MethodSpec,Mono.CSharp.Arguments,Mono.CSharp.Location) <0x00024>
at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext,Mono.CSharp.Arguments) <0x0002c>
at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext) <0x00020>
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext,Mono.CSharp.Expression,Mono.CSharp.MethodSpec,Mono.CSharp.Arguments,Mono.CSharp.Location,bool,bool) <0x00499>
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext,Mono.CSharp.Expression,Mono.CSharp.MethodSpec,Mono.CSharp.Arguments,Mono.CSharp.Location) <0x00024>
at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext,Mono.CSharp.Arguments) <0x0002c>
at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext) <0x00020>
at Mono.CSharp.Invocation.EmitStatement (Mono.CSharp.EmitContext) <0x00019>
at Mono.CSharp.StatementExpression.DoEmit (Mono.CSharp.EmitContext) <0x00018>
at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext) <0x0003a>
at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext) <0x00035>
at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext) <0x00049>
at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext) <0x000d0>
at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext) <0x00060>
at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace) <0x001f7>
at Mono.CSharp.MethodOrOperator.Emit () <0x002c4>
at Mono.CSharp.Method.Emit () <0x00248>
at Mono.CSharp.TypeContainer.EmitType () <0x00605>
at Mono.CSharp.ModuleContainer.Emit () <0x001c0>
at Mono.CSharp.AssemblyDefinition.Emit () <0x00124>
at Mono.CSharp.Driver.Compile () <0x00434>
at Mono.CSharp.Driver.Main (string[]) <0x000b0>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00096>
36  mono                                0x00010a9f mono + 64159
37  mono                                0x002259da mono + 2247130
38  mono                                0x0022857c mono + 2258300
39  mono                                0x002277e1 mono + 2254817
40  mono                                0x000acc0f mono + 703503
41  mono                                0x000ace60 mono + 704096
42  mono                                0x000af2cf mono + 713423
43  mono                                0x00001ea4 mono + 3748
44  mono                                0x00001f38 mono + 3896
45  mono                                0x00001c55 mono + 3157

[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null.
Parameter name: typeArguments
  at System.Type.MakeGenericType (System.Type[] typeArguments) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.InflatedTypeSpec.CreateMetaInfo (Mono.CSharp.TypeParameterMutator mutator) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.InflatedTypeSpec.GetMetaInfo () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Field.Define () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.AnonymousMethodBody.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Arguments arguments) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Arguments arguments) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitStatement (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StatementExpression.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace parent) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MethodOrOperator.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Method.Emit () [0x00000] in <filename unknown>:0 
Build complete -- 1 error, 136 warnings


It seems to die on when trying to build Threading.Tasks.Factory code

The snippet which seems to be causing the problem is this

System.Threading.Tasks.TaskFactory m;
m.StartNew (() => delegate {
				NSUrl url = NSUrl.FromFilename (Path.Combine (docsPath, "blank.html"));
				NSUrlRequest urlRequest = new NSUrlRequest (url, NSUrlRequestCachePolicy.ReloadIgnoringCacheData, 3d);
				webView.LoadRequest (urlRequest);
			}).ContinueWith (task => delegate {
				NSUrl url2 = NSUrl.FromFilename (filename);
				NSUrlRequest urlRequest2 = new NSUrlRequest (url2, NSUrlRequestCachePolicy.ReloadIgnoringCacheData, 3d);
				webView.LoadRequest (urlRequest2);
			});

I'm using mountain lion (10.8.2) on a mac mini
Comment 1 Marek Safar 2012-10-29 13:02:25 UTC
Already fixed in Mono 3.0
Comment 2 Paul Johnson 2012-10-29 14:33:39 UTC
Mono 3.0? I'm using monotouch 6.0.4, monodevelop 3.0.4.7 with mono 2.10.9.

Am I missing something somewhere?
Comment 3 Marek Safar 2012-10-29 15:26:51 UTC
That's core component for next major monotouch upgrade. You can workaround the issue by not using double delegate () => delegate { ... } but just simple delegate () => { ... }