Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / General Programming / common causes for runtime errors? Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

April 25, 2005, 11:03 PM

I am working on a game engine that is becoming fairly complex. I recently switched from the ODE physics library to the True Axis library. I now get the error, "This application has requested the runtime to terminate it in an unusual way," etc... I have other working programs that use the True Axis library, so it can't be the library. I am using mingw gcc 3.42 with dev-c++. What are common causes of such errors, and how would you go about debugging such a problem?


April 25, 2005, 11:09 PM

Memory corruption is a likely one. If you were using MSVC I'd suggest sprinkling your code with _CrtCheckMemory calls, but I think that is a microsoft-only thing. Perhaps GCC has something similiar, though - or you could try using a third-party memory manager, there are several that are useful for debugging.

Another possibility is trying to read past the end of an array, which doesn't create memory corruption but can cause an invalid page fault if the memory you're trying to read hasn't been allocated.


April 26, 2005, 12:35 AM

The libary or smth else throws an exception. Try to catch it with the try, catch block.

Chad Austin

April 26, 2005, 01:00 AM

Or just use a debugger and get a stack trace if you can.

This thread contains 4 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.