[Mono-list] How to debug multi-threaded app ?

Nil Gradisnik ghaefbgtk at gmail.com
Wed Mar 14 15:26:59 EDT 2007


I'm developing this not to complex application using mono and I'm
using System.Threading to make my GUI responsive.

Basically I'm doing:

> Thread someThread = new Thread(new ThreadStart(DataThreadRoutine));
> someThread.Start();

So I'm running a few threads, some of them doing some HttpWebReques,
others just simple calculations and I noticed that randomly my
GUI(gtk# app) freezes or hangs, it becomes unresponsive, but the
functions are still running in the background. I've searched about
this issue and found that I need to use this:

> Gtk.Application.Invoke (delegate {
>      //do something to GUI
>});

...to fix this problem. But the problem still exists.
So I'm wondering what else could cause my GTK# application to hang
and/or how to debug this ?

I tried mono --debug flag, --trace=N:namespace and even mono-debugger
with no luck.
This is really annoying, please help.

Thanks


More information about the Mono-list mailing list