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

12,644

Solution 1

The error is because I quit the application without closing the display using XCloseDisplay().

Solution 2

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?

Share:
12,644
Adam Yaxley
Author by

Adam Yaxley

Check out my portfolio: adamyaxley.com

Updated on June 05, 2022

Comments

  • Adam Yaxley
    Adam Yaxley almost 2 years

    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.