Strange debugger behaviour - CDB, Windows 7 x32 Qt Creator 2.7.0 MSVC 2010 32-bit I am unable to debug any Qt GUI Application. The sample application is: ============================= main.cpp ========================== #include "mainwindow.h" #include int main(int argc, char *argv[]) { int i=0; // BREAKPOOINT HERE <---- for(int i=0;i<4;++i) { i+=3; } QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); } ================================================================= Generate new empty Qt GUI application and edit Main.cpp to look like this (just added some C loop to test if I can debug BEFORE Qapplication, and I am!) What I did: Attempt 1: Hit Debug. CDB starts... and fastly stops on the line QApplication a(argc, argv); Continue, step, nothing works! Attempt 2: Set a breakpoint to int i=0; Hit Debug. CDB starts and hits the breakpoint. Step, step, step... all okay step till QApplication a(argc, argv); and it traps here, in "KiFastSystemCallRet" at ntdll I can't jump and can't even past after the QApplication line - it's just trapped! I can't debug my project anymore. ======================= THE CALL STACK ======================= 0 KiFastSystemCallRet ntdll 0x77d87094 1 ZwUnmapViewOfSection ntdll 0x77d869c4 2 LdrpUnloadDll ntdll 0x77d627fc 3 LdrUnloadDll ntdll 0x77d9c8b8 4 FreeLibrary KERNELBASE 0x76158be4 5 QTimer::isSingleShot Qt5Cored 0x5aceefc3 6 QTimer::isSingleShot Qt5Cored 0x5aceee18 7 QTimer::isSingleShot Qt5Cored 0x5ace63b9 8 QTimer::isSingleShot Qt5Cored 0x5ace5d6b 9 QCss::StyleSelector::selectorMatches Qt5Guid 0x5c961b36 10 QCss::StyleSelector::selectorMatches Qt5Guid 0x5c961a94 11 QCss::StyleSelector::selectorMatches Qt5Guid 0x5c96dd66 12 QCss::StyleSelector::selectorMatches Qt5Guid 0x5c96dcbe 13 QCss::StyleSelector::selectorMatches Qt5Guid 0x5c96e8ca 14 QWidget::normalGeometry Qt5Widgetsd 0x5d6d5030 15 QTimer::isSingleShot Qt5Cored 0x5acf7f78 16 QTimer::isSingleShot Qt5Cored 0x5acf7dbc 17 QCss::StyleSelector::selectorMatches Qt5Guid 0x5c96cd94 18 QWidget::normalGeometry Qt5Widgetsd 0x5d65b7bc 19 main main.cpp 11 0x131205 20 WinMain qtmain_win.cpp 131 0x1335aa 21 __tmainCRTStartup crtexe.c 547 0x132ae0 22 WinMainCRTStartup crtexe.c 371 0x13286f 23 BaseThreadInitThunk kernel32 0x77bfed6c 24 __RtlUserThreadStart ntdll 0x77da377b 25 _RtlUserThreadStart ntdll 0x77da374e ======================= THE CDB LOG ======================= /* note that these s/d in the beginning of the lines are placed by the Copy operation! */ =========================================================== sStarting debugger "CdbEngine" for ABI "x86-windows-msvc2010-pe-32bit"... dStart parameters: 'untitled1' mode: 1 dABI: x86-windows-msvc2010-pe-32bit dLanguages: c++ dExecutable: P:\CPP\build-untitled1-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug\debug\untitled1 dDirectory: P:\CPP\build-untitled1-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug dDebugger: C:\Program Files\Debugging Tools for Windows (x86)\cdb.exe dProject: P:\CPP\untitled1 (built: P:\CPP\build-untitled1-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug) dQML server: 127.0.0.1:3768 dRemote: :0 dSysroot: dDebug Source Location: /usr/src/debug/qt5base/src/corelib:/usr/src/debug/qt5base/src/gui:/usr/src/debug/qt5base/src/network:/usr/src/debug/qt5base/src/v8:/usr/src/debug/qt5declarative/src/qml dSymbol file: dDumper libraries: P:\Qt\Qt5.0.2\5.0.2\msvc2010\\qtc-debugging-helper\ P:\Qt\Qt5.0.2\Tools\QtCreator\qtc-debugging-helper\2254931821\ C:\Users\Pesho\AppData\Local\QtProject\QtCreator\qtc-debugging-helper\2254931821\ dDebugger settings: dCloseBuffersOnExit: false (default: false) dRegisterForPostMortem: false (default: false) dLoadGdbInit: true (default: true) dUseAddressInBreakpointsView: false (default: false) dUseAddressInStackView: true (default: false) *** dUseToolTipsInBreakpointsView: false (default: false) dUseToolTips: true (default: false) *** dUseToolTipsInLocalsView: true (default: false) *** dTargetAsync: false (default: false) dWarnOnReleaseBuilds: true (default: true) dAutoEnrichParameters: false (default: true) *** dUseDynamicType: true (default: true) dGdbPostAttachCommands: (default: ) dWatchdogTimeout: 20 (default: 20) dAttemptQuickStart: false (default: false) dGdbStartupCommands: (default: ) dShowStandardNamespace: true (default: true) dShowQtNamespace: true (default: true) dAlwaysAdjustStackColumnWidths: false (default: false) dMaximalStackDepth: 20 (default: 20) dMultiInferior: false (default: false) dIntelFlavor: false (default: false) dEnableReverseDebugging: false (default: false) dListSourceFiles: false (default: false) dSkipKnownFrames: true (default: false) *** dAlwaysAdjustLocalsColumnWidths: false (default: false) dMaximalStringLength: 10000 (default: 10000) dSortStructMembers: true (default: true) dAutoDerefPointers: true (default: true) dBreakOnThrow: false (default: false) dBreakOnCatch: false (default: false) dNoPluginBreakpoints: false (default: false) dSelectedPluginBreakpointsPattern: .* (default: .*) dAdjustBreakpointLocations: true (default: true) dAlwaysAdjustBreakpointsColumnWidths: false (default: false) dAllPluginBreakpoints: true (default: true) dSelectedPluginBreakpoints: false (default: false) dAlwaysAdjustModulesColumnWidths: false (default: false) dShowQmlObjectTree: false (default: true) *** dAlwaysAdjustSnapshotsColumnWidths: false (default: false) dAlwaysAdjustThreadsColumnWidths: false (default: false) dBreakOnAbort: true (default: false) *** dAlwaysAdjustRegistersColumnWidths: false (default: false) dBreakOnWarning: false (default: false) dBreakOnFatal: true (default: false) *** dLogTimeStamps: false (default: false) dVerboseLog: false (default: false) dAutoQuit: false (default: false) dFontSizeFollowsEditor: false (default: false) dUseMessageBoxForSignals: true (default: true) dUseAlternatingRowColours: true (default: false) *** dUseCodeModel: true (default: true) dShowThreadNames: true (default: false) *** dQmlInspector.ShowAppOnTop: false (default: false) dRaiseOnInterrupt: true (default: true) dQmlInspector.FromQml: false (default: false) dUseDebuggingHelper: true (default: true) dSwitchModeOnExit: true (default: false) *** dBreakpointsFullPath: false (default: false) dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master] dQUEUE: SETUP ENGINE dCALL: SETUP ENGINE Launching C:\Program Files\Debugging Tools for Windows (x86)\cdb.exe -aqtcreatorcdbext.dll -lines -G -c .idle_cmd !qtcreatorcdbext.idle -y http://msdl.microsoft.com/download/symbols P:\CPP\build-untitled1-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug\debug\untitled1 using P:\Qt\Qt5.0.2\Tools\QtCreator\lib\qtcreatorcdbext32\qtcreatorcdbext.dll of 31.5.2013 ã. 19:08:47 ÷.. C:\Program Files\Debugging Tools for Windows (x86)\cdb.exe running as 5292 Microsoft (R) Windows Debugger Version 6.12.0002.633 X86 Copyright (c) Microsoft Corporation. All rights reserved. CommandLine: P:\CPP\build-untitled1-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug\debug\untitled1 Symbol search path is: http://msdl.microsoft.com/download/symbols Executable search path is: ModLoad: 01160000 01171000 untitled1.exe ModLoad: 77d40000 77e7c000 ntdll.dll ModLoad: 77bb0000 77c84000 C:\Windows\system32\kernel32.dll ModLoad: 76150000 7619b000 C:\Windows\system32\KERNELBASE.dll ModLoad: 5d6b0000 5de1c000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\Qt5Widgetsd.dll ModLoad: 76f60000 77baa000 C:\Windows\system32\SHELL32.dll ModLoad: 77c90000 77d3c000 C:\Windows\system32\msvcrt.dll ModLoad: 76570000 765c7000 C:\Windows\system32\SHLWAPI.dll ModLoad: 763b0000 763fe000 C:\Windows\system32\GDI32.dll ModLoad: 768f0000 769b9000 C:\Windows\system32\USER32.dll ModLoad: 765d0000 765da000 C:\Windows\system32\LPK.dll ModLoad: 77eb0000 77f4d000 C:\Windows\system32\USP10.dll ModLoad: 5d160000 5d6ab000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\Qt5Guid.dll ModLoad: 5cbf0000 5ce48000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\libGLESv2d.dll ModLoad: 5c9e0000 5cbe7000 C:\Windows\system32\D3DCOMPILER_43.dll ModLoad: 56be0000 56c97000 C:\Windows\system32\MSVCP100D.dll ModLoad: 569b0000 56b22000 C:\Windows\system32\MSVCR100D.dll ModLoad: 5c300000 5c9d7000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\Qt5Cored.dll ModLoad: 76e00000 76f5c000 C:\Windows\system32\ole32.dll ModLoad: 76600000 766a1000 C:\Windows\system32\RPCRT4.dll ModLoad: 764d0000 76570000 C:\Windows\system32\ADVAPI32.dll ModLoad: 77f50000 77f69000 C:\Windows\SYSTEM32\sechost.dll ModLoad: 76370000 763a5000 C:\Windows\system32\WS2_32.dll ModLoad: 77e80000 77e86000 C:\Windows\system32\NSI.dll ModLoad: 4a900000 4aa49000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\icuin49.dll ModLoad: 00290000 00397000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\icuuc49.dll ModLoad: 554e0000 56602000 P:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\icudt49.dll ModLoad: 6ba00000 6babf000 C:\Windows\system32\MSVCR100.dll ModLoad: 6b8d0000 6b939000 C:\Windows\system32\MSVCP100.dll (1588.a48): Break instruction exception - code 80000003 (first chance) eax=00000000 ebx=00000000 ecx=0028f950 edx=77d87094 esi=fffffffe edi=00000000 eip=77de054e esp=0028f96c ebp=0028f998 iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!LdrpDoDebuggerBreak+0x2c: 77de054e cc int 3 cdb: Reading initial command '.idle_cmd !qtcreatorcdbext.idle' Execute when idle: !qtcreatorcdbext.idle 0:000> " dNOTE: ENGINE RUN AND INFERIOR RUN OK sRunning. dState changed from EngineRunRequested(7) to InferiorRunOk(11) [master] ModLoad: 765e0000 765ff000 C:\Windows\system32\IMM32.DLL ModLoad: 76400000 764cc000 C:\Windows\system32\MSCTF.dll ModLoad: 75e50000 75e5c000 C:\Windows\system32\cryptbase.dll Breakpoint 1001 hit eax=0028fcec ebx=7ffd5000 ecx=00000001 edx=008a6258 esi=00000000 edi=00000000 eip=011611c5 esp=0028fcb8 ebp=0028fcf8 iopl=0 nv up ei pl nz na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 > 6: int i=0; untitled1!main+0x25: 6 011611c5 c745cc00000000 mov dword ptr [ebp-34h],0 ss:0023:0028fcc4=01163881 sStopped at breakpoint 1 (1) in thread 0. dNOTE: INFERIOR SPONTANEOUS STOP sStopped. dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master] 7: for(int i=0;i<4;++i) untitled1!main+0x2c: 7 011611cc c745c800000000 mov dword ptr [ebp-38h],0 ss:0023:0028fcc0=0028fcd4 sStopped: "unknown" dNOTE: INFERIOR SPONTANEOUS STOP sStopped. dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master] 9: i+=3; untitled1!main+0x44: 9 011611e4 8b4dc8 mov ecx,dword ptr [ebp-38h] ss:0023:0028fcc0=00000000 sStopped: "unknown" dNOTE: INFERIOR SPONTANEOUS STOP sStopped. dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master] 10: } untitled1!main+0x4d: 10 011611ed ebe6 jmp untitled1!main+0x35 (011611d5) sStopped: "unknown" dNOTE: INFERIOR SPONTANEOUS STOP sStopped. dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master] 7: for(int i=0;i<4;++i) untitled1!main+0x35: 7 011611d5 8b45c8 mov eax,dword ptr [ebp-38h] ss:0023:0028fcc0=00000003 sStopped: "unknown" dNOTE: INFERIOR SPONTANEOUS STOP sStopped. dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master] 11: QApplication a(argc, argv); untitled1!main+0x4f: 11 011611ef 6802000500 push 50002h sStopped: "unknown" dNOTE: INFERIOR SPONTANEOUS STOP sStopped. dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master]