Hello, all. I have been running into these threading errors:
[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.
mono: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) SFML.Graphics.RenderWindow.sfRenderWindow_getViewport (intptr,intptr) <IL 0x00012, 0xffffffff>
at SFML.Graphics.RenderWindow.GetViewport (SFML.Graphics.View) [0x00001] in /home/camilo/Proyectos/Pax/Libraries/SFML.Net/src/Graphics/RenderWindow.cs:332
at Gwen.Renderer.SFML.StartClip () [0x000a2] in /home/camilo/Proyectos/Pax/Libraries/GwenCS/Gwen.Renderer.SFML/Renderer/SFML.cs:415
at Gwen.Control.Base.RenderRecursive (Gwen.Skin.Base,System.Drawing.Rectangle) [0x00056] in /home/camilo/Proyectos/Pax/Libraries/GwenCS/Gwen/Control/Base.cs:1146
at Gwen.Control.Base.DoRender (Gwen.Skin.Base) [0x00045] in /home/camilo/Proyectos/Pax/Libraries/GwenCS/Gwen/Control/Base.cs:1113
at Gwen.Control.Canvas.RenderCanvas () [0x0006d] in /home/camilo/Proyectos/Pax/Libraries/GwenCS/Gwen/Control/Canvas.cs:127
at Pax.Client.MainWindow.Update () [0x0002a] in /home/camilo/Proyectos/Pax/Programs/Pax.Client/MainWindow.cs:82
at Pax.Client.MainClass.Main (string[]) [0x0000d] in /home/camilo/Proyectos/Pax/Programs/Pax.Client/Main.cs:34
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Native stacktrace:
/usr/bin/mono() [0x4a9301]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf210) [0x7fdb9ed30210]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7fdb9e9aa1e5]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7fdb9e9ad398]
/lib/x86_64-linux-gnu/libc.so.6(+0x2e272) [0x7fdb9e9a3272]
/lib/x86_64-linux-gnu/libc.so.6(+0x2e322) [0x7fdb9e9a3322]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x433dc) [0x7fdb96e803dc]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x23b) [0x7fdb96e8121b]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XGetWindowAttributes+0xa4) [0x7fdb96e68974]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XGetWindowAttributes+0x31) [0x7fdb96e68ae1]
/usr/lib/libsfml-window.so.2(+0xd31d) [0x7fdb9c3fa31d]
/usr/lib/libsfml-window.so.2(_ZNK2sf6Window7getSizeEv+0x15) [0x7fdb9c3f6165]
/usr/lib/libsfml-graphics.so.2(_ZNK2sf12RenderWindow7getSizeEv+0x9) [0x7fdb9c62b389]
/usr/lib/libsfml-graphics.so.2(_ZNK2sf12RenderTarget11getViewportERKNS_4ViewE+0x12) [0x7fdb9c62a8e2]
/usr/lib/libcsfml-graphics.so.2(sfRenderWindow_getViewport+0xd) [0x7fdb9c85104d]
[0x40b1db98]
Further down it lists the threads that are running, but marks the 1st (main) thread as active, if I understand correctly.
* 1 Thread 0x7fdb9f833740 (LWP 12975) "mono" 0x00007fdb9ed2fe07 in __libc_waitpid (pid=<optimized out>, stat_loc=<optimized out>, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:40
I have found one "solution", but I don't know what I might be breaking. To comment out the Dispose in SFML.Net's ObjectBase destructor (or whatever it's called in C#).
public abstract class ObjectBase : IDisposable
{
//...
~ObjectBase()
{
//Dispose(false);
}
//...
}
So, my suspcion is, the finalizer disposes something the main thread is still using. But I have no idea what it could be, and why it happens. Any hints?