[Mono-bugs] [Bug 54980][Maj] Changed - AppDomain.Unload() fails randomly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 5 Mar 2004 14:48:36 -0500 (EST)

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 jaak@zd.com.pl.


--- shadow/54980	2004-03-05 10:51:47.000000000 -0500
+++ shadow/54980.tmp.15931	2004-03-05 14:48:36.000000000 -0500
@@ -175,6 +175,21 @@
 4. It hangs on a call to wait.Set(); in Runner.Dispose(bool). 
 5. Looks like some deadlock. I'll keep investigating it. Maybe someone
 has an idea?
+------- Additional Comments From jaak@zd.com.pl  2004-03-05 14:48 -------
+Looks like I found a bug in "corlib/System.Threading/Timer.cs" which
+might be causing this issue.
+Runner.Dispose(bool) function called from the finalizer improperly
+calls wait.Set() on a possibly-disposed "wait" object.
+I've restructured it a bit, and it helped a lot. (patch attached)
+(I keep getting "GC Warning: Finalization cycle involving ...", but
+despite the warnings NAnt builds and runs without apparent problems).
+Can someone verify my patch and possibly commit it?