egui: eframe X11 crash after using thread spawn
Describe the bug
Random crash 1 out of 4 times when spawning a thread with thread::spawn on X11
[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.
rustyboi: ../../src/xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
To Reproduce Steps to reproduce the behavior:
- Create a simple
eframeapp - Build it, it shoul start just fine
- Add
thread::spawnwithloop{} - Build it again, it should start randomly crashing on start
Expected behavior N/A
Screenshots

Desktop (please complete the following information):
- OS: Pop OS + KDE Plasma X11 (gdm3)
- Browser: N/A
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 28 (14 by maintainers)
@emilk exactly, even in software render egui runs quite fast.
I finally installed an Ubuntu VM and ran into this exact issue ^^ probably because of using a software renderer like @ambihelical suspected.
for glutin > v0.28.0 or patched glutin, turn off vsync.
the error will be gone.
the PR: https://github.com/rust-windowing/glutin/pull/1387 finally being merged a while ago, waiting for glutin > v0.28.0 release