Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED] Debugger constantly stops in qglobal#qVersion()
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Debugger constantly stops in qglobal#qVersion()

Scheduled Pinned Locked Moved Qt Creator and other tools
debugthread
8 Posts 2 Posters 3.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Henning Bredel
    wrote on 30 Jul 2015, 08:01 last edited by Henning Bredel 8 Jun 2015, 11:38
    #1

    Hey there,

    when debugging via qtcreator (v3.4.2) the debugger (gdb from Qt5.2.1) stops at qglobal qVersion() after each step once it stopped at the first breakpoint. Pressing F5 to go to the next breakpoint does not help.

    Opening the Threads Tab of the breakpoint view, I can see an ntdll!RtEnableEarlyCriticalSectionEventCreation calling qVersion.

    This is quite annoying and I do not understand why debugger stops at that location having no breakpoint. I did not find any configuration in the debugger properties which may causing this behaviour.

    Any idea? What would you help to help?

    Please advice. Much appreciated!

    Thanks

    Henning

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on 30 Jul 2015, 08:19 last edited by
      #2

      Hi and welcome to devnet

      Do you see another popup window indicating a problem?

      When you have encountered a problem in debugger you cannot simply continue assume that the debugger will handle this. The same message and stop will come up repeatbly. That would explain the debhaviour as you describe.

      Vote the answer(s) that helped you to solve your issue(s)

      H 1 Reply Last reply 30 Jul 2015, 08:23
      0
      • K koahnig
        30 Jul 2015, 08:19

        Hi and welcome to devnet

        Do you see another popup window indicating a problem?

        When you have encountered a problem in debugger you cannot simply continue assume that the debugger will handle this. The same message and stop will come up repeatbly. That would explain the debhaviour as you describe.

        H Offline
        H Offline
        Henning Bredel
        wrote on 30 Jul 2015, 08:23 last edited by
        #3

        @koahnig thanks for welcoming :)

        No, unfortunately there is no info indicating a problem at all. Any idea what I could check else?

        Cheers

        /h

        1 Reply Last reply
        0
        • H Offline
          H Offline
          Henning Bredel
          wrote on 30 Jul 2015, 12:36 last edited by
          #4

          One thing I noticed:

          The problem only occurs when stepping in a function call (pressing F11) ... After that, it occurs on all debug step actions.

          When I step over (F10) it is working, but forces me to set breakpoints at exactly the right place.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on 30 Jul 2015, 12:46 last edited by
            #5

            Does the problem also occur on small "Hello world" programs?
            What the OS?
            What compiler and version are you using?

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • H Offline
              H Offline
              Henning Bredel
              wrote on 31 Jul 2015, 09:09 last edited by Henning Bredel
              #6

              Hmm, it does not occur (of course) ...

              I tried to step to the location in code where lots of initialization stuff is going on, and now it works again!

              However, now the debugger stops at QCoreApplication app(argc, argv); each time I start the application. Don't ask why. At least this is a location which is reached just once and I could leave with it.

              On the other hand, I still don't understand why the debugger once in a while stops somewhere in code where no breakpoint exist. If tomorrow it would stop anywhere else in code I may have the same problem as in the beginning ...

              Versions:

              • qt: v5.1.2
              • qtcreator: v3.4.2
              • g++/gdb: mingw48_32
              • OS: Windows7 64bit Professional, SP1
              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on 31 Jul 2015, 10:03 last edited by
                #7

                I have a similar setup on win7, but I am using newer Qt libs 5.4.1,
                Independent of Qt lib versions the debugger stops once at the beginning, but sometimes it doesn't. Also sometimes it has breakpoints but those are not marked in the debugger. Hitting F9 once at such a location does not change anything. Hitting F9 again shows the breakpoint bullet on the left. Therefore, I think this has to do with my multiple sessions I am using. Those session are using parts of the same code, which I think is the explanation. This seems to confuse the debugger setup.

                Anyway you problem seems different. If you do not see the problem with a simple hello world program or with one of the examples, it has something to do with your code. Rerunning qmake in creator and doing a complete rebuild is sometimes helping.
                Otherwise it may have its origin in some static initializations of your code.
                Also you may want to consider updating to newer version of Qt.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  Henning Bredel
                  wrote on 6 Aug 2015, 11:37 last edited by
                  #8

                  @koahnig actually the project is using lots of locally compiled libs so a "quick" recompiling is not a possible solution to try out (qt uses different compiler with version newer than v5.2).

                  However, once getting back to my problem I tested some debug config checkboxes and it turned out that the debug helpers were the "problem". Turning off showing thread names did not cause the debugger to stop deep in qt code several times anymore.

                  In the end it is a pity not understanding what is going on when ticking that config option, though I am glad getting back to debugging now!

                  1 Reply Last reply
                  0

                  1/8

                  30 Jul 2015, 08:01

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved