Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Debugger reports stl container size and contents wrong, reports objects as null, etc

    General and Desktop
    1
    1
    57
    Loading More Posts
    • 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.
    • T
      Tyler Shellberg last edited by Tyler Shellberg

      I am using QTCreator 4.7.2 on Fedora 29.

      I am working on a C++ library, built for C++11, using qtCreator.

      I cannot get the debugger to behave. Here is a short list of what I have encountered:

      • Debugger incorrectly reports STL container as empty, even when it has contents. A simple printout confirms the contents are normal.
      • Debugger reports STL container has (random massive value in the millions to billions) of entries, all of which are randomly shuffled duplicates of the same 3-4 valid entries. Again, iterating over them and printing them shows normal results.
      • Debugger reports the object (this) as null ([0]). A check with == nullptr shows it isn't.

      As well, sometimes the debugger will jump to the end of a loop before entering a loop, which I've gotten used to but is confusing to others.

      I cannot work like this.

      I have gone through the .pri file, and made sure to set -g, -ggdb, and -g3 just in case to make sure all debugging symbols are made. (I tried just -g, or just -g3, no luck either). I also made sure to set the optimization level to 0 (-O0) and just in case qtCreator was getting strange, I made sure to disable -O, -O2, -O3 explicitly.

      Is there something I am missing? Is the version of QTCreator I am using just bugged? I cannot use another, it's not an option for what I am working on. Is there some option, or some setting that I could be missing that could cause this to fail?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post