[Xcb] xcb-render-util crashs

Ian Osgood iano at quirkster.com
Mon Nov 17 08:17:17 PST 2008

On Nov 17, 2008, at 4:59 AM, Julien Danjou wrote:

> At 1225356671 time_t, Julien Danjou wrote:
>> I've discovered that cairo crashes on X server not supporting RENDER.
>> (in this case, vnc4server).
>> In fact as soon as xcb-render-util sends a query version requests,
>> xcb_connection_t get erroneous, so everything crash then.
>> The affected code is in cache.c:find_or_create_display()
>> 152     version_cookie = xcb_render_query_version(c, 0, 10);
>> 153     formats_cookie = xcb_render_query_pict_formats(c);
>> 154     xcb_flush(c);
>> when xcb_render_util_query_version(c) is called.
>> I've no real clue how to correctly fix that, and I'd appreciate a  
>> hint.
>> I wonder if this is really normal[1] and if
>> xcb_render_util_query_version should simply chek for extension  
>> presence
>> before.
>> [1] Well I know I had the same problem in awesome with Xinerama,  
>> and I
>> do check for extension presence before asking for version.
> Any one?
> -- 
> Julien Danjou
> // ᐰ <julien at danjou.info>   http://julien.danjou.info
> // 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD

Sorry, I thought you had answered your own question with [1].

Don't call any Render protocol, such as anything in render-util,  
until you verify its presence on the server as you did with Xinerama.

This is a difference in behavior compared to libXrender, which does  
XInitExtension internally. I think the strategy Jamey used when he  
ported utility libraries from Xlib was to separate extension  
initialization from extension usage. An XCB program should batch  
initialize and verify all required extensions soon after connection  
setup in order to minimize latency.


More information about the Xcb mailing list