How to detect crash point in Qt Creator debugger

  • Hi all,

    i am using Qt creator 2.2.1 to develop a mobile application using Qt for symbian phones. The application is randomly crashing at some points when i try to on device debug the application. And whenever it crashes, it gives only one message SEGV fault and displays following on the screen:

    Disassembler (??)

    -----<qDebug() statements go here>----
    -----<qDebug() statements go here>----
    -----<qDebug() statements go here>----
    Could not load shared library symbols for 23 libraries, e.g. libm.dll.
    Use the "info sharedlibrary" command to see the complete listing.
    Do you need "set solib-search-path" or "set sysroot"?
    Debugging has finished

    In the upper half of the screen, it shows something like this:

    0x7d578768 add sp, #180 ; 0xb4
    0x7d57876a pop {r4, r5, r6, r7, pc}
    0x7d57876c push {r4, r5, r6, r7, lr}
    0x7d57876e movs r4, r0
    0x7d578770 movs r6, r1
    0x7d578772 ldr r5, [r1, #4]
    0x7d578774 sub sp, #92 ; 0x5c
    0x7d578776 ldr r0, [r5, #0]
    0x7d578778 adds r0, #255 ; 0xff
    0x7d57877a adds r0, #65 ; 0x41
    0x7d57877c ldr r2, [r0, #48] ; 0x30
    0x7d57877e movs r1, r5
    0x7d578780 add r0, sp, #12
    0x7d578782 blx r2
    0x7d578784 movs r0, r4
    0x7d578786 add r1, sp, #12
    0x7d578788 bl 0x7d62696c
    0x7d57878c movs r4, r0
    0x7d57878e add r0, sp, #12
    0x7d578790 bl 0x7d71f30c
    0x7d578794 movs r0, #5
    0x7d578796 lsls r0, r0, #7
    0x7d578798 adds r0, r6, r0
    0x7d57879a ldrb r0, [r0, #5]
    0x7d57879c movs r6, #1
    0x7d57879e cmp r0, #0
    0x7d5787a0 beq.n 0x7d5787a4
    0x7d5787a2 str r6, [r4, #80] ; 0x50
    0x7d5787a4 movs r1, r5
    0x7d5787a6 add r0, sp, #8
    0x7d5787a8 bl 0x7d5c507a
    0x7d5787ac movs r0, r4
    0x7d5787ae adds r0, #84 ; 0x54
    0x7d5787b0 movs r7, r0
    0x7d5787b2 add r1, sp, #8
    0x7d5787b4 blx 0x7d501640
    0x7d5787b8 movs r0, r7
    0x7d5787ba add r1, sp, #4
    0x7d5787bc str r6, [sp, #4]
    0x7d5787be blx 0x7d501648
    0x7d5787c2 str r5, [r4, #88] ; 0x58
    0x7d5787c4 add sp, #92 ; 0x5c
    0x7d5787c6 pop {r4, r5, r6, r7, pc}
    0x7d5787c8 push {r4, r5, r6, r7, lr}
    0x7d5787ca movs r4, r0
    0x7d5787cc movs r6, r2
    0x7d5787ce ldr r5, [r1, #4]
    0x7d5787d0 movs r1, r2
    0x7d5787d2 movs r0, r5
    0x7d5787d4 sub sp, #140 ; 0x8c
    0x7d5787d6 bl 0x7d72ba0e
    0x7d5787da cmp r0, #0
    0x7d5787dc beq.n 0x7d5787e8
    0x7d5787de movs r0, #255 ; 0xff

    The problem is that i cannot infer any information from these two screens. It does not point to the place where problem lies. Is there any other way we can find the near about place where problem lies? Please suggest something to get some useful information from the crash. I have not used the Qt-Creator too deep and that is why i don't know the exact tool i should use to find crashes in the app.


  • Moderators

    memory crashes can be very, very, very nasty because they seem to be random.
    If you are not experienced with such crashes the most easiest would probably to comment blocks of code away from your application until the crash is resolved. Then investigate what's wrong in the affected block.

    Hope it helps.

  • Thanks for the suggestion raven but i was actually looking for some qt tool for this. Something using which i could tace down the exact function in which the problem lies. Manually comment/uncomment the code i can do anyway.


  • Moderators

    depending on the crash this may not be possible ... there is nothing to reconstruct if the memory got corrupted. Otherwise the debugger would already do it.

  • yeah most of the time the app crashes, its the SEGMENTATION FAULT and i am helpless at that point. The calls show are like PUSH POP MOVS ADD etc. and they can't give any human understandable format. The screenshot at that point do not point to anything useful.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.