c++crash

How to reduce the crash of the C++ program


I have a big software implemented by C++, built by VC10 SP1. There are more than 15 millions of source code lines. It is delivered to Windows platform, both win32 and x64. From the crash reports, the mean time to crash is only about 40 minutes.

I want to try the best to reduce the crash and extend the mean time to crash. Can somebody share what you have done in practice or is there any suggestion? Any comment is appreciated.

Thanks,

Jeffrey


Solution

  • This is called debugging, or the Art of Hunting Bugs.

    There are many ways to improve Software Quality.

    During the Design Phase:

    During the Early Life:

    The whole lot can be run on instrumented code (for example, with STL Debugging activated, with specific debugging memory allocators, with monitoring tools/debuggers hooked up).

    Note: Unit/Fuzzy Testing are more easily applicable if the application is in multiple components, as the goal is to test as small units as possible.

    Note: do not forget to extend the test suite when you implement new functionalities or fix bugs to prevent regression.

    During the Life:

    It's up to you to foster quality.

    FYI: the software I work on runs 24h/7d and when we have a crash once or twice a week, we consider we screwed up; 45min is definitely wrong.