Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to Handle Random Crashes In Application



  • Hello Friends And Qt Experts
    My Application Randomly Crash At Any Time I Don't Know How To Handle This Kind Of Crashes

    :: Crashes Like ::
    ________________________________________________________________

    FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_VCRUNTIME140.dll!memcmp
    STACK_TEXT:
    00000077bf7fe568 00007ff7ef2dcc10 : 00000212513497a0 0000021251baa2f0 000002124b449468 000002124f8875e0 : VCRUNTIME140!memcmp+0x30
    00000077bf7fe570 00007ff7ef41b5b9 : 0000000000000000 0000007700000000 0000000000000000 00000212513497a0 : MyApplication+0xcc10
    00000077bf7ff990 00007ff7ef600ff7 : 000002124f44c6b0 000002125075ee60 000002124f44c6b0 00007fff0e24fde6 : MyApplication!QtRPT::trUtf8+0xccfe9
    00000077bf7ffbf0 00007ffeb7ea3b17 : 000002125075ee70 000002125075ee60 0000000000000000 0000000000000000 : MyApplication!QtRPT::trUtf8+0x2b2a27
    00000077bf7ffc50 00007ffeb7e9fa6f : 00000212513497a0 0000021251554550 0000000000000000 0000000000000000 : Qt5Core!QThreadPoolPrivate::reset+0x1a7
    00000077bf7ffce0 00007fff0f237034 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : Qt5Core!QThread::start+0x36f
    00000077bf7ffd20 00007fff1063d241 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : kernel32!BaseThreadInitThunk+0x14
    00000077bf7ffd50 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : ntdll!RtlUserThreadStart+0x21
    ________________________________________________________________

    FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_MyApplication.exe!Unknown
    STACK_TEXT:
    000000b3bfd4a4f0 00007ff7ef2e14e9 : 0000000000030000 0000000000000000 000001f4e7dd1760 0000000000000000 : MyApplication+0x3f75
    000000b3bfd4a520 00007ff7ef4c5cc4 : 000001f4e7ac6a40 0000000000000000 000000b3bfd4a738 000001f4e7ac6630 : MyApplication+0x114e9
    000000b3bfd4a6a0 00007ff7ef5de394 : 000000000000008c 000001f4e4212ac0 00007ffeba6ce388 000001f4e7dd10a0 : MyApplication!QtRPT::trUtf8+0x1776f4
    000000b3bfd4a720 00007ff7ef6e68e3 : 00007ffeba6ce388 000000000000008c 000000b3bfd4a910 00007ffeba406148 : MyApplication!QtRPT::trUtf8+0x28fdc4
    000000b3bfd4a7a0 00007ffeba306364 : 00007ffeba6ce388 000000b3bfd4a889 000001f4e6492260 0000007f0000014b : MyApplication!RptCrossTabObject::visibleRowCount+0xd733
    000000b3bfd4a7d0 00007ffeba7eb07a : 000001f4e5d3bf40 000001f400000007 000001f4e5dd5af0 000000b3bfd4a910 : Qt5Core!QMetaObject::activate+0x614
    000000b3bfd4a8f0 00007ffeba7eaf16 : 000001f4e5dd5af0 0000000000000003 0000000000000003 000000b3bfd4a980 : Qt5Widgets!QAbstractSlider::setValue+0x12a
    000000b3bfd4a960 00007ffeba8817c5 : 0000000000000014 000000b300000003 000001f4e5d3bf40 0000000000000003 : Qt5Widgets!QAbstractSlider::setSliderPosition+0x96
    000000b3bfd4a9a0 00007ffeba73d620 : 0000001000000039 00007ffeba700000 0000001000000039 000001f4e5d3bf40 : Qt5Widgets!QScrollBar::mouseMoveEvent+0x1a5
    000000b3bfd4aab0 00007ffeba718f30 : 000001f4dfb558a0 000001f4e5d3bf40 000001f4e5d3bf40 000000b3bfd4b810 : Qt5Widgets!QWidget::event+0xb0
    000000b3bfd4ac90 00007ffeba716c11 : 000000b3bfd4b810 000000b3bfd4adc0 000000b3bfd4b810 000001f4dfb558a0 : Qt5Widgets!QApplicationPrivate::notify_helper+0x140
    000000b3bfd4acc0 00007ffeba2e5729 : 00000000ffffffff 000000b3bfd4b810 0000000000000000 000001f4dfb25740 : Qt5Widgets!QApplication::notify+0x8c1
    000000b3bfd4b3e0 00007ffeba71a412 : 4044800000000000 405b000000000000 00000000ffffffff 0000000000000000 : Qt5Core!QCoreApplication::notifyInternal2+0xb9
    000000b3bfd4b460 00007ffeba765d59 : 000001f4e5d3bf40 000000b3bfd4c4a0 000000b3bfd4c400 000000b3bfd4b644 : Qt5Widgets!QApplicationPrivate::sendMouseEvent+0x332
    000000b3bfd4b560 00007ffeba76374e : 000001f4dfb934f0 000001f4dfb1ddb0 000001f4e7dceee0 000001f4e7dceee0 : Qt5Widgets!QSizePolicy::QSizePolicy+0x3099
    000000b3bfd4b940 00007ffeba718f30 : 000001f4e7dceee0 000001f4dfb558a0 000001f4e7dceee0 000000b3bfd4c470 : Qt5Widgets!QSizePolicy::QSizePolicy+0xa8e
    000000b3bfd4b9a0 00007ffeba717e6d : 000001f4dfb558a0 000000b3bfd4bad0 000000b3bfd4c470 000001f4dfb558a0 : Qt5Widgets!QApplicationPrivate::notify_helper+0x140
    000000b3bfd4b9d0 00007ffeba2e5729 : 000001f4e7dceee0 000000b3bfd4c470 000001f4e7a96650 000001f4dfb25740 : Qt5Widgets!QApplication::notify+0x1b1d
    000000b3bfd4c0f0 00007ffeb9965bd1 : 0000000000000005 000001f4e7d6e000 000001f4e7dceee0 0000000000000008 : Qt5Core!QCoreApplication::notifyInternal2+0xb9
    000000b3bfd4c170 00007ffeb9952234 : 00007ffeb9efd3f0 000001f4e7d6e000 00007ffeb9efd3f0 0000000000000001 : Qt5Gui!QGuiApplicationPrivate::processMouseEvent+0x801
    000000b3bfd4c5f0 00007ffeba331c76 : 0000000000000024 00007ffeb9efd3f0 0000000000000000 000001f4dfb61e40 : Qt5Gui!QWindowSystemInterface::sendWindowSystemEvents+0xa4
    000000b3bfd4c620 00007fff101ee858 : 0000000000000000 0000000000000001 0000000000000001 0000000000000000 : Qt5Core!QEventDispatcherWin32::processEvents+0xd46
    000000b3bfd4c750 00007fff101ee299 : 0000000000003dff 00007ffeba3318a0 0000000000211854 000001f400000401 : user32!UserCallWinProcCheckWow+0x2f8
    000000b3bfd4c8e0 00007ffeba331466 : 00007ffeba3318a0 000001f4dfb61f01 000001f4dfb61e40 0000000000000000 : user32!DispatchMessageWorker+0x249
    000000b3bfd4c960 00007ffeb936de89 : 0000000000000000 000001f400000024 000000b3bfd4fb00 000000b300000000 : Qt5Core!QEventDispatcherWin32::processEvents+0x536
    000000b3bfd4fae0 00007ffeba2e15e3 : 000001f4dfb558a0 000001f400000014 000001f4dfbbc2d0 000001f4dfb25740 : qwindows!qt_plugin_query_metadata+0x1d79
    000000b3bfd4fb10 00007ffeba2e4394 : 000001f4dfb08630 000001f400000000 000001f4dfb25740 000001f4dfb45d00 : Qt5Core!QEventLoop::exec+0x1b3
    000000b3bfd4fb90 00007ff7ef359856 : 000000b3bfd4fc28 000001f4dfb55c00 000000b3bfd4fc28 0000000000000000 : Qt5Core!QCoreApplication::exec+0x144
    000000b3bfd4fc00 00007ff7ef6eb637 : 0000000000000001 0000000000000000 000001f4dfb88350 000001f4dfb25750 : MyApplication!QtRPT::trUtf8+0xb286
    000000b3bfd4fd60 00007ff7ef6eac9f : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : MyApplication!QtRPT::printXLSX+0x287
    000000b3bfd4fdf0 00007fff0f237034 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : MyApplication!QtRPT::setValueImage+0x2b3f
    000000b3bfd4fe30 00007fff1063d241 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : kernel32!BaseThreadInitThunk+0x14
    000000b3bfd4fe60 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : ntdll!RtlUserThreadStart+0x21

    ________________________________________________________________
    And Many More ....

    Please Help me to solve to my problem

    Thanks in advance


  • Lifetime Qt Champion

    Hi,

    Looks like you have a pointer issue.

    Did you check them in your application ?
    Are you doing some multi-threading ?



  • @SGaist

    Yes
    My Application Is Multi Threading Based


  • Lifetime Qt Champion

    Then the first thing to do is to check your ressources access especially if you are sharing them across threads.



  • @Ketan__Patel__0011 said in How to Handle Random Crashes In Application:

    RptCrossTabObject::visibleRowCount

    Check this function probably array out of bound access is happening



  • @SGaist said in How to Handle Random Crashes In Application:

    Then the first thing to do is to check your ressources access especially if you are sharing them across threads.

    Yes I am using or sharing my UI components in my thread functions


  • Lifetime Qt Champion

    @Ketan__Patel__0011 said in How to Handle Random Crashes In Application:

    Yes I am using or sharing my UI components in my thread functions

    You must not modify the GUI outside the main thread!


Log in to reply