Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xlib Fatal IO Error: 11 (resource temporarily unavailable) caused by not using XCloseDisplay()

Tags:

c++

opengl

xlib

I'm using X11 and when I run my program the window displays fine, but when I quit the following error is outputted in the console:

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 58 requests (58 known processed) with 0 events remaining.

I have looked in the documentation but I can't find out anything on what this actually means.

like image 347
Adam Yaxley Avatar asked Oct 11 '22 09:10

Adam Yaxley


1 Answers

I have gotten the same error message from clicking on the (X) button to close the window. When I closed the window in a manual way, it worked.

That is an oddity from the X11 protocol - the (X) by default just deletes your window and then you try to release handles that have already been released. The odd thing is that there is no XEvent for the window closing. Instead you get a ClientMessage event, that comes from the Window Manager). Here is a good description on how to handle that: Intercept WM_DELETE_WINDOW on X11?

like image 182
Algoman Avatar answered Nov 03 '22 01:11

Algoman