[Mono-bugs] [Bug 57956][Maj] New - Nullref when assigning values to a multidimensional array

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 2 May 2004 10:55:36 -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 cl.koppensteiner@kabsi.at.

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

--- shadow/57956	2004-05-02 10:55:36.000000000 -0400
+++ shadow/57956.tmp.10726	2004-05-02 10:55:36.000000000 -0400
@@ -0,0 +1,90 @@
+Bug#: 57956
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: cl.koppensteiner@kabsi.at               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Nullref when assigning values to a multidimensional array
+
+Description of Problem:
+
+When assigning datatype values to a field of a multidimensional array which
+is a member of an object, mono hangs.
+
+
+Steps to reproduce the problem:
+
+Compile the following code and run the .exe with mono.
+
+class Test {
+
+    static void Main()
+    {
+        Test test = new Test();
+    }
+
+    object[,] obj;
+
+    public Test()
+    {
+        obj = new object[2,2];
+        obj[1,1] = 123;
+    }
+}
+
+Actual Results:
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required.
+in (unmanaged) Test:.ctor ()
+in <0x00026> Test:Main ()
+
+Then mono hangs (it does not return to the console).
+
+Expected Results:
+No output.
+
+Additional Information:
+
+mint works without problems. Following two code snippets work also:
+
+class Test {
+    static void Main()
+    {
+        Test test = new Test();
+    }
+
+    object[,] obj;
+
+    public Test()
+    {
+        obj = new object[2,2];
+        obj[1,1] = new Object();
+    }
+}
+
+
+class Test {
+    static void Main()
+    {
+        Test test = new Test();
+    }
+
+    public Test()
+    {
+        object[,] obj;
+        obj = new object[2,2];
+        obj[1,1] = 123;
+    }
+}
+
+I'm using mono 0.31.