[Mono-bugs] [Bug 59629][Wis] New - NullReferenceException when getting event of emitted type

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 5 Jun 2004 08:41:54 -0400 (EDT)


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 gert.driesen@pandora.be.

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

--- shadow/59629	2004-06-05 08:41:54.000000000 -0400
+++ shadow/59629.tmp.9239	2004-06-05 08:41:54.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 59629
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: NullReferenceException when getting event of emitted type
+
+When getting the events of a Type that was emitted at runtime, the 
+following exception is reported :
+
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of an object
+in (unmanaged) (wrapper managed-to-native) 
+System.MonoType:GetEvents_internal (S
+ystem.Reflection.BindingFlags,System.Type)
+in <0x00004> (wrapper managed-to-native) 
+System.MonoType:GetEvents_internal (Sys
+tem.Reflection.BindingFlags,System.Type)
+in <0x00010> System.MonoType:GetEvents (System.Reflection.BindingFlags)
+in <0x00016> System.Type:GetEvents ()
+in <0x001fd> ReflectionEmit.EntryPoint:Main (string[])
+
+I attached a repro for this issue.
+
+Running this on MS.NET returns :
+
+Number of events in emitted Type: 1
+
+There appears to be a bug in ves_icall_Type_GetEvents_internal in icall.c