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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>*
Sent by: [EMAIL PROTECTED]

06/07/2007 02:08 PM
  To
[EMAIL PROTECTED]  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  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list


_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list


_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to