runtime error, program terminating in 'unusual' way

Started by
6 comments, last by Agony 18 years, 6 months ago
I'm writing a program in C++ and I've started to get the following error when I run the program. This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. This error message started right after I added a constructor to a class I'm writing, but it's not a very helpful message... Anyone have any ideas what I should be looking for? Also, I compiled the program in linux and it compiles and runs fine for me in linux with no errors at all... so I think it's a windows issue of some sort.
Advertisement
Probably a memory error of some kind (by which I mean you accessing invalid memory). What happens when you run it through a debugger?

Enigma
I just ran it through a debugger, something that I admit I am not too familiar with, and it's telling me that "program exited with code 03" which I believe is a memory related issue, judging by what I dug up on Google.

What compiler/debugger are you using.
I'm writing the program using Dev C++ 4.9.9.2.

Using GNU Debugger 5.2.1-1 that was packaged for Dev C++
The compiler is gcc-g++ ver 3.4.2



There should be a window with the call stack in the debugger section. The call stack will tell you what function failed. Trace the list backward until you see a function you wrote. That should tell you where the error is ocurring.
I've seen this error message appear when an uncaught exception ends up terminating your program. Not sure if this applies only to C++ exceptions or if Win32 structured exceptions are also included.
I was checking the return codes defined in WinNT.h, and STATUS_BREAKPOINT was defined as 0x80000003, and is one that I have encountered often enough. It tends to occur deep within standard library code, when the library detects that something is messed up. Often this seems to be caused by overwriting memory accidentally (buffer overflows, using deleted pointers, etcetera). It's essentially a breakpoint that is hardcoded into the library that under normal circumstances should never get excecuted.

I don't know if this is what your debugger is referring to when it says 03, though. Just my best guess. VC++6 will actually stop execution and show you the line of code where the error occurred, though it is almost always in assembly code. You do get to look at the call stack, however, and see which function called a standard library function, which ultimately led to this problem. That is often very useful information. I don't know if your debugger could easily provide such information, and if so, how, but I would think that it is quite likely capable of it. Going into debug mode on an assembly break point instruction and being able to view the call stack both seem to me to be very important things for a debugger to support.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke

This topic is closed to new replies.

Advertisement