On Thu, Mar 5, 2009 at 10:07 AM, Michael Meeks <michael.me...@novell.com> wrote: > Hi Filippo,
Hi Michael, >> I'm sending this mail because of a pretty strange cheese bug that only >> happens if accessibility is enabled. > > What fun :-) Hehe sure :-) >> The relevant lines from cheese-flash.c are: >> >> gtk_widget_show_all (GTK_WIDGET (flash_window)); >> flash_priv->flash_timeout_tag = g_timeout_add (FLASH_DURATION, >> cheese_flash_start_fade, (gpointer) flash); > > Is this code correctly protected with the gdk mutex functions ? should > you be using gdk_threads_add_timeout [ and it's equivalent ] everywhere > that you do that ? > >> I tried to figure out what could cause this behaviour but I have no >> knowledge about the way accessibility works so I couldn't get any far. >> Did any of you ever heard about g_timeout_add not working with a11y enabled? >> Any idea of what could cause this issue? > > So - if you are using gtk+ in a threaded fashion, there are a -lot- of > potential interesting problems ;-) are you actually doing that ? and if > not, why initialise gdk for thread support ? I confirm we're using gtk+ in a threaded fashion :-) We need it to setup the webcam device without blocking the UI and another thread is also used to generate thumbnails for the same reason. I agree that threads could be involved in this issue but as far as I can tell, I did some quick check, all function from cheese flash are called in the main thread, cheese_flash_fire is called by the button-clicked signal handler. So there shouldn't be any need to protect them with gdk_threads_enter/leave. Furthermore if I try to add some gdk_threads_enter/leave here and there they block the application when a photo is taken (probably that's the effect of gdk_threads_enter if you're already in the main thread). I had no luck either with replacing g_timeout_add with gdk_threads_add_timeout. Anyway as I said I did just some quick check, I'll do some better test within next days. A thread locking issue seems the best explanation to such behavior. Thanks, Filippo _______________________________________________ gnome-accessibility-list mailing list gnome-accessibility-list@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list