Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-5369

Mixed QML/C++-Debugging: Debugging "hangs" when hitting a C++ breakpoint by source line for which a location correction triggers during startup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 2.3.0
    • Fix Version/s: None
    • Component/s: Debugger
    • Labels:
    • Environment:
      Windows 7, 64 bit
      using
      MS VC 2010 Express (x86) compiler
      Debugging Tools for Windows (64 bit)

      Qt version: 4.7.4
    • Commits:
      58faedc4e56a871828c88ebb72b57f1d46afde85

      Description

      Steps to reproduce:

      • Create mixed QML/C++ , set BP on empty line in main.cpp
      • Run into breakpoint: Debugger stops, state is not set correctly (all icons disabled)

      Note: Seems to be related to startup situation, see attached (debug.log).

      Reproduced with CDB, g++, Linux, windows.

      Debugging cannot be done when setting a breakpoint directly on the main().
      This only happens when the QML debugging is enabled.

      The buttons (and also the menu items) for "step over", "step in" and so on aren't enabled, so debugger seems to hang

      Actually I only can use a work-around for that:
      1. on the Application Output: attach debugger to this process
      2. now you can press either "step in" or "step over" (no matter which one) - then this process seems to hang too
      3. now go to Menubar->Debug->Abort Debugging and "normal" debugging should work

      CDB debugger output:

      sStarting debugger 'QmlCppEngine' for ABI 'x86-windows-msvc2010-pe-32bit'...
      dStart parameters: 'damn' mode: 1
      dABI: x86-windows-msvc2010-pe-32bit
      dExecutable: C:\Testing\Tutorials\damn-build-desktop-Qt_aus_PATH_Debug\debug\damn.exe "-qmljsdebugger=port:3768,block"
      dDirectory: C:\Testing\Tutorials\damn-build-desktop-Qt_aus_PATH_Debug
      dDebugger: C:\Program Files\Debugging Tools For Windows (x64)\cdb.exe
      dProject: C:\Testing\Tutorials\damn (built: C:\Testing\Tutorials\damn-build-desktop-Qt_aus_PATH_Debug)
      dQt: C:\repos\qt
      dQML server: 127.0.0.1:3768
      d
      dDebugger settings: 
      dUseAlternatingRowColours: false  (default: false)
      dFontSizeFollowsEditor: false  (default: false)
      dUseMessageBoxForSignals: true  (default: true)
      dAutoQuit: false  (default: false)
      dLogTimeStamps: false  (default: false)
      dVerboseLog: false  (default: false)
      dCloseBuffersOnExit: false  (default: false)
      dSwitchModeOnExit: false  (default: false)
      dUseDebuggingHelper: true  (default: true)
      dUseCodeModel: true  (default: true)
      dShowThreadNames: false  (default: false)
      dUseToolTips: true  (default: false)  ***
      dUseToolTipsInLocalsView: false  (default: false)
      dUseToolTipsInBreakpointsView: true  (default: false)  ***
      dUseAddressInBreakpointsView: false  (default: false)
      dUseAddressInStackView: false  (default: false)
      dRegisterForPostMortem: false  (default: false)
      dLoadGdbInit: true  (default: true)
      dScriptFile:   (default: )
      dWatchdogTimeout: 20  (default: 20)
      dTargetAsync: false  (default: false)
      dMaximalStackDepth: 20  (default: 20)
      dAlwaysAdjustStackColumnWidths: false  (default: false)
      dShowStandardNamespace: true  (default: true)
      dShowQtNamespace: true  (default: true)
      dSortStructMembers: true  (default: true)
      dAutoDerefPointers: true  (default: true)
      dAlwaysAdjustLocalsColumnWidths: false  (default: false)
      dListSourceFiles: false  (default: false)
      dSkipKnownFrames: false  (default: false)
      dEnableReverseDebugging: false  (default: false)
      dAllPluginBreakpoints: true  (default: true)
      dSelectedPluginBreakpoints: false  (default: false)
      dAdjustBreakpointLocations: true  (default: true)
      dAlwaysAdjustBreakpointsColumnWidths: false  (default: false)
      dNoPluginBreakpoints: false  (default: false)
      dSelectedPluginBreakpointsPattern: .*  (default: .*)
      dBreakOnThrow: false  (default: false)
      dBreakOnCatch: false  (default: false)
      dBreakOnWarning: false  (default: false)
      dAlwaysAdjustRegistersColumnWidths: false  (default: false)
      dAlwaysAdjustSnapshotsColumnWidths: false  (default: false)
      dAlwaysAdjustThreadsColumnWidths: false  (default: false)
      dAlwaysAdjustModulesColumnWidths: false  (default: false)
      dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
      dQUEUE: SETUP ENGINE
      dCALL: SETUP ENGINE
      dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
      dQUEUE: SETUP ENGINE
      dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
      dQUEUE: SETUP ENGINE
      dCALL: SETUP ENGINE
      dNOTE: ENGINE SETUP OK
      dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
      dQUEUE: SETUP INFERIOR
      dCALL: SETUP ENGINE
       Launching C:\Program Files\Debugging Tools For Windows (x64)\cdb.exe -aqtcreatorcdbext.dll -lines -G -c .idle_cmd !qtcreatorcdbext.idle -y symsrv*symsrv.dll*C:\Users\chris\AppData\Local\Temp\symbolcache*http://msdl.microsoft.com/download/symbols C:\Testing\Tutorials\damn-build-desktop-Qt_aus_PATH_Debug\debug\damn.exe "-qmljsdebugger=port:3768,block"
       using C:\Testing\Qt\qtcreator-2.2.81\lib\qtcreatorcdbext64\qtcreatorcdbext.dll of 29.06.2011 09:56:58.
       C:\Program Files\Debugging Tools For Windows (x64)\cdb.exe running as 4160
       Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
       Copyright (c) Microsoft Corporation. All rights reserved.
       CommandLine: C:\Testing\Tutorials\damn-build-desktop-Qt_aus_PATH_Debug\debug\damn.exe "-qmljsdebugger=port:3768,block"
       Symbol search path is: symsrv*symsrv.dll*C:\Users\chris\AppData\Local\Temp\symbolcache*http://msdl.microsoft.com/download/symbols
       Executable search path is: 
       ModLoad: 00000000`00c20000 00000000`00c8e000   damn.exe
       ModLoad: 00000000`77c20000 00000000`77dc9000   ntdll.dll
       ModLoad: 00000000`77e00000 00000000`77f80000   ntdll32.dll
       ModLoad: 00000000`74400000 00000000`7443f000   C:\Windows\SYSTEM32\wow64.dll
       ModLoad: 00000000`743a0000 00000000`743fc000   C:\Windows\SYSTEM32\wow64win.dll
       ModLoad: 00000000`74390000 00000000`74398000   C:\Windows\SYSTEM32\wow64cpu.dll
       (f54.1390): Break instruction exception - code 80000003 (first chance)
       ntdll!LdrpDoDebuggerBreak+0x30:
       00000000`77cccb60 cc              int     3
       cdb: Reading initial command '.idle_cmd !qtcreatorcdbext.idle'
       Execute when idle: !qtcreatorcdbext.idle
       0:000>
      <l+t
      <l+s
      dNOTE: ENGINE SETUP OK
      dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
      dNOTE: ENGINE SETUP OK
      dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
      dQUEUE: SETUP INFERIOR
      dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
      dQUEUE: SETUP INFERIOR
      dQUEUE: SETUP INFERIOR
      dCALL: SETUP INFERIOR
      dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
      dQUEUE: SETUP INFERIOR
      dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
      dQUEUE: SETUP INFERIOR
      dCALL: SETUP INFERIOR
      dNOTE: INFERIOR SETUP OK
      dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6).
      dCALL: SETUP INFERIOR
      <bu3 `damn!C:\Testing\Tutorials\damn\main.cpp:6`
      <!qtcreatorcdbext.breakpoints -t 0 -v
      <sxn 0x4000001f
      <.asm source_line
      <!qtcreatorcdbext.pid -t 1
      dATTEMPT SYNC
      dJSDebugger sending BREAKPOINTS []
       Source options are 1:
            1/t - Step/trace by source line
       Source options are 5:
            1/t - Step/trace by source line
            4/s - List source code at prompt
       Obtained breakpoint 0x18d624 (#3), at 0xc21125, module: 'damn'
       All breakpoints have been resolved.
       
       Assembly options: source_line
       Qt Creator CDB extension version 0.1 64 bit built Jun 29 2011.
      dTaking notice of pid 3924
      dNOTE: INFERIOR SETUP OK
      dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6).
      dNOTE: INFERIOR SETUP OK
      dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6).
      dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
      dQUEUE: RUN ENGINE
      dCALL: RUN ENGINE
      dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
      dQUEUE: RUN ENGINE
      dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
      dQUEUE: RUN ENGINE
      dCALL: RUN ENGINE
      dCALL: RUN ENGINE
      <g
      dNOTE: ENGINE RUN AND INFERIOR RUN OK
      dState changed from EngineRunRequested(7) to InferiorRunOk(11).
       ModLoad: 00000000`77a00000 00000000`77b1f000   WOW64_IMAGE_SECTION
       ModLoad: 00000000`76300000 00000000`76410000   WOW64_IMAGE_SECTION
       ModLoad: 00000000`77a00000 00000000`77b1f000   NOT_AN_IMAGE
       ModLoad: 00000000`77b20000 00000000`77c1a000   NOT_AN_IMAGE
       ModLoad: 00000000`76300000 00000000`76410000   C:\Windows\syswow64\kernel32.dll
       ModLoad: 00000000`77270000 00000000`772b6000   C:\Windows\syswow64\KERNELBASE.dll
       ModLoad: 00000000`61930000 00000000`61e02000   C:\repos\qt\lib\QtDeclaratived4.dll
       ModLoad: 00000000`61690000 00000000`61924000   C:\repos\qt\lib\QtScriptd4.dll
       ModLoad: 00000000`752d0000 00000000`75302000   C:\Windows\SysWOW64\WINMM.dll
       ModLoad: 00000000`77690000 00000000`7773c000   C:\Windows\syswow64\msvcrt.dll
       ModLoad: 00000000`770f0000 00000000`771f0000   C:\Windows\syswow64\USER32.dll
       ModLoad: 00000000`761c0000 00000000`76250000   C:\Windows\syswow64\GDI32.dll
       ModLoad: 00000000`75b60000 00000000`75b6a000   C:\Windows\syswow64\LPK.dll
       ModLoad: 00000000`777a0000 00000000`7783d000   C:\Windows\syswow64\USP10.dll
       ModLoad: 00000000`75ab0000 00000000`75b50000   C:\Windows\syswow64\ADVAPI32.dll
       ModLoad: 00000000`75f10000 00000000`75f29000   C:\Windows\SysWOW64\sechost.dll
       ModLoad: 00000000`759c0000 00000000`75ab0000   C:\Windows\syswow64\RPCRT4.dll
       ModLoad: 00000000`75960000 00000000`759c0000   C:\Windows\syswow64\SspiCli.dll
       ModLoad: 00000000`75950000 00000000`7595c000   C:\Windows\syswow64\CRYPTBASE.dll
       ModLoad: 00000000`61290000 00000000`61681000   C:\repos\qt\lib\QtCored4.dll
       ModLoad: 00000000`75f90000 00000000`760ec000   C:\Windows\syswow64\ole32.dll
       ModLoad: 00000000`75d20000 00000000`75d55000   C:\Windows\syswow64\WS2_32.dll
       ModLoad: 00000000`75b50000 00000000`75b56000   C:\Windows\syswow64\NSI.dll
       ModLoad: 00000000`64580000 00000000`64637000   C:\Windows\SysWOW64\MSVCP100D.dll
       ModLoad: 00000000`62e00000 00000000`62f72000   C:\Windows\SysWOW64\MSVCR100D.dll
       ModLoad: 00000000`64520000 00000000`64576000   C:\repos\qt\lib\QtSqld4.dll
       ModLoad: 00000000`60cf0000 00000000`61290000   C:\repos\qt\lib\QtXmlPatternsd4.dll
       ModLoad: 00000000`60b80000 00000000`60cea000   C:\repos\qt\lib\QtNetworkd4.dll
       ModLoad: 00000000`5c950000 00000000`5d72e000   C:\repos\qt\lib\QtGuid4.dll
       ModLoad: 00000000`771f0000 00000000`7726b000   C:\Windows\syswow64\COMDLG32.dll
       ModLoad: 00000000`76250000 00000000`762a7000   C:\Windows\syswow64\SHLWAPI.dll
       ModLoad: 00000000`755e0000 00000000`7577e000   C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
       ModLoad: 00000000`764a0000 00000000`770ea000   C:\Windows\syswow64\SHELL32.dll
       ModLoad: 00000000`75e80000 00000000`75f0f000   C:\Windows\syswow64\OLEAUT32.dll
       ModLoad: 00000000`77740000 00000000`777a0000   C:\Windows\syswow64\IMM32.dll
       ModLoad: 00000000`760f0000 00000000`761bc000   C:\Windows\syswow64\MSCTF.dll
       ModLoad: 00000000`742e0000 00000000`74331000   C:\Windows\SysWOW64\WINSPOOL.DRV
       (f54.1390): WOW64 breakpoint - code 4000001f (first chance)
      s
      sException at 0x77ea0f3b, code: 0x4000001f: Win32 x86 emulation subsystem breakpoint hit, flags=0x0 in ntdll32!LdrpDoDebuggerBreak
       Breakpoint 3 hit
       >    6:     QApplication app(argc, argv);
       damn!main+0x25:
           6 00c21125 6804070400      push    40704h
      sStopped at breakpoint 3 (3) in thread 0.
      dNOTE: INFERIOR SPONTANEOUS STOP
      dState changed from InferiorRunOk(11) to InferiorStopOk(14).
      <!qtcreatorcdbext.locals -t 2 -D -c -W 0
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              cjanssen Christiaan Janssen (Inactive)
              Reporter:
              cstenger Christian Stenger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes