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

Nil Gradisnik ghaefbgtk at gmail.com
Wed Mar 14 17:40:52 EDT 2007


Let me be more specific :)

I think the problem lies in my liststore.AppendValues(....) and
liststore.Clear() functions. I need to use Application.Invoke if I'm
in thread for those too right ?

But if I use Application.Invoke for liststore, I get quite a few new
unhandled exceptions, why is that ?

On 3/14/07, Nil Gradisnik <ghaefbgtk at gmail.com> wrote:
> 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