[Mono-bugs] [Bug 28722][Nor] New - Thread crashes with garbage collection enabled

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
8 Aug 2002 10:32:09 -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 murban@houston.rr.com.

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

--- shadow/28722	Thu Aug  8 06:32:09 2002
+++ shadow/28722.tmp.12797	Thu Aug  8 06:32:09 2002
@@ -0,0 +1,84 @@
+Bug#: 28722
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: SuSE Linux 8.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: murban@houston.rr.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Thread crashes with garbage collection enabled
+
+Description of Problem: 
+ 
+The following program creates an additional thread and waits for 10 
+seconds while the background thread prints a sequence of numbers: 
+ 
+using System; 
+using System.Threading; 
+ 
+class ThreadTest 
+{ 
+	static int count; 
+ 
+	static void Main() 
+	{ 
+		Thread t1 = new Thread( new ThreadStart( Go ) ); 
+		t1.Start(); 
+		Thread.Sleep(10000); 
+	} 
+	 
+	static void Go() 
+	{ 
+		while (true) 
+		{ 
+			Console.WriteLine(count); 
+			count += 1; 
+		} 
+	} 
+} 
+ 
+Steps to reproduce the problem: 
+1. mcs thread.cs 
+2. mono thread.exe 
+ 
+ 
+Actual Results: 
+ 
+Prints the numbers 0, 1, ..., 19064 then reports 
+ 
+** (process:21025): WARNING **: unhandled exception 
+System.NullReferenceException: "A null value was found where an object 
+instance was required" 
+ 
+Once the exception message is printed, the program produces no further 
+output. The program does not halt, however, until ten second interval has 
+elapsed. 
+ 
+Expected Results: 
+ 
+Prints the numbers 0, 1, ... until ten seconds elapses. 
+ 
+ 
+How often does this happen?  
+ 
+Every time 
+ 
+ 
+Additional Information: 
+ 
+If I run the program with 'GC_DONT_GC=1 mono thread.exe' no such 
+exceptions are reported: the program spews out numbers for ten seconds. 
+ 
+We are having some idiopathic problems with Qt# in which some objects are 
+mysteriously taking on the value null and random times during execution. 
+This particularly comes up in some of the demo programs that do a large 
+number of allocations. I think that the problems we're experiencing with 
+Qt# might be related to the problems with the program above.