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:<br><br>Glib.Thread.Init();<br>Gdk.Threads.Init();<br>Application.Init();
<br><br>Gdk.Threads.Enter();<br>try<br>{<br> Application.Run();<br>}<br>finally<br>{
<br> Gdk.Threads.Leave();<br>}<br><br>See if that fixes your problem. If it does, please let us know.<br><br>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.
<br><br> - James<br><br><br><br><div><span class="gmail_quote">On 6/12/07, <b class="gmail_sendername">Michael Fasolino</b> <<a href="mailto:Michael_Fasolino@raytheon.com">Michael_Fasolino@raytheon.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><font face="Times New Roman" size="3">All,</font>
<br>
<br><font face="Times New Roman" size="3">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. </font>
<br>
<br><font face="Times New Roman" size="3">Does anyone have any ideas?</font>
<br>
<br><font face="Times New Roman" size="3">Thanks in advance.</font>
<br>
<br>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>Michael Fasolino <<a href="mailto:Michael_Fasolino@raytheon.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Michael_Fasolino@raytheon.com
</a>></b>
</font>
<br><font face="sans-serif" size="1">Sent by: <a href="mailto:gtk-sharp-list-bounces@lists.ximian.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gtk-sharp-list-bounces@lists.ximian.com</a></font>
<p><font face="sans-serif" size="1">06/07/2007 02:08 PM</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
</td><td><font face="sans-serif" size="1"><a href="mailto:gtk-sharp-list@ximian.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gtk-sharp-list@ximian.com</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td>
<br></td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
</td><td><font face="sans-serif" size="1">[Gtk-sharp-list] Strange Tree
Model behavior</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
<br></td><td><br></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br>
<br>
<br><font face="Times New Roman" size="3"><br>
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? </font><font size="3"><br>
</font><font face="Times New Roman" size="3"><br>
I am at a loss as to what would be causing this. When I run the program
without debugging everything works fine. </font><font size="3"><br>
</font><font face="Times New Roman" size="3"><br>
Any help would be appreciated! Thanks!</font><font size="3"> <br>
</font><font face="sans-serif" size="2"><br>
Michael</font><font size="3"> </font><font size="2"><tt>_______________________________________________<br>
Gtk-sharp-list maillist - <a href="mailto:Gtk-sharp-list@lists.ximian.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Gtk-sharp-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</a><br>
</tt></font>
<br>
<br>_______________________________________________<br>Gtk-sharp-list maillist - <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list" target="_blank">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</a><br><br></blockquote>
</div><br>