Unsolved Debugger reports stl container size and contents wrong, reports objects as null, etc
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 (). 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?