开发者

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

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.


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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜