[Mono-bugs] [Bug 35119][Wis] New - Objects with finalizers don't work
5 Dec 2002 03:20:29 -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 email@example.com.
--- shadow/35119 Wed Dec 4 22:20:29 2002
+++ shadow/35119.tmp.2469 Wed Dec 4 22:20:29 2002
@@ -0,0 +1,90 @@
+Summary: Objects with finalizers don't work
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+The mono runtime crashes (siliently) when using objects with finalizers.
+Finalizers aren't always called.
+Steps to reproduce the problem:
+Compile and run the following file:
+public class Test
+ public Test()
+ // If this line is commented out
+ // the finalizer won't even run
+ public static void Main()
+ // This for loop should keep going
+ // The mono runtime exits after a few seconds.
+ for (;;)
+ new Test();
+If the Console.WriteLine statement in the constructor is commented out
+the program exits almost immediately with no error reported.
+If the Console.WriteLine statement in the constructor is not commented
+out the program prints "Constructing" a few times then exists with no
+If the finalizer is commented out the program runs for ever.
+The program should keep running forever, printing "Constructing"
+and "Finalizing" lots.
+How often does this happen?
+All the time.
+Mono was built with the a current copy from the CVS.
+This finalization problem may be what is causing monitor/locks to leak
+handles. See this bug: http://bugzilla.ximian.com/show_bug.cgi?id=34963.