Comment 2 for bug 1015292

Revision history for this message
Ricardo Salveti (rsalveti) wrote : Re: Snowshoe fails with QT5 with a segmentation fault while starting the application

The seg fault cause:

Breakpoint 1, QXcbConnection::initializeXFixes (this=0x1fbc88) at qxcbconnection.cpp:1042
1042 {
(gdb) l
1037 xcb_get_input_focus_cookie_t cookie = Q_XCB_CALL(xcb_get_input_focus(xcb_connection()));
1038 free(xcb_get_input_focus_reply(xcb_connection(), cookie, 0));
1039 }
1040
1041 void QXcbConnection::initializeXFixes()
1042 {
1043 xcb_generic_error_t *error = 0;
1044 const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_xfixes_id);
1045 xfixes_first_event = reply->first_event;
1046
(gdb) n
[Thread 0xb10b0460 (LWP 8635) exited]
1044 const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_xfixes_id);
(gdb) p m_connection
$1 = (xcb_connection_t *) 0x1fc9b0
(gdb) p xcb_xfixes_id
$2 = {name = 0xb2433b28 "XFIXES", global_id = 2}
(gdb) n
1045 xfixes_first_event = reply->first_event;
(gdb) p reply
$3 = (const xcb_query_extension_reply_t *) 0x0

Qt expects the first call to 'xcb_get_extension_data' to return a valid pointer, but in this case it's just returning NULL, breaking it up later on.