Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Debugging Qt - Only Qt and Windows functions/dlls in the stack trace

    General and Desktop
    2
    5
    3356
    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.
    • J
      jc-denton last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • K
        koahnig last edited by

        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.

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

        1 Reply Last reply Reply Quote 0
        • J
          jc-denton last edited by

          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..

          1 Reply Last reply Reply Quote 0
          • K
            koahnig last edited by

            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?

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

            1 Reply Last reply Reply Quote 0
            • J
              jc-denton last edited by

              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.

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