Results 1 to 8 of 8

Thread: KDevelop + QT + GDB = Application received SIGTRAP

  1. #1
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default KDevelop + QT + GDB = Application received SIGTRAP

    Hi there!
    I migrated from Kubuntu to Arch Linux a few days ago and I got back to work on some of my projects.
    I'm programming an application which uses QT 4.3.3 with KDevelop and it runs
    just fine but when I try to debug it I always get an error message saying
    "Program received signal SIGTRAP" and after that the debugger (gdb) stops responding
    without giving any further error messages. I don't think it's an application source problem
    since on KUbuntu I could debug everything without any problem.

    I noticed that if I start gdb from the command line to do the same operations
    the program flows without problems but if I use kdevelop or kdbg I got the errors.
    Why doesn't gdb work in Kdevelop? Do I have to configure something?
    Thx for your help

    PS. The program in built in debug mode.

    PS2. Here is the error taken from the gdb window in kdevelop
    Program received signal SIGTRAP, Trace/breakpoint trap.
    0xb7f67d81 in malloc () from /lib/ld-linux.so.2
    The program being debugged was signaled while in a function called from GDB.
    GDB remains in the frame where the signal was received.
    To change this behavior use "set unwindonsignal on"
    Evaluation of the expression containing the function (malloc) will be abandoned.
    Sorry for Bad English!

  2. #2
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    In the attachment there is the complete gdb output as seen in Kdevelop and here is the backtrace after the error
    Qt Code:
    1. #0 0xb7fd32de in __i686.get_pc_thunk.bx () from /lib/ld-linux.so.2
    2. #1 0xb7fd1d89 in malloc () from /lib/ld-linux.so.2
    3. #2 <function called from gdb>
    4. #3 0xb7fd1d81 in malloc () from /lib/ld-linux.so.2
    5. #4 <function called from gdb>
    6. #5 0xb7fd1d81 in malloc () from /lib/ld-linux.so.2
    7. #6 <function called from gdb>
    8. #7 0xb7fd1d81 in malloc () from /lib/ld-linux.so.2
    9. #8 <function called from gdb>
    10. #9 CFDInventario::AvviaRicerca (this=0x816eaa0) at CFDInventario.cpp:132
    11. #10 0x08096f27 in CFDInventario::qt_metacall (this=0x816eaa0, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfb6846c) at moc_CFDInventario.cpp:71
    12. #11 0xb73a6616 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
    13. #12 0xb73a6950 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
    14. #13 0xb7cc8891 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
    15. #14 0xb7a7af59 in ?? () from /usr/lib/libQtGui.so.4
    16. #15 0xb7a7ccd0 in ?? () from /usr/lib/libQtGui.so.4
    17. #16 0xb7a7cf2b in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
    18. #17 0xb77cd58c in QWidget::event () from /usr/lib/libQtGui.so.4
    19. #18 0xb7a7bbbf in QAbstractButton::event () from /usr/lib/libQtGui.so.4
    20. #19 0xb7b15092 in QPushButton::event () from /usr/lib/libQtGui.so.4
    21. #20 0xb77829ed in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
    22. #21 0xb7785644 in QApplication::notify () from /usr/lib/libQtGui.so.4
    23. #22 0xb739380b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
    24. #23 0xb77e1ec2 in QETWidget::translateMouseEvent () from /usr/lib/libQtGui.so.4
    25. #24 0xb77e155a in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
    26. #25 0xb7805eb4 in ?? () from /usr/lib/libQtGui.so.4
    27. #26 0xb71e0f88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
    28. #27 0xb71e44eb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
    29. #28 0xb71e4668 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
    30. #29 0xb73b8762 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
    31. #30 0xb7805ce5 in ?? () from /usr/lib/libQtGui.so.4
    32. #31 0xb7392bf2 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
    33. #32 0xb7392cfa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
    34. #33 0xb7b8903a in QDialog::exec () from /usr/lib/libQtGui.so.4
    35. #34 0x0804fb90 in CFDListWindow::NuovoPersonaggio (this=0xbfb6a1e0) at CFDListWindow.cpp:55
    36. #35 0x08096bbd in CFDListWindow::qt_metacall (this=0xbfb6a1e0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfb695dc) at moc_CFDListWindow.cpp:64
    37. #36 0xb73a6616 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
    38. #37 0xb73a6950 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
    39. #38 0xb7cc8891 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
    40. #39 0xb7a7af59 in ?? () from /usr/lib/libQtGui.so.4
    41. #40 0xb7a7ccd0 in ?? () from /usr/lib/libQtGui.so.4
    42. #41 0xb7a7cf2b in QAbstractButton::mouseReleaseEvent () from /usr/lib/libQtGui.so.4
    43. #42 0xb77cd58c in QWidget::event () from /usr/lib/libQtGui.so.4
    44. #43 0xb7a7bbbf in QAbstractButton::event () from /usr/lib/libQtGui.so.4
    45. #44 0xb7b15092 in QPushButton::event () from /usr/lib/libQtGui.so.4
    46. #45 0xb77829ed in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
    47. #46 0xb7785644 in QApplication::notify () from /usr/lib/libQtGui.so.4
    48. #47 0xb739380b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
    49. #48 0xb77e1ec2 in QETWidget::translateMouseEvent () from /usr/lib/libQtGui.so.4
    50. #49 0xb77e155a in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
    51. #50 0xb7805eb4 in ?? () from /usr/lib/libQtGui.so.4
    52. #51 0xb71e0f88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
    53. #52 0xb71e44eb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
    54. #53 0xb71e4668 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
    55. #54 0xb73b8762 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
    56. #55 0xb7805ce5 in ?? () from /usr/lib/libQtGui.so.4
    57. #56 0xb7392bf2 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
    58. #57 0xb7392cfa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
    59. #58 0xb73951fd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
    60. #59 0xb7781f67 in QApplication::exec () from /usr/lib/libQtGui.so.4
    61. #60 0x0804f318 in main (argc=1, argv=0xbfb6a2f4) at main.cpp:41
    To copy to clipboard, switch view to plain text mode 
    Attached Files Attached Files
    Sorry for Bad English!

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    SIGTRAP is not an error. It's a signal used by debuggers - they can't work without it. Your KDevelop or GDB must be misconfigured. GDB is telling you what you should do - "set unwindonsignal on", you probably need to set it in GDB's settings file.

  4. #4
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    Quote Originally Posted by wysota View Post
    SIGTRAP is not an error. It's a signal used by debuggers - they can't work without it. Your KDevelop or GDB must be misconfigured. GDB is telling you what you should do - "set unwindonsignal on", you probably need to set it in GDB's settings file.
    I already tried to "set unwindonsignal on" but after a few steps the program crashes. I also tried to install the latest GDB from source but no luck even this way.
    I read it could be a kernel issue. This evening I'll try to install the latest vanilla kernel and see what happens. However, how can I completely reset Kdevelop configuration? What files should I delete?

    And, I don't know if the problems are related, but if I try to compile a simple hello world application written in C++ Kdevelop hangs on "linking using libtool" and after that the CPU and memory loads explode and the whole system almost crashes. Any additional information from this behavior?
    Sorry for Bad English!

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    Quote Originally Posted by GodOfWar View Post
    I already tried to "set unwindonsignal on" but after a few steps the program crashes.
    Which program? KDevelop, GDB or your application?

  6. #6
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    Quote Originally Posted by wysota View Post
    Which program? KDevelop, GDB or your application?
    I've been imprecise.
    After a few steps over, the variables of the application assumes impossible values (in a just declared QString I found the error message "Application received the SIGTRAP signal"!!) and of course after a few operations my application doesn't behave as expected (I use that QString as a search string for a DB). I'm compiling the new kernel now.
    Sorry for Bad English!

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    What does the kernel have to do with it? Maybe your application's stack simply got messed up...

  8. #8
    Join Date
    Apr 2007
    Location
    Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop + QT + GDB = Application received SIGTRAP

    SOLVED.

    It seems that Arch Linux default kernel (I think it is 2.6.24-ARCH) is bugged or something because I just installed the new vanilla kernel 2.6.25 and everything works as expected.
    Thx for your help guys.
    Sorry for Bad English!

Similar Threads

  1. problem with indexes
    By MarkoSan in forum Qt Programming
    Replies: 5
    Last Post: 10th December 2007, 15:55
  2. Problem with SqLite and Qt
    By ad5xj in forum Newbie
    Replies: 26
    Last Post: 5th June 2007, 02:53
  3. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13

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.