On Mon, 2007-04-02 at 13:58 +0200, Matthias Scheer wrote:
> Hi all,
>
> I'm developing a computational tool with a nice GUI using GTK2+ and
> Glade3. The OS is Ubuntu 6.10 with Gnome UI. Now I have encountered some
> strange behaviour.
>
> The application essentially asks for alot of parameters for the user to
> enter, has a progress bar and a start, pause and exit button. When the
> users hits start, I'm spawning a new thread (using pthreads) and let the
> signal handler of start button return to the gtk_main() loop. This is
> required because the computation takes quite some time and the user
> should have the possibility to pause the program.
>
> Now I've run into some 'indeterministic' effects. In about half of the
> test runs, the GUI keeps accessible to the user, i.e. eyecandy on the
> button on mouse-over, and the program works normally. In the other half,
> the GUI freezes, but the computation finishes normally. Strangely, the
> program reacts on clicks on the GUI, i.e. it pauses, exits etc, but the
> GUI itself is frozen.
>
> I'm running kernel 2.6.20.3 with the xenomai real-time patch.
>
You say that when the program appears to be unresponsive, it still does
in fact respond to the "pause"/"quit" buttons ?
My guess is that your application is starving the whole computer, a
mouse over is usually smart enough to not show any effects if the event
arrives late, but a button click is a more serious event and will
eventually get treated, even if its a second late.
Probably by sleeping a little bit in your worker thread or finding
a way to be more cooperative everything will work more as expected.
Cheers,
-Tristan
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list