Results 1 to 4 of 4

Thread: Program crashes with assert error in xcb_lock.c

  1. #1
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Program crashes with assert error in xcb_lock.c

    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 :

    Qt Code:
    1. kpar2: xcb_lock.c:33: _XCBUnlockDisplay: Assertion `xcb_get_request_sent(dpy->xcb->connection) == dpy->request' failed.
    2. KCrash: Application 'kpar2' crashing...
    To copy to clipboard, switch view to plain text mode 

    The backtrace is as follows :

    Qt Code:
    1. (no debugging symbols found)
    2. Using host libthread_db library "/lib/libthread_db.so.1".
    3. (no debugging symbols found)
    4. (no debugging symbols found)
    5. (no debugging symbols found)
    6. (no debugging symbols found)
    7. (no debugging symbols found)
    8. (no debugging symbols found)
    9. (no debugging symbols found)
    10. [Thread debugging using libthread_db enabled]
    11. [New Thread 0xb5fd4910 (LWP 28365)]
    12. [New Thread 0xb58feb90 (LWP 28367)]
    13. (no debugging symbols found)
    14. (no debugging symbols found)
    15. (no debugging symbols found)
    16. (no debugging symbols found)
    17. (no debugging symbols found)
    18. (no debugging symbols found)
    19. (no debugging symbols found)
    20. (no debugging symbols found)
    21. (no debugging symbols found)
    22. (no debugging symbols found)
    23. (no debugging symbols found)
    24. (no debugging symbols found)
    25. (no debugging symbols found)
    26. (no debugging symbols found)
    27. (no debugging symbols found)
    28. (no debugging symbols found)
    29. (no debugging symbols found)
    30. (no debugging symbols found)
    31. (no debugging symbols found)
    32. (no debugging symbols found)
    33. (no debugging symbols found)
    34. (no debugging symbols found)
    35. (no debugging symbols found)
    36. (no debugging symbols found)
    37. (no debugging symbols found)
    38. (no debugging symbols found)
    39. (no debugging symbols found)
    40. (no debugging symbols found)
    41. (no debugging symbols found)
    42. (no debugging symbols found)
    43. (no debugging symbols found)
    44. (no debugging symbols found)
    45. (no debugging symbols found)
    46. (no debugging symbols found)
    47. (no debugging symbols found)
    48. (no debugging symbols found)
    49. (no debugging symbols found)
    50. (no debugging symbols found)
    51. (no debugging symbols found)
    52. (no debugging symbols found)
    53. (no debugging symbols found)
    54. (no debugging symbols found)
    55. (no debugging symbols found)
    56. (no debugging symbols found)
    57. (no debugging symbols found)
    58. (no debugging symbols found)
    59. (no debugging symbols found)
    60. (no debugging symbols found)
    61. (no debugging symbols found)
    62. (no debugging symbols found)
    63. [KCrash handler]
    64. #6 0xb7f65410 in __kernel_vsyscall ()
    65. #7 0xb7393dc5 in raise () from /lib/libc.so.6
    66. #8 0xb73956a1 in abort () from /lib/libc.so.6
    67. #9 0xb738d11e in __assert_fail () from /lib/libc.so.6
    68. #10 0xb778bc14 in _XGetXCBBuffer () from /usr/lib/libX11.so.6
    69. #11 0xb778cec3 in _XSend () from /usr/lib/libX11.so.6
    70. #12 0xb778d028 in _XEventsQueued () from /usr/lib/libX11.so.6
    71. #13 0xb7776662 in XPending () from /usr/lib/libX11.so.6
    72. #14 0xb7a3902a in QEventLoop::processEvents () from /opt/qt/lib/libqt-mt.so.3
    73. #15 0xb7a9f180 in QEventLoop::enterLoop () from /opt/qt/lib/libqt-mt.so.3
    74. #16 0xb7a9f016 in QEventLoop::exec () from /opt/qt/lib/libqt-mt.so.3
    75. #17 0xb7a885ef in QApplication::exec () from /opt/qt/lib/libqt-mt.so.3
    76. #18 0x08051756 in main ()
    To copy to clipboard, switch view to plain text mode 

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Program crashes with assert error in xcb_lock.c

    Quote Originally Posted by Valheru View Post
    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.

  3. The following user says thank you to jacek for this useful post:

    Valheru (18th November 2007)

  4. #3
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Program crashes with assert error in xcb_lock.c

    Thanks. Switching to Qt4 isn't an option since I'm using Qt3 for this program so I'll implement a custom event.

  5. #4
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Program crashes with assert error in xcb_lock.c

    Thanks a lot jacek, that fixed the problem.

Similar Threads

  1. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 05:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.