PDA

View Full Version : Program crashes with assert error in xcb_lock.c



Valheru
18th November 2007, 18:15
From what I can tell, it seems to be a bug in Xorg, but the first mention I find of it is from about January 2007 - I am not entirely sure that it is not that I am doing something wrong.

It happens in a program I wrote this weekend to check PAR files. I initially had some code in the GUI thread to load and check the par files, but obviously got it out of there ASAP as it was causing the GUI to become unresponsive. So I put it in a QThread, but ever since I did that the program errors with the message :


kpar2: xcb_lock.c:33: _XCBUnlockDisplay: Assertion `xcb_get_request_sent(dpy->xcb->connection) == dpy->request' failed.
KCrash: Application 'kpar2' crashing...

The backtrace is as follows :


(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb5fd4910 (LWP 28365)]
[New Thread 0xb58feb90 (LWP 28367)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6 0xb7f65410 in __kernel_vsyscall ()
#7 0xb7393dc5 in raise () from /lib/libc.so.6
#8 0xb73956a1 in abort () from /lib/libc.so.6
#9 0xb738d11e in __assert_fail () from /lib/libc.so.6
#10 0xb778bc14 in _XGetXCBBuffer () from /usr/lib/libX11.so.6
#11 0xb778cec3 in _XSend () from /usr/lib/libX11.so.6
#12 0xb778d028 in _XEventsQueued () from /usr/lib/libX11.so.6
#13 0xb7776662 in XPending () from /usr/lib/libX11.so.6
#14 0xb7a3902a in QEventLoop::processEvents () from /opt/qt/lib/libqt-mt.so.3
#15 0xb7a9f180 in QEventLoop::enterLoop () from /opt/qt/lib/libqt-mt.so.3
#16 0xb7a9f016 in QEventLoop::exec () from /opt/qt/lib/libqt-mt.so.3
#17 0xb7a885ef in QApplication::exec () from /opt/qt/lib/libqt-mt.so.3
#18 0x08051756 in main ()

I have a QObject the lives in the QThreads run() that loads the files and emits signals that are connected to the GUI and add lines to a QTextEdit and update progress bars with info. The code is available via SVN at http://kpar2.googlecode.com/svn/trunk/ for viewing. I would appreciate it if someone else running KDE3 could compile it and see if it exhibits the same error when checking PAR2 files.

Thanks in advance.

jacek
18th November 2007, 18:27
I have a QObject the lives in the QThreads run() that loads the files and emits signals that are connected to the GUI and add lines to a QTextEdit and update progress bars with info.
In Qt3 you can't send signals across threads. Use custom events instead or switch to Qt4.

Valheru
18th November 2007, 18:57
Thanks. Switching to Qt4 isn't an option since I'm using Qt3 for this program so I'll implement a custom event.

Valheru
18th November 2007, 19:56
Thanks a lot jacek, that fixed the problem.