minetest / irrlicht

Minetest's fork of Irrlicht
Other
114 stars 87 forks source link

Initialize X11 thread safety #259

Closed paradust7 closed 9 months ago

paradust7 commented 9 months ago

This fixes a crash in libx11 on Linux when resizing the window:

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
minetest: ../../src/xcb_io.c:278: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)

Latest libx11 does not crash. Bisection found that it stopped crashing after afcdb6fb0045 which enables thread-safety by default.

The issue appears to be that libX11 requires thread-safety to interact with multi-threaded mesa/nvidia/amd GL drivers.