Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am confused by a problem that may look stupid
my application run well at first
but sometime passed
it crashed with the c++ runtime error
i check almost everything in my code
got nothing

i want to know is there any tools that can help me find where caused the c++ runtime error

may be my question look so stupid

sorry for bother anyone
thank you advance
Posted
Comments
OriginalGriff 10-Nov-13 7:39am    
What error? Was there a message?
pasztorpisti 10-Nov-13 8:33am    
Run the program from a debugger. In that case the runtime error will give you the chance to convert the runtime error into a breakpoint. If the program crashes only in release builds then your job will be more difficult depending on the code generation/optimization settings you used to compile the program.
Sergey Alexandrovich Kryukov 10-Nov-13 12:08pm    
As this is C++, this should be exception, not "run-time error". Learn exception handling, and yes, just use the debugger.
—SA

1 solution

It looks like some pointer mess. At first compile with Warning Level 4. Check all messages, avoid type cast stuff. Initialize all vars.

Run a debug build or release build with debug information and run it in the normal shell. Try to locate the error: in which parts of the code ist happening.

Look through your pointer code. Use ASSERT and others checks. Use Debugview. At last can can write a log to narrow the bug

Good luck ;-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900