Sign in to follow this  
RenX99

runtime error, program terminating in 'unusual' way

Recommended Posts

RenX99    122
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.

Share this post


Link to post
Share on other sites
Enigma    1410
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

Share this post


Link to post
Share on other sites
RenX99    122
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.

Share this post


Link to post
Share on other sites
RenX99    122
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



Share this post


Link to post
Share on other sites
Dave Hunt    4872
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.

Share this post


Link to post
Share on other sites
Matt Green    152
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.

Share this post


Link to post
Share on other sites
Agony    3452
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this