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

Regression: Can't debug "this" variable in class that exists in a separate thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.4.0-beta1
    • Qt Creator 4.3.0
    • Debugger
    • None
    • This is on Window 7 Professional, 64-bit. The project I'm building is built on Qt 5.3.2, MinGW 4.8.2 (see buildKit.png) for kit details

      Ubuntu 16.04 64bit, Qt5.6, gdb7.11
    • 2cacf24b18eaf10c771046979ddb71924e864061

    Description

      I recently updated to Qt Creator 4.3.0, and when debugging an existing project, when I set a breakpoint in a class that runs in a separate thread from the UI thread, I'm unable to debug the "this" variable when the debugger breaks. This behavior worked with the same project in Qt Creator 4.2.1. I've attached some files that show the problem:

      • breakpointHit_4_2_1.png - shows what I see in Qt Creator 4.2.1 when the breakpoint is hit
      • thisExpanded_4_2_1.png - shows what I see in Qt Creator 4.2.1 after expanding the "this" variable. I'm able to see all the member variables of this class
      • breakpointHit_4_3_0.png - shows what I see in Qt Creator 4.3.0 when the same breakpoint is hit, which shows that "this" has a valid address of 0x326f41f0
      • thisExpanded_4_3_0.png - shows what I see in Qt Creator 4.3.0 after expanding the "this" variable. I'm not able to see any of the member variables of the "this" object, and the address has suddenly changed to <not accessible>

      My actual application functions properly when run in either version of Qt Creator, I just can't debug it properly.

       

      I think the fact that the class lives in a separate thread might have something to do with the issue. If I set a breakpoint in mainwindow.cpp for example, I am able to expand the "this" variable using either version of Qt Creator and debug member variables of the MainWindow class. But when I set a breakpoint in the class that is running in a separate thread, I'm unable to expand that class' "this" variable and take a look at the member variables when running Qt Creator 4.3.0. Under Qt Creator 4.2.1 it works fine

      Attachments

        1. breakpointHit_4_2_1.png
          breakpointHit_4_2_1.png
          92 kB
        2. breakpointHit_4_3_0.png
          breakpointHit_4_3_0.png
          97 kB
        3. buildKit.png
          buildKit.png
          95 kB
        4. QtCreator_4_2_1.png
          QtCreator_4_2_1.png
          32 kB
        5. QtCreator_4_3_0.png
          QtCreator_4_3_0.png
          39 kB
        6. thisExpanded_4_2_1.png
          thisExpanded_4_2_1.png
          109 kB
        7. thisExpanded_4_3_0.png
          thisExpanded_4_3_0.png
          98 kB

        Activity

          People

            hjk hjk
            smurphy Sean Murphy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: