glimagesink crash for thread error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

glimagesink crash for thread error

RiccardoCagnasso
I'm using playbin in python3 with glimagesink as a videosink.
Every time the pipeline goes through a PLAYING -> NULL -> PLAYING cycle, the
player has a random chance of crashing 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.
python: xcb_io.c:165: dequeue_pending_request: Assertion
`!xcb_xlib_unknown_req_in_deq' failed.

error. This happens only on computer with intel video cards.
The problem is probably related to this old bug
https://lists.freedesktop.org/archives/gstreamer-bugs/2014-June/126812.html

Strange thing is that I'm calling Gobject.threads_init() and as the very
earliest thing in process.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: glimagesink crash for thread error

Nicolas Dufresne-5
Le jeudi 30 août 2018 à 11:37 -0500, RiccardoCagnasso a écrit :
> I'm using playbin in python3 with glimagesink as a videosink.
> Every time the pipeline goes through a PLAYING -> NULL -> PLAYING
> cycle, the
> player has a random chance of crashing with
>
>  [xcb] Unknown request in queue while dequeuing
> [xcb] Most likely this is a multi-threaded client and XInitThreads
> has not
> been called

^ This is excatly what you need to do.

> [xcb] Aborting, sorry about that.
> python: xcb_io.c:165: dequeue_pending_request: Assertion
> `!xcb_xlib_unknown_req_in_deq' failed.
>
> error. This happens only on computer with intel video cards.
> The problem is probably related to this old bug
>
https://lists.freedesktop.org/archives/gstreamer-bugs/2014-June/126812.html
>
> Strange thing is that I'm calling Gobject.threads_init() and as the
> very
> earliest thing in process.

This calls is a no-op today and is in now way related to
XInitThreads(). First thing in your python scripts should be:

import ctypes
import sys
try:
  x11 = ctypes.cdll.LoadLibrary('libX11.so')
  x11.XInitThreads()
except:
  print "Warning: failed to XInitThreads()"

>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: glimagesink crash for thread error

RiccardoCagnasso
>This calls is a no-op today and is in now way related to XInitThreads().

WHY?! Oh, well nevermind, thanks.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: glimagesink crash for thread error

Nicolas Dufresne-5
Le vendredi 31 août 2018 à 07:22 -0500, RiccardoCagnasso a écrit :
> > This calls is a no-op today and is in now way related to
> > XInitThreads().
>
> WHY?! Oh, well nevermind, thanks.

Because threading support is always enabled in GLib/GIO these days,
unlike X11 library.

>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment