[Gtk-sharp-list] Windows and Dialogs hang after WebClient.DownloadFileAsync

Mike Kestner mkestner at gmail.com
Wed Jul 6 09:06:43 EDT 2011

I'm assuming it's because the async web service response is running on a
different thread.  You have to ensure all Gtk# calls are made on the thread
which invokes Application.Init().  You can use Application.Invoke to perform
the context switch.


On Wed, Jul 6, 2011 at 1:51 AM, SilkyPantsDan <novacaine.nzl at gmail.com>wrote:

> Hey all,
> I'm in the process of writing my first GTK# application (along side a .NET
> and MonoMac app using the same library file) and came across some strange
> behavior. Just wondering if anyone has seen this before - as my searches
> aren't turning up anything useful.
> Basically - it seems that any window that is shown from the
> DownloadFileCompleted event from a WebClient object just hangs after
> showing. I've managed to narrow it down to a simple test application which
> is attached.
> I've tried waiting and calling from a different event - but it seems that
> if
> the DownloadFileCompleted event is on the stack it will cause the issue.
> Thanks for the help, still looking into what else I can think of that could
> be causing this (along with a pain of a bug with MonoMac and NSPath objects
> :()
> http://mono.1490590.n4.nabble.com/file/n3647843/Window_Stall_Bug.zip
> Window_Stall_Bug.zip
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Windows-and-Dialogs-hang-after-WebClient-DownloadFileAsync-tp3647843p3647843.html
> Sent from the Mono - Gtk# mailing list archive at Nabble.com.
> _______________________________________________
> 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/20110706/6c35f99a/attachment.html 

More information about the Gtk-sharp-list mailing list