[Mono-dev] gmcs compiler error

Robert Vesse rvesse at vdesign-studios.com
Thu Dec 3 15:56:55 EST 2009


Hi

 

I've tried to compile my code using gmcs and I get the following epic stack
trace failure, but I don't really know why I get this error or how I'd go
about resolving it?  Can anyone make sense of this for me?

 

Exception caught by the compiler while emitting:

   Block that caused the problem begin at: .\HashTable.cs(348,9):

System.NullReferenceException: Object reference not set to an instance of an
object

Internal compiler error at .\HashTable.cs(347,49):: exception caught while
emitting MethodBuilder
[HashTable`2::System.Collections.Generic.IEnumerable<TValue>.GetEnumerator]

 

Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object   

at Mono.CSharp.AnonymousMethodBody.DoCreateMethodHost
(Mono.CSharp.EmitContext ec) [0x00000]   

at Mono.CSharp.AnonymousMethodBody.Emit (Mono.CSharp.EmitContext ec)
[0x00000]    

at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000]   

at Mono.CSharp.Invocation.EmitArguments (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, Boolean dup_args,
Mono.CSharp.LocalTemporary this_arg) [0x00000]    

at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
method, System.Collections.ArrayList Arguments, Location loc, Boolean
dup_args, Boolean omit_args) [0x00000] 

at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
method, System.Collections.ArrayList Arguments, Location loc) [0x00000] 

at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments) [0x00000]    

at Mono.CSharp.ExtensionMethodGroupExpr.EmitCall (Mono.CSharp.EmitContext
ec, System.Collections.ArrayList arguments) [0x00000]

at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] 

at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
method, System.Collections.ArrayList Arguments, Location loc, Boolean
dup_args, Boolean omit_args) [0x00000]

at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
method, System.Collections.ArrayList Arguments, Location loc) [0x00000]

at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments) [0x00000]

at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] 

at Mono.CSharp.Return.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]

at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000]

at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]

at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000]

at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000]

at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000]

at Mono.CSharp.EmitContext.EmitResolvedTopBlock (Mono.CSharp.ToplevelBlock
block, Boolean unreachable) [0x00000]

at Mono.CSharp.EmitContext.EmitTopBlock (IMethodData md,
Mono.CSharp.ToplevelBlock block) [0x00000] 

 

 

My only thought is that the class in question defines itself as being
IEnumerable over two different types and that since this is the second of
the two definitions of GetEnumerator the compiler fails?  Is this something
that I can't do under Mono?

 

Thanks,

Rob Vesse

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091203/c89feba5/attachment-0001.html 


More information about the Mono-devel-list mailing list