Debugging Qt - Only Qt and Windows functions/dlls in the stack trace
Just wondering, sometimes when I do something wrong within a Qt derived class (like a data model which inherits from QAbstractTableModel) I don't see any of my own functions in the stack trace. So far I just put breakpoints in the code to see how far it gets and then I find the bugs when reading the code. Causes may be deletes to pointers pointing to nowhere or uninitialized objects being used. However I wonder if there is a way to get meaningful debug information?
I guess this might be dependent on the OS and IDE. I have seen it with msvc 2005. Typically something went completely wrong. My assumption is that the debugger does have only limited capability to trace back.
thx for the quick answer :)
bq. Typically something went completely wrong.
Yes of course, most of the crashes were because of something rather obviously stupid I overlooked when coding. I have VS 2008 here and wonder if I can adjust the trace back capacity..
Unfortunately I do not know the cure, but let's see, if someoneelse has. At least it is also in the newer version of msvc.
In some cases I have seen it, it is presumably not possible at all, because the haywired pointer error messed up everything. :-(
I guess you have checked already some ms fora for a solution?
bq. I guess you have checked already some ms fora for a solution?
Well I checked stackoverflow.com. So if you are debugging on a Mac or Linux with gdb and type bt you will get always a useful stack trace? I have to point out, that in my case we develop extensions for an already existing application. Qt and the extension are loaded via dll into another program. Because of this I think the call stack is even larger, than it would be for a "normal" Qt app.