我試圖調試一個C + + Qt5程序,但我無法,大多數時候崩潰退出時(從shell啓動時)。段錯誤不會發生在調試器中既不valgrind
從valgrind或gdb/lldb啓動時,它不會崩潰。
我已經嘗試生成一個coredump,然後加載,但結果是無奈,只有一個幀在bt
。
實際的代碼託管在github。
Valgrind的輸出:
$ valgrind --tool=memcheck ./build/qsubber
==27761== Memcheck, a memory error detector
==27761== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==27761== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==27761== Command: ./build/qsubber
==27761==
==27761== Conditional jump or move depends on uninitialised value(s)
==27761== at 0x15D790FA: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.28)
==27761== by 0x9733523: ??? (in /usr/lib/libgobject-2.0.so.0.4400.1)
==27761== by 0x974CF96: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.4400.1)
==27761== by 0x974DE39: g_signal_emit_by_name (in /usr/lib/libgobject-2.0.so.0.4400.1)
==27761== by 0x973AC2A: g_object_set_valist (in /usr/lib/libgobject-2.0.so.0.4400.1)
==27761== by 0x973B4BB: g_object_set (in /usr/lib/libgobject-2.0.so.0.4400.1)
==27761== by 0x636ECC5: ??? (in /usr/lib/libQt5Widgets.so.5.5.0)
==27761== by 0x62F264C: QStyleFactory::create(QString const&) (in /usr/lib/libQt5Widgets.so.5.5.0)
==27761== by 0x628B704: QApplication::style() (in /usr/lib/libQt5Widgets.so.5.5.0)
==27761== by 0x628BACC: QApplicationPrivate::initialize() (in /usr/lib/libQt5Widgets.so.5.5.0)
==27761== by 0x628BB1E: QApplicationPrivate::construct() (in /usr/lib/libQt5Widgets.so.5.5.0)
==27761== by 0x413DFC: main (main.cc:34)
==27761==
Token: bp5tqvuocvv993496ppnds1j91
Status: 200 OK
==27761==
==27761== HEAP SUMMARY:
==27761== in use at exit: 6,490,962 bytes in 30,293 blocks
==27761== total heap usage: 167,918 allocs, 137,625 frees, 19,981,839 bytes allocated
==27761==
==27761== LEAK SUMMARY:
==27761== definitely lost: 5,152 bytes in 32 blocks
==27761== indirectly lost: 21,255 bytes in 779 blocks
==27761== possibly lost: 3,977,133 bytes in 7,134 blocks
==27761== still reachable: 2,305,790 bytes in 21,486 blocks
==27761== suppressed: 0 bytes in 0 blocks
==27761== Rerun with --leak-check=full to see details of leaked memory
==27761==
==27761== For counts of detected and suppressed errors, rerun with: -v
==27761== Use --track-origins=yes to see where uninitialised values come from
==27761== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
更新 我不要求調試代碼對我來說,我需要幫助在這種情況下進行調試,我已經搜查了很多,發現了一些問題,SO /答案,但直到現在沒有任何幫助,所以創建了這個問題。
請發佈[MCVE](http://stackoverflow.com/help/mcve)。 –
對不起,這個網站不是衆包的「調試我的項目」服務 –
@MattMcNabb我不是要求爲我調試它,我正在尋求幫助如何在這種情況下調試,我給我當前的應用程序作爲例。我搜索了很多,但沒有發現幫助我解決這個問題。 –