Hi Muscha,
As Chris suggested, if you are updating your controls from
other threads (other than the GUI thread that created your control),
you will need to need to use Control.Invoke() to marshal the call
correctly to the GUI thread.
One other thing you must probably try to do is handle
exceptions in the code that raises events.
foreach(YourDelegate del in YourEvent.GetInvocationList())
{
try
{
del(some params);
}
catch(Exception ex)
{
// Maybe the event handler threw an exception.
}
}
That way, you can trap exceptions even if your event handlers such as your
GUI app
terminates unexpectedly.
Regards,
Aravind C
"Muscha" <mu****@no.spam.net> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
Hello,
I'm working on a GUI C# projects with a lot of threads doing many thing.
Basically the GUI is just a monitor of all the threads.
Often my application suddenly shut down without any warning. Noramlly if
you run from VS you get the Unhandled Exception dialog box, which does happen,
but occasionally it just stopped and seems like a normal termination
(not).
Anyone has any suggestion about this issue?
thanks,
/m