Godot mono v3.5 for linux on x11 crash when open a project

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wangshengyi

When I open a project , godot has a 50 percent chance of crashing(crash 4 times of 10)
I don’t know how to fix it.
Here is the log:

Mono: Log file is: ‘/home/wsy/.local/share/godot/mono/mono_logs/2023-01-07_15.03.38_5304.log’
[xcb] Unknown sequence number while processing queue
[xcb] You called XInitThreads, this is not your fault
[xcb] Aborting, sorry about that.
godot: xcb_io.c:278: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost’ failed.

=================================================================
Native Crash Reporting

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

=================================================================
Native stacktrace:

0x100322d - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot :
0x10035b9 - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot :
0xff5c6f - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot :
0x1002834 - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot :
0x7f04541a3a00 - /usr/lib/libc.so.6 :
0x7f04541f364c - /usr/lib/libc.so.6 :
0x7f04541a3958 - /usr/lib/libc.so.6 : gsignal
0x7f045418d53d - /usr/lib/libc.so.6 : abort
0x7f045418d45c - /usr/lib/libc.so.6 :
0x7f045419c486 - /usr/lib/libc.so.6 :
0x7f0454528962 - /usr/lib/libX11.so.6 :
0x7f0454528a26 - /usr/lib/libX11.so.6 :
0x7f045452b6a2 - /usr/lib/libX11.so.6 : _XEventsQueued
0x7f0454508c1f - /usr/lib/libX11.so.6 : XFlush
0x124e5e9 - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot : _ZN6OS_X1121_check_pending_eventsER11LocalVectorI7_XEventjLb0EE
0x124ea6c - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot : _ZN6OS_X1119_poll_events_threadEPv
0x3b97898 - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot : _ZN6Thread8callbackEPS_RKNS_8SettingsEPFvPvES4_
0x40ab9d0 - /home/wsy/Godot_v3.5-stable_mono_x11_64/godot :
0x7f04541f18fd - /usr/lib/libc.so.6 :
0x7f0454273a60 - /usr/lib/libc.so.6 :

=================================================================
Telemetry Dumper:

Thread 0x7f04090336c0 may have been prematurely finalized* Assertion at /root/mono-6.12.0.182/mono/utils/mono-threads.c:651, condition `info’ not met, function:mono_thread_info_current,
ERROR: FATAL: Index p_index = 0 is out of bounds (size() = 0).

in 2023-10-07_15.03.38_5304.log:log.txt

:bust_in_silhouette: Reply From: juppi

Yep, known issue with libx11:

On Archlinux the Issue has been fixed.

So you have to make sure to upgrade to a fixed Version or an older Version of libx11.