[Mono-bugs] [Bug 75650][Nor] New - nullreferenceexception on Assembly.Gettype() with ignorecase

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jul 27 15:59:33 EDT 2005


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 doug00 at gmail.com.

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

--- shadow/75650	2005-07-27 15:59:33.000000000 -0400
+++ shadow/75650.tmp.27594	2005-07-27 15:59:33.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 75650
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: .NET 1.1 and Mono 1.1.8 (for Windows)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: doug00 at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: nullreferenceexception on Assembly.Gettype() with ignorecase
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Unhandled nullreferenceexception when running an exe that attempts to load
+a module from another assembly (using assembly.gettype) with ignorecase set
+to true.  Works in .NET 1.1, throws exception in Mono 1.1.8 on Windows.
+
+
+Steps to reproduce the problem:
+1. runBoo.cs script here:
+http://boo.codehaus.org/Scripting+with+the+Boo.Lang.Compiler+API
+2. Change line that ends with:
+context.GeneratedAssembly.GetType("ScriptModule"); to
+context.GeneratedAssembly.GetType("ScriptModule", true, true);
+3. If the last ignorecase parameter passed to assembly.gettype is true, the
+application will throw an unhandled nullreferenceexception in mono, but not
+in .NET 1.1.  If the parameter is false (don't ignore case), it works fine
+in both Mono and .NET.  The exception is caused by
+corlib/system.reflection.assembly:InternalGetType(module,string,bool,bool).
+4. This code is attempting to load a module (not a class) from a
+dynamically generated assembly.  This may be a related mono bug:
+http://bugzilla.ximian.com/show_bug.cgi?id=75629
+
+Actual Results:
+
+Unhandled nullreferenceexception: system.typeloadexception
+in System.Reflection.Assembly:InternalGetType(module,string,bool,bool)
+in System.Reflection.Assembly:GetType(string,bool,bool)
+
+Expected Results:
+
+a string message from invoking the script.boo method.
+How often does this happen? 
+
+
+Additional Information:
+
+system.reflection.assembly:InternalGetType calls mono/metadata/icall.c ->
+ves_icall_System_Reflection_Assembly_InternalGetType


More information about the mono-bugs mailing list