[Mono-bugs] [Bug 669581] New: [GMCS/DMCS] Internal compiler error.. exception caught while emitting MethodBuilder while compiling against Common.Logging.dll 2.0

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 4 10:39:59 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=669581

https://bugzilla.novell.com/show_bug.cgi?id=669581#c0


           Summary: [GMCS/DMCS] Internal compiler error..  exception
                    caught while emitting MethodBuilder while compiling
                    against Common.Logging.dll 2.0
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.10.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: pruiz at netway.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=412309)
 --> (http://bugzilla.novell.com/attachment.cgi?id=412309)
Issue desmotration code.

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10

The code attached as test sample which links against Common.Logging.dll 2.0
fails, while compiling against Common.Logging.dll 1.2.0 works fine.

Looks like some kind of dependency solving problem, as one of the referenced
assemblies (NServiceBus.Core.dll) was compiled against Common.Logging.dll
1.2.0.. However, CL 2.0 is binary compatible with 1.2, so it is supposed to
work, and in fact, on MS side, compilation works against both libraries without
and problem.

The actual compiler error is:

Internal compiler error at test.cs(20,21):: exception caught while emitting
MethodBuilder [TestClass::SomeMethod]
Invalid type NServiceBus.Utils.WorkerThread[] for instance field
System.Collections.Generic.List`1[NServiceBus.Utils.WorkerThread]:_items

Unhandled Exception: System.ArgumentException: The handle is invalid.
  at System.Reflection.MethodBase.GetMethodFromIntPtr (IntPtr handle, IntPtr
declaringType) [0x00000] in <filename unknown>:0
  at System.Reflection.MethodBase.GetMethodFromHandle (RuntimeMethodHandle
handle, RuntimeTypeHandle declaringType) [0x00000] in <filename unknown>:0
  at Mono.CSharp.MethodSpec.GetMetaInfo () [0x00000] in <filename unknown>:0
  at Mono.CSharp.EmitContext.Emit (OpCode opcode, Mono.CSharp.MethodSpec
method) [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


Reproducible: Always

Steps to Reproduce:
1. Download attached test case ;)
2. Decompress..
3. Execute ./run.sh
4. See compiler error..
Actual Results:  
Compilation fails..

Expected Results:  
Code compiled ok.

I've tested it on mono 2.8.2/linux and 2.10-preview/win32, failing in both
cases.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list