[Mono-bugs] [Bug 31425][Wis] New - Problem with threads.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
28 Sep 2002 14:31:31 -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 tapia@eitig.com.
http://bugzilla.ximian.com/show_bug.cgi?id=31425
--- shadow/31425 Sat Sep 28 10:31:31 2002
+++ shadow/31425.tmp.23372 Sat Sep 28 10:31:31 2002
@@ -0,0 +1,67 @@
+Bug#: 31425
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: tapia@eitig.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Problem with threads.
+
+Description of Problem:
+
+We have a class with that code:
+
+public class Class1
+{
+ public Thread thread;
+ public Class1 ()
+ {
+ thread = new Thread (new ThreadStart(Method));
+ }
+
+ public void Method ()
+ {
+ if (SegThread.ThreadState == ThreadState.Unstarted) {
+ SegThread.Start();
+ Console.WriteLine ("write something");
+ }
+ }
+
+In the main class, I do something like this:
+
+Class1 object1 = new Class1();
+Class1 object2 = new Class1();
+
+Actual Results:
+
+Sometimes, the object1 constructor works fine, and something doesn't.
+object2 never work. The error message:
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+in <0x0000c> 00 Class1:Method ()
+in <0x00057> 01 System.MulticastDelegate:invoke_void ()
+
+Expected Results:
+
+The obvious output:
+
+write something
+write something
+
+How often does this happen?
+
+As I said, object1 sometimes works, sometimes doesn't. object2 never works.
+
+Additional Information:
+
+I use Debian Sid, with Mono 0.15