Re: Stalls in idle loop



On Wed, 9 Aug 2000, Nick Matsakis wrote:

> 
> I'm having a problem with a GTK-based application.  Simply, I have written
> a program which makes extensive use of an idle function, installed with
> gtk_idle_add().  Periodically, for no apparent reason, the GTK main loop
> ceases to run the idle function. Moving the mouse, pressing a key on the
> keyboard, or otherwise sending an event to the program causes the idle
> loop to be run again.  My questions, therefore, are:
> 
> 1) Is this a known problem? 
> 2) Is there an elegant solution? 
> 3) If not, is there an inelegant solution?  My one thought is to send some
>   sort of "null event" at the end of the idle loop, ensuring that there is
>   always an event in the queue whenever the idle loop ends.  I don't know
>   why that might work, but it seems to me that if moving the mouse fixes
>   the problem, this might too. 
> 4) On a related note, is there a bug list for GTK on the web somewhere? I
>   couldn't find one.

 All gtk bugs could be browsed/added on http://bugs.gnome.org (choose gtk+
category).
 Also, you didn't specify the version of gtk you are using (the recent is
1.2.8). 
 Also, I think you can explore the problem by stracing or ltracing the gtk
program when iddle function is ceased to run - may be it's not gtk (more
precisely, glib) problem but the problem with your X server/Xlib/glibc - in
what function program stays when the problem happens?
 Also, how often that iddle function stalls? Does plain waiting "unstalls" it?

> Nick Matsakis

 Best regards,
  -Vlad





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