In the middle of developing a large MonoTouch app, I started getting the
"The compiler appears to have crashed" error.  This was frustrating because
it gave no indication as to where in my code the issue was, and it still
crashed even after undoing my recent changes.

 

After spending considerable time ripping code out of the project, I was able
to make a short repro:  (it's a large project at over 400k lines, so don't
ask how long it took to narrow it down to this J)

 

struct SomeStruct1

{

       SomeStruct2 One;

       SomeStruct2 Two;

}

struct SomeStruct2

{

}

class SomeClass

{

       SomeStruct1? foo;

}

 

I hope you guys can provide me work a work-around to this ASAP, as I'm
currently out of commission until I can get my project to build.

 

All components are up-to-date with the "stable" channel.  "smcs --version"
gives 2.10.7.0. 

 

Here are the complete repro steps:

 

1.       Make a new iPhone project (I used the "Empty Project" template)

2.       Paste the code above into Main.cs

3.       Build, and you'll get the following error:  (full build output
visible at http://pastebin.com/CMRBkkB4 )

 

* Assertion at ../../../../../mono/mono/metadata/class.c:1740, condition
`class->image->dynamic || field->offset > 0' not met
at (wrapper managed-to-native)
System.Reflection.Emit.TypeBuilder.create_runtime_class
(System.Reflection.Emit.TypeBuilder,System.Reflection.Emit.TypeBuilder)
<0xffffffff>

1.    at System.Reflection.Emit.TypeBuilder.CreateType () <0x0039f>

2.    at Mono.CSharp.TypeContainer.CloseType () <0x0019b>

3.    at Mono.CSharp.ModuleContainer.CloseType () <0x00080>

4.    at Mono.CSharp.Driver.Compile () <0x0047e>

5.    at Mono.CSharp.Driver.Main (string[]) <0x000af>

6.    at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object
(object,intptr,intptr,intptr) <0xffffffff>

 

 

Any help is greatly appreciated!

 

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to