Qt Forum

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

    [Solved] Application does not crash when required to!

    General and Desktop
    3
    3
    995
    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.
    • CAD_coding
      CAD_coding last edited by

      Hi,
      I am having serious problems with my application developed with Qt 4.8.1 on Win7 64 bit M/c with the default MinGw 32 bit compiler.
      When I run in Debug or Release mode the application does not crash for obvious bugs (one nasty one was when I was delete ing an array even though its memory was not allocated).
      I have observed that at random it shows me bugs for code which I had developed a month ago. When I solve that bug then it shows bug for much older code.
      I think Qt somehow corrects the bugs internally with its MOC but that's irritating me because the application only shows the most recent bugs & only when those bugs are solved it shows much older bugs than that. Hence I have to revisit the code of which I dont remember much.
      So I wanted to ask whether there was any option/flag which when specified the Application would run very strictly & crash at the smallest of bug.

      I am irritated because I done know how many bugs are hiding behind the many months of work that I have done on my Application.
      Thank You.

      1 Reply Last reply Reply Quote 0
      • G
        goblincoding last edited by

        Qt definitely does not solve any bugs automatically...although that would be a phenomenal feature! ;)

        If you're new to development, it often happens that fixing a bug uncovers other issues you were unaware of or even introduces new ones. That's the whole point of regression testing.

        Without code to review, there isn't much more to say. However, please remember that there are many instances where errors in C++ code cause undefined behaviour. Although this often results in the application crashing, it doesn't always (hence the undefined).

        You could set your compiler warning flag to its highest possible setting. That will not expose flaws in your logic, but is useful in finding uninitialised variables, etc (often the cause of weird behaviour).

        http://www.goblincoding.com

        1 Reply Last reply Reply Quote 0
        • sierdzio
          sierdzio Moderators last edited by

          Switching to clang can also increase the amount of useful warnings you will get.

          In the end, though, just like goblincoding said - most probably the errors were there all the time, only you are uncovering them one by one as you fix other stuff. That happens :) The prose of coding life. Using unit/ regression testing and taking care to write solid code are the way to go.

          (Z(:^

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