[Mono-bugs] [Bug 78717][Wis] New - Unhandled Compiler Exception

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jun 27 13:21:17 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by rmt512 at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=78717

--- shadow/78717	2006-06-27 13:21:17.000000000 -0400
+++ shadow/78717.tmp.14647	2006-06-27 13:21:17.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 78717
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: ubuntu dapper
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: rmt512 at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unhandled Compiler Exception
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+public IEnumerable GameIDs()
+{
+using (IDbConnection dbcon =
+ProviderFactory.CreateConnectionFromConfig("PgConnStr")) {
+	dbcon.Open();
+	IDbCommand dbcmd = null; 	
+	using (dbcmd = dbcon.CreateCommand()) {
+	dbcmd.CommandText = "select id from instance where startup = 1";
+	using (IDataReader reader = dbcmd.ExecuteReader()) {
+       		while (reader.Read()) 
+       			yield return reader["id"] ;
+	}
+	}
+       }
+      }
+
+
+Compilation fails with Exception
+
+Unhandled Exception: System.Exception: Trying to emit a local from a
+different ILGenerator.
+in <0x005e7> System.Reflection.Emit.ILGenerator:Emit (OpCode opcode,
+System.Reflection.Emit.LocalBuilder lbuilder)
+in <0x000a4> Mono.CSharp.Using:EmitExpressionFinally
+(Mono.CSharp.EmitContext ec)
+in <0x00060> Mono.CSharp.Using:EmitFinally (Mono.CSharp.EmitContext ec)
+in <0x001bd> Mono.CSharp.Iterator:EmitDispose (Mono.CSharp.EmitContext ec)
+in <0x00013> Mono.CSharp.Iterator+DisposeMethod:DoEmit
+(Mono.CSharp.EmitContext ec)
+in <0x00024> Mono.CSharp.Statement:Emit (Mono.CSharp.EmitContext ec)
+in <0x000a8> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext ec)
+in <0x00268> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext ec)
+in <0x0001b> Mono.CSharp.EmitContext:EmitResolvedTopBlock
+(Mono.CSharp.ToplevelBlock block, Boolean unreachable)
+in <0x0007e> Mono.CSharp.EmitContext:EmitTopBlock (IMethodData md,
+Mono.CSharp.ToplevelBlock block)
+in <0x001ab> Mono.CSharp.MethodData:Emit (Mono.CSharp.TypeContainer
+container, Mono.CSharp.Attributable kind)
+in <0x00030> Mono.CSharp.Method:Emit ()
+in <0x0064d> Mono.CSharp.TypeContainer:EmitType ()
+in <0x012a5> Mono.CSharp.TypeContainer:EmitType ()
+in <0x00226> Mono.CSharp.RootContext:EmitCode ()
+in <0x00ae4> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00041> Mono.CSharp.Driver:Main (System.String[] args)


More information about the mono-bugs mailing list