Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Application does not crash when required to!

[Solved] Application does not crash when required to!

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.1k Views
  • 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_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on last edited by
    #1

    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
    0
    • G Offline
      G Offline
      goblincoding
      wrote on last edited by
      #2

      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
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved