[Mono-list] Threading Problem (Bug?):

Charles-Louis charlouis.mono@wanadoo.be
21 Mar 2003 12:15:32 +0100


I'm having a Thread related problem in my program.I get different Errors
when I run it with mono on Linux (RedHat 8.0) and Windows,and wanted to
know if anyone knows of some issues.

I have to say that, when I ./configure mono, I have to set the
SIZEOF_SUNPATH to 108, because it defaults to 0.

Basically, my application starts a Thread when I cklick on a Button in a
GTK# window. (after running the program with /WINDOW option)

So, when I start the Thread for the first time, I get a
NullReferenceException (actually, I get two, because I start two
threads) when I call 'Thread.Start()', and the first instruction of my
Thread function (WorkerThread) is never executed
(Console.WriteLine("**WorkerThread**");)... the Thread is not started.

When I stop the Thread and restart it, everything runs ok: Thread runs
correctly and performs the correct actions.

Same thing when I run the Thread from the Console...
NullReferenceException for the first time, and then everything runs OK.

On mono Windows (Console), I can start the Thread normally. But when I
stop the Thread, I get this message (on a MessageBox):

** ERROR **: file threads.c: line 817
(ves_icall_System_Threading_Thread_Abort): should not be reached

followed by an 'abnormal program termination'

I tried to make a small TestCase, but can't reproduce the Error...

The same code can also run on Windows, (a core assembly is shared, and
there are separate assemblies for the GUI), without errors.

I tried to run the program with mono-debug, but it crashes with a nasty
error, so it's not much help...

Charles-Louis <charlouis.mono@wanadoo.be>