[Mono-bugs] [Bug 61561][Nor] Changed - MCS fails with unhandled exception (not a syntax error) while compiling my program

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 14 Sep 2004 19:42:43 -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 marek.safar@seznam.cz.

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

--- shadow/61561	2004-07-19 13:06:51.000000000 -0400
+++ shadow/61561.tmp.1958	2004-09-14 19:42:43.000000000 -0400
@@ -1,16 +1,16 @@
 Bug#: 61561
-Product: Mono: Compilers
+Product: Mono: Runtime
 Version: unspecified
 OS: unknown
 OS Details: Windows XP SP1, .NET 1.1, Mono 1.0
 Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Normal
-Component: C#
+Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: msolnit@istante.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
@@ -164,6 +164,41 @@
 Command line:
 mcs -reference:Hastable.dll NetToJavaFactory.cs
 
 
 You need the files Hashtable.dll (attached) and JNBShare.dll 
 (attached)
+
+------- Additional Comments From marek.safar@seznam.cz  2004-09-14 19:42 -------
+It's runtime bug. Try this sample
+
+using System;
+using System.Collections;
+
+namespace Foo
+{
+  public sealed class NetToJavaFactory
+  {
+    public static void Main ()
+    {
+        typeof (java.util.Hashtable).GetProperties ();
+    }
+  }
+}
+
+Compiled with mcs.exe 0.cs /r:Hashtable.dll
+
+And when you run you get
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to
+an instance of an object
+in <0xff059348> (wrapper managed-to-native)
+System.MonoType:GetPropertiesByName
+(string,System.Reflection.BindingFlags,bool,System.Type)
+in <0x00004> (wrapper managed-to-native)
+System.MonoType:GetPropertiesByName (st
+ring,System.Reflection.BindingFlags,bool,System.Type)
+in <0x0002f> System.MonoType:GetProperties
+(System.Reflection.BindingFlags)
+in <0x00010> System.Type:GetProperties ()
+in [0x0000a] (at c:\CVSROOT\mcs\mcs\6.cs:16) Foo.NetToJavaFactory:Main ()