December 8th, 2011

What does it mean when my program exits with the message "This application has requested the Runtime to terminate it in an unusual way"?

You’re running your program, and then it suddenly exits with the message This application has requested the Runtime to terminate it in an unusual way. What happened? That message is printed by the C runtime function abort, the same function that also causes your program to terminate with exit code 3.

Your program might call abort explicitly, or it might end up being called implicitly by the runtime library itself.

The C++ standard spells out the conditions under which terminate is called, and it’s quite a long list, so I won’t bother repeating them here. Consult your favorite copy of the C++ standard for details. (The most common reason is throwing an unhandled exception.)

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.