[Mono-bugs] [Bug 24943] New - thread.c ves_icall_System_Threading_Monitor_Monitor_test_owner bug

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 May 2002 18:44:13 -0000


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 loz@cable.a2000.nl.

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

--- shadow/24943	Sun May 19 14:44:13 2002
+++ shadow/24943.tmp.22993	Sun May 19 14:44:13 2002
@@ -0,0 +1,64 @@
+Bug#: 24943
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: loz@cable.a2000.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: thread.c ves_icall_System_Threading_Monitor_Monitor_test_owner bug
+
+Running the example below:
+
+using System;
+using System.Threading;
+
+class T26
+{
+    public T26 () { }
+
+    public void Test ()
+    {
+        lock (this) {
+            throw new Exception ("some exception");
+        }
+    }
+	
+    public static void Main ()
+    {
+	try {
+            new T26 ().Test ();
+	} catch (Exception e) {
+            Console.WriteLine (e.Message + " " + e.StackTrace);
+	}
+    }
+}
+
+I get the following error:
+
+A null value was found where an object instance was required in 
+(unmanaged) Syst
+em.Threading.Monitor:Monitor_test_owner ()
+in 0x00047 System.Threading.Monitor:Exit (object)
+in 0x0004c .T26:Test ()
+in 0x00036 .T26:Main ()
+
+It seems like the line :
+
+     if(mon->tid!=GetCurrentThreadId()) {
+
+in thread.c ves_icall_System_Threading_Monitor_Monitor_test_owner is what 
+is raising the error.
+
+
+
+Greets,
+Lawrence