Hi Filippo, Filippo Argiolas wrote:
I believe I fixed it with the last svn commit. I was looking for the locking issue in the wrong place. It was not the flash who was failing but the photo-saved callback called right after. This signal is emitted from a gstreamer callback so it's outside the mainloop and needs the gdk locking. Could you guys test it and confirm it's fixed?
Yes. I can not reproduce the bug with code from trunk.
From the document of GDK, "you must also surround any calls to GTK+ not made within a signal handler with a |gdk_threads_enter()| <http://library.gnome.org/devel/gdk/unstable/gdk-Threads.html#gdk-threads-enter>/|gdk_threads_leave()| <http://library.gnome.org/devel/gdk/unstable/gdk-Threads.html#gdk-threads-leave> pair".There is still a thing that concerns me: We do the window setup before the first gdk_threads_enter (), something like gdk_threads_init (); cheese_window_init (); /* it initialize the would window, builds the ui, connects the actions, etc.. */ // other setups.. gdk_threads_enter (); gtk_main (); gdk_threads_leave (); This never caused any issue but I suspect we should call gdk_threads_enter right after threads_init, should we? I read the other apps failed starting with a11y because of a similar issue (gftp).
Regards, Li