I was seeing weird behavior on Windows with GTK and getting random
exceptions. From some other discussions on this mailing list I did the
following:
Glib.Thread.Init();
Gdk.Threads.Init();
Application.Init();
Gdk.Threads.Enter();
try
{
Application.Run();
}
finally
{
Gdk.Threads.Leave();
}
See if that fixes your problem. If it does, please let us know.
If it does not fix your problem, put a breakpoint where you call GetValue,
open up the threads window and make sure your calls are being done on the
main thread.
- James
On 6/12/07, Michael Fasolino <Michael_Fasolino at raytheon.com> wrote:
>>> All,
>> Upon further exploration this seems to be a Multi-Threading problem as the
> GetValue calls are work fine while debugging until I kick off a second
> thread. I am still stumped as to why this will not work while I am
> debugging and work fine while I am running with without debugging. I have
> gone through the multithreading tutorial on the Mono page and it looks like
> I am setting everything up the same as suggested.
>> Does anyone have any ideas?
>> Thanks in advance.
>>>>> *Michael Fasolino <Michael_Fasolino at raytheon.com>*
> Sent by: gtk-sharp-list-bounces at lists.ximian.com>> 06/07/2007 02:08 PM
> To
>gtk-sharp-list at ximian.com cc
>> Subject
> [Gtk-sharp-list] Strange Tree Model behavior
>>>>>>>> This seems really weird to me, but if figured that I would throw it out
> and see if anyone else had seen anything like it. I am using Visual Studio
> 2005 for my development environment. When I run my program in debug mode
> the <Model>.GetValue calls seems to all return null. I am not sure if the
> problem is with the models or with the GetValue function. Is there an easy
> way to view a model's contents when debugging without using the GetValue
> function?
>> I am at a loss as to what would be causing this. When I run the program
> without debugging everything works fine.
>> Any help would be appreciated! Thanks!
>> Michael _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>>> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070612/c692ddf2/attachment.html