After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704247 - client-draw-callback in gstglimagesink causes on_draw to stop getting called.
client-draw-callback in gstglimagesink causes on_draw to stop getting called.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
git master
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-15 12:58 UTC by Mathieu Duponchelle
Modified: 2013-07-17 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to generic/cube removing the glupload element. (3.01 KB, patch)
2013-07-15 12:58 UTC, Mathieu Duponchelle
committed Details | Review
Call XInitThreads when the window is instantiated. (789 bytes, patch)
2013-07-15 20:56 UTC, Mathieu Duponchelle
rejected Details | Review
Picking the low hanging fruits makes these examples work. (12.51 KB, patch)
2013-07-16 16:33 UTC, Mathieu Duponchelle
committed Details | Review
Not enough for these ones though. (7.99 KB, patch)
2013-07-16 16:33 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2013-07-15 12:58:00 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.
Comment 1 Sebastian Dröge (slomo) 2013-07-15 13:26:52 UTC
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 :)
Comment 2 Mathieu Duponchelle 2013-07-15 20:55:21 UTC
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.
Comment 3 Mathieu Duponchelle 2013-07-15 20:56:07 UTC
Created attachment 249242 [details] [review]
Call XInitThreads when the window is instantiated.
Comment 4 Sebastian Dröge (slomo) 2013-07-16 06:53:25 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2013-07-16 11:30:59 UTC
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
Comment 6 Mathieu Duponchelle 2013-07-16 15:02:30 UTC
(In reply to comment #5)
> Should all be good now :)

Is all good now :)
Comment 7 Sebastian Dröge (slomo) 2013-07-16 15:20:45 UTC
So missing only your patches to fix the other examples ;)
Comment 8 Mathieu Duponchelle 2013-07-16 16:33:27 UTC
Created attachment 249285 [details] [review]
Picking the low hanging fruits makes these examples work.
Comment 9 Mathieu Duponchelle 2013-07-16 16:33:57 UTC
Created attachment 249286 [details] [review]
Not enough for these ones though.
Comment 10 Sebastian Dröge (slomo) 2013-07-17 09:22:58 UTC
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.