Re: [gtk-win32] Updating a progress bar from a worker thread



> Wow, I see what you mean!  I just took a look at the archive and realised
> how lucky I was to get any replies!!

Well, it's fine to ask Windows-specific questions on the general GTK+
lists, too.

> All my gtk and gdk functions are being called from the same thread

Ah OK, as I said I didn't read too closely, sorry

> (i.e. the main UI  thread) - but a worker thread is signalling the UI thread occasionally,
> to tell it that something needs to be updated.  The worker thread itself
> doesn't contain any gtk or gdk code.  That must be supported, surely?

Yeah, sounds exactly as it should be. Except that I don't know about
the "signalling" part, I am not sure how that is actually implemented
(I am not a C++ person), and whether it works with the GLib mainloop.
I would just use g_idle_add() instead.

> the app simply crashes with Windows telling me (rather
> unhelpfully) "Runtime Error: This application has asked the runtime to
> terminate it in an unusual way" - and no further information..!

Have you built the app as a "gui" executable? It might be printing
something to stdout or stderr, but in a "gui" executable that goes
nowhere. Build it as a "console" executable instead.

--tml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]