GNOME Bugzilla – Bug 704247
client-draw-callback in gstglimagesink causes on_draw to stop getting called.
Last modified: 2013-07-17 09:23:05 UTC
Created attachment 249193 [details] [review] Patch to generic/cube removing the glupload element. I updated the generic/cube example to remove glupload, but I can observe faulty behaviour with client-draw-callback. When it is set, on_draw stops getting called in gstglimagesink after some iterations. I add an attachment with the glupload removal, but I think I'll do a general patch for all the examples, no need to commit that, it's just for ease of testing. Also I might open another bug when this one is fixed, making this vmethod an actual callback.
commit 753f7f21d14b6b07d70829578c72a4700a7b57a5 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Mon Jul 15 15:25:57 2013 +0200 gldisplay: Don't hold lock while sending a message to the GL thread https://bugzilla.gnome.org/show_bug.cgi?id=704247 Keeping it open for the other patches to fix the demos :)
Hm did you run the cube example with your new patch ? I have no opinion on its correctness, but the example now fails with: [xcb] Unknown request in queue while dequeuing [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. lt-cube: xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed. Aborted (core dumped) A quick and (supposedly) dirty hack makes it work, it's attached next.
Created attachment 249242 [details] [review] Call XInitThreads when the window is instantiated.
Yes, I tested it and it worked most of the time for me. Sometimes I also get this assertion, still not sure why it happens. We need to make sure that all calls to X11 are protected by a mutex (or otherwise serialized) but that should've been the case already.
Should all be good now :) commit 8750d2d37b1a25ddd8dc486ca9c940e84a2ee7b0 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Tue Jul 16 13:28:19 2013 +0200 x11: Protect event display connection with a mutex We use it from different threads and need to serialize the accesses to it. commit 3eeb9ea5976351f72070408b3ea73b96dfd372bf Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Tue Jul 16 13:23:54 2013 +0200 x11: Always use the same display connection from the GL thread The other display connection might be used by async calls from elsewhere at the same time. https://bugzilla.gnome.org/show_bug.cgi?id=704247
(In reply to comment #5) > Should all be good now :) Is all good now :)
So missing only your patches to fix the other examples ;)
Created attachment 249285 [details] [review] Picking the low hanging fruits makes these examples work.
Created attachment 249286 [details] [review] Not enough for these ones though.
Let's close this for now, new bugs for more please :) The original bug is long fixed here ;) commit 74dda28907cab7cd39f6961f86172d0001aa9208 Author: Mathieu Duponchelle <mathieu.duponchelle@epitech.eu> Date: Tue Jul 16 18:28:33 2013 +0200 tests/examples: port some of the examples. This commit is a first step, removes glupload, switch new-decoded-pad to pad-added, but these examples still fail for various reasons. commit d868b734996b7b2e36d52d0283f4966f213167da Author: Mathieu Duponchelle <mathieu.duponchelle@epitech.eu> Date: Tue Jul 16 18:27:07 2013 +0200 tests/examples: fix and port some of the examples. Realize widgets, remove glupload element.