Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Memory dump on exit
Qt 6.11 is out! See what's new in the release blog

Memory dump on exit

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fluca1978
    wrote on last edited by
    #1

    Hi,
    my program is working, but I guess I've got a dangling pointer or something like that since when I quit the application the following dump is produced on the console:

    @*** glibc detected *** /sviluppo/c/WHR-build-desktop/WHR: corrupted double-linked list: 0x0000000001f60720 ***
    ======= Backtrace: =========
    /lib/libc.so.6(+0x774b6)[0x7f4bb51204b6]
    /lib/libc.so.6(+0x7a921)[0x7f4bb5123921]
    /lib/libc.so.6(cfree+0x73)[0x7f4bb5126c83]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(+0x68a96d)[0x7f4bb692296d]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(+0x68b11b)[0x7f4bb692311b]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN7QObjectD2Ev+0x54c)[0x7f4bb5f7bccc]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN7QWidgetD2Ev+0x33b)[0x7f4bb64e79fb]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN7QTabBarD0Ev+0x21)[0x7f4bb6919b51]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN14QObjectPrivate14deleteChildrenEv+0x7f)[0x7f4bb5f745bf]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN7QWidgetD2Ev+0x278)[0x7f4bb64e7938]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN10QTabWidgetD0Ev+0x21)[0x7f4bb6923881]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN14QObjectPrivate14deleteChildrenEv+0x7f)[0x7f4bb5f745bf]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN7QWidgetD2Ev+0x278)[0x7f4bb64e7938]
    /sviluppo/c/WHR-build-desktop/WHR[0x41da53]
    /sviluppo/c/WHR-build-desktop/WHR[0x420ad1]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x3b8)[0x7f4bb5f74468]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x4f)[0x7f4bb64e1e9f]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xac)[0x7f4bb648c39c]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x14d)[0x7f4bb6492bdd]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8c)[0x7f4bb5f623bc]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x323)[0x7f4bb5f65383]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(+0x1a6e93)[0x7f4bb5f8ee93]
    /lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f2)[0x7f4bb389e342]
    /lib/libglib-2.0.so.0(+0x442a8)[0x7f4bb38a22a8]
    /lib/libglib-2.0.so.0(g_main_context_iteration+0x6c)[0x7f4bb38a245c]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x73)[0x7f4bb5f8e9d3]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtGui.so.4(+0x2a76fe)[0x7f4bb653f6fe]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x32)[0x7f4bb5f610e2]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xdc)[0x7f4bb5f614cc]
    /usr/local/Trolltech/Qt-4.7.4/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xbb)[0x7f4bb5f655bb]
    /sviluppo/c/WHR-build-desktop/WHR[0x409f60]
    /lib/libc.so.6(__libc_start_main+0xfe)[0x7f4bb50c7d8e]
    /sviluppo/c/WHR-build-desktop/WHR[0x409e39]
    @

    The point is, how can I find where the problem is?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      First step would be to build in debug mode and run the application through the debugger. This way you get a backtrace that brings you to the line that causes the trouble.

      On first sight, the memory corruption looks like an object that is deleted twice.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hostel
        wrote on last edited by
        #3

        You can also use a valgrind - tool for investigating leaks. You can also try a cppcheck - this tool is for static code analize.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved