[Xcb] [Bug 26545] xcb_io.c: extension error handler is not called

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 14 13:26:45 PDT 2010


Jamey Sharp <jamey at minilop.net> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Jamey Sharp <jamey at minilop.net> 2010-04-14 13:26:41 PDT ---
(In reply to comment #5)
> From the documentation of XESetError: "Inside Xlib, there are times that you
> may want to suppress the calling of the external error handling when an error
> occurs. This allows status to be returned on a call at the cost of the call
> being synchronous (though most such routines are query operations, in any case,
> and are typically programmed to be synchronous). When Xlib detects a protocol
> error in _XReply(), it calls your procedure ..."

Thanks for digging up that note. It sounds pretty clear, even if it is insane.
So I've pushed the rest of the fix for this bug, and made the behavior match
what Xlib --without-xcb does, and what this documentation says it should do.

> If I take that literally it means that I should force my call to be synchronous
> in order to be able to suppress errors.

Have you considered using an async reply handler, instead? Those are consulted
in _XError, regardless of how the error was discovered. You'd want to enqueue
your handler only when issuing the request that might fail, and dequeue it when
it's called on a later sequence number. A bit tricky, but feasible.

Alternatively, of course, you could use XCB directly for this request. ;-)

> I really don't know what the original intentions of Xlib designers have been.

Everyone I've talked to who worked on Xlib over the years says Xlib wasn't
designed, it was just accreted. :-/

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the Xcb mailing list