xvimagesink: race condition causes crash in XCB
@vincent
Submitted by Vincent Penquerc'h Link to original bug (#745516)
Description
I could get a fairly reliable crash with:
gst-play-1.0 dvd:///someisofile
On an ISO file with a menu (125 MB), clicking on the menu to start a video.
It is fixed by adding XInitThreads to _class_init, but this seems to maybe not be the best fix, since:
- ximagesink does not have it, and does not crash
- 432790c4 in -base hints it should not be our problem
The original error:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 1466 requests (1466 known processed) with 0 events remaining.
And another one, much rarer version, which helped a lot:
[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.
gst-play-1.0: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted (core dumped)