[Mono-devel-list] Thread and Timer problems

Jörg Rosenkranz joergr at voelcker.com
Thu Apr 8 10:01:32 EDT 2004


Hi all,

We are recognizing some strange problems with Threads and Timers in our 
application:

1) Thread.Join sometimes hangs.
	We are calling Thread.Join to wait for the end of a thread. The
	thread function includes a Console.WriteLine as last statement.
	This statement prints its text but Thread.Join never returns.
	I was not able to reproduce this behaviour in a simple test case.
	
2) Timer.Dispose throws an exception.
	We are getting following exception when disposing a Timer object:	

	[System.NullReferenceException] Object reference not set to an instance of an object
		in (unmanaged) /lib/libpthread.so.0(pthread_cond_broadcast+0x34) [0x40bda194]
		in (unmanaged) /usr/local/lib/libmono.so.0 [0x400e993e]
		in (unmanaged) /usr/local/lib/libmono.so.0 [0x400e97c0]
		in (unmanaged) /usr/local/lib/libmono.so.0 [0x400ba26e]
		in <0x00027> System.Threading.ManualResetEvent:Set ()
		in <0x0005d> (wrapper remoting-invoke-with-check) System.Threading.ManualResetEvent:Set ()
		in <0x00039> Runner:Abort ()
		in <0x0004f> (wrapper remoting-invoke-with-check) Runner:Abort ()
		in <0x00048> System.Threading.Timer:Dispose ()
		in <0x0004f> (wrapper remoting-invoke-with-check) System.Threading.Timer:Dispose ()
	
	Also not reproducible in a simple test case.

3) Using Timers the application never ends.
	This one is reproducible. I have filed following bug report:
	http://bugzilla.ximian.com/show_bug.cgi?id=56699



The same application works without problems under MS.NET. It's running in 
an own AppDomain to allow auto update functionality. I don't know if this 
might cause some of our problems. I was testing it with a CVS version 
built some hours ago.

Are there any ideas what might cause these problems or how to fix/reproduce
them?

Thanks,
Joerg.



More information about the Mono-devel-list mailing list