[Xcb] [PATCH xcb/libxcb] Fatal error message when we close libX11 window application
robert somerville
rbrt.somerville at gmail.com
Tue May 26 13:00:55 PDT 2015
Hi Uri:
here is the message when we hit the close button: ( I can send screen
captures, if you wish ( how ?) ) :
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server
"cgy530ws:0.0"
after 1304786 requests (1300490 known processed) with 0 events
remaining.
> more tttt.cxx
#include <X11/Xlib.h> // Every Xlib program must include this
#include <assert.h> // I include this to test return values the lazy way
#include <unistd.h> // So we got the profile for 10 seconds
#include <stdio.h>
#include <stdlib.h>
#include <execinfo.h>
#define NIL (0) // A name for the void pointer
void printBacktrace() {
int j, nptrs;
#define SIZE 100
void *buffer[100];
char **strings;
nptrs = backtrace(buffer, SIZE);
printf("backtrace() returned %d addresses\n", nptrs);
/* The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO)
would produce similar output to the following: */
strings = backtrace_symbols(buffer, nptrs);
if (strings == NULL) {
perror("backtrace_symbols");
exit(EXIT_FAILURE);
}
for (j = 0; j < nptrs; j++)
printf("%s\n", strings[j]);
free(strings);
}
int myIOXError(Display *disp)
{
printf("ERROR Received a X IO error on display=%x.\n", disp);
printBacktrace();
return True;
}
main() {
Display *dpy = XOpenDisplay(NIL);
assert(dpy);
int blackColor = BlackPixel(dpy, DefaultScreen(dpy));
int whiteColor = WhitePixel(dpy, DefaultScreen(dpy));
// Create the window
Window w = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0,
200, 100, 0, blackColor, blackColor);
// We want to get MapNotify events
XSelectInput(dpy, w, StructureNotifyMask);
// "Map" the window (that is, make it appear on the screen)
XMapWindow(dpy, w);
// Create a "Graphics Context"
GC gc = XCreateGC(dpy, w, 0, NIL);
// Tell the GC we draw using the white color
XSetForeground(dpy, gc, whiteColor);
// register io error handler
// XSetIOErrorHandler(myIOXError);
// Wait for the MapNotify event
for(;;) {
XEvent e;
XNextEvent(dpy, &e);
if (e.type == MapNotify)
break;
}
// Draw the line
for(;;) {
XDrawLine(dpy, w, gc, 10, 60, 180, 20);
// Send the "DrawLine" request to the server
XFlush(dpy);
}
// Wait for 10 seconds
sleep(10);
}
ldd tttt
linux-vdso.so.1 => (0x00007f7786ae2000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003ede200000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003ee1e00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003edb600000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ee1600000)
libc.so.6 => /lib64/libc.so.6 (0x0000003edae00000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x0000003edda00000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003edba00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003edaa00000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003edde00000)
On Tue, May 26, 2015 at 1:54 PM, Uli Schlachter <psychon at znc.in> wrote:
> Hi,
>
> Am 26.05.2015 um 12:02 schrieb robert somerville:
> > Hello All:
> > This is my first post to this group, please forgive any newbie mistakes
> ..
> >
> > We seem to be having this error on our Redhat 6.6 x86-64 system ! Is
> there
> > a version of XCB out there that will fix this problem ? This error
> occurs
> > also in a third party API and is apparently killing us. It also occurs
> on a
> > test drawing program when we close the window ( I believe we found it
> here,
> > or nearby)
> >
> > Any suggestions how we should go about fixing this ???
> > I believe (off the top of my head) that we are running Redhat
> libxcb-1.9.?
>
> which error message? Which test drawing program? Any more information than
> "there is an error message when we close our application"?
>
> Cheers,
> Uli
> --
> <alanc> I think someone had a Xprint version of glxgears at one point,
> but benchmarking how many GL pages you can print per second
> was deemed too silly to merge
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20150526/3c15e4e0/attachment.html>
More information about the Xcb
mailing list