[Mono-bugs] [Bug 69592][Blo] New - NullReferenceException at System.Reflection.Emit.ModuleBuilder.Save() on Windows

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 16 Nov 2004 21:08:38 -0500 (EST)


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 atsushi@ximian.com.

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

--- shadow/69592	2004-11-16 21:08:38.000000000 -0500
+++ shadow/69592.tmp.5280	2004-11-16 21:08:38.000000000 -0500
@@ -0,0 +1,69 @@
+Bug#: 69592
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Windows 2000
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: NullReferenceException at System.Reflection.Emit.ModuleBuilder.Save() on Windows
+
+Description of Problem:
+On Windows, System.Reflection.Emit.ModuleBuilder.Save() results in
+NullReferenceException like:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x76bcca79> (wrapper managed-to-native)
+System.Reflection.Emit.ModuleBuilder:WriteToFile (intptr)
+in <0x00004> (wrapper managed-to-native)
+System.Reflection.Emit.ModuleBuilder:WriteToFile (intptr)
+in <0x00283> System.Reflection.Emit.ModuleBuilder:Save ()
+in <0x004d0> System.Reflection.Emit.AssemblyBuilder:Save
+(string,System.Reflection.PortableExecutableKind,System.Reflection.ImageFileMachine)
+in <0x00014> System.Reflection.Emit.AssemblyBuilder:Save (string)
+in <0x00032> Mono.CSharp.CodeGen:Save (string)
+in <0x016d2> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000f> Mono.CSharp.Driver:Main (string[])
+
+
+Steps to reproduce the problem:
+Compile any C# sources that the resulting assembly should be successfully
+generated.
+
+public class Test { public static void Main () {}; }
+
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x76bcca79> (wrapper managed-to-native)
+System.Reflection.Emit.ModuleBuilder:WriteToFile (intptr)
+in <0x00004> (wrapper managed-to-native)
+System.Reflection.Emit.ModuleBuilder:WriteToFile (intptr)
+in <0x00283> System.Reflection.Emit.ModuleBuilder:Save ()
+in <0x004d0> System.Reflection.Emit.AssemblyBuilder:Save
+(string,System.Reflection.PortableExecutableKind,System.Reflection.ImageFileMachine)
+in <0x00014> System.Reflection.Emit.AssemblyBuilder:Save (string)
+in <0x00032> Mono.CSharp.CodeGen:Save (string)
+in <0x016d2> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000f> Mono.CSharp.Driver:Main (string[])
+
+
+Expected Results:
+Should be built.
+
+How often does this happen? 
+always.
+
+Additional Information:
+It happens since r36094. r36092 works fine.
+
+Am using the latest mingw runtime (3.5-1).