[Mono-bugs] [Bug 22908] New - Threads problems in initializing classes

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
1 Apr 2002 23:14:45 -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 veron78@interfree.it.

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

--- shadow/22908	Mon Apr  1 18:14:45 2002
+++ shadow/22908.tmp.32402	Mon Apr  1 18:14:45 2002
@@ -0,0 +1,44 @@
+Bug#: 22908
+Product: Mono/Runtime
+Version: unspecified
+OS: Red Hat 7.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: veron78@interfree.it               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Threads problems in initializing classes
+
+This bug happen when a complex class ( that make a lot of initialization
+stuffs ) 
+is declared ( or used for the first time)  after a new thread declaration
+of a thread
+that use in his start method  the same class. 
+Ex.
+
+  Thread t = new Thread(ts);
+   complexclass cc = complexclass();
+..
+
+void  ThreadMethod() { complexclass cc1 = new cc() };
+...
+class complexclass {
+   complexclass() { // a lot of init stuff here }
+}
+
+In this case the bug happen.
+Probably this is due to the thread and the main trying to both initialize
+the same class. 
+If i move that complexclass declaration from after the Thread t = new ...
+statements
+to before of it the thread bug doesn't happen. In this case main initialize
+the class
+and the thread only use it.
+Another thing i noted is that with mono this bug do not happen.