Visual C ++ Runtime Error Debugging

I am writing a C ++ COM object in Visual Studio 2008, which is a helper object of Internet Explorer. Recently, when launched in IE, IE often began to open a dialog called "Microsoft Visual C ++ Runtime Library" with the error message "Runtime Error!" and stating that "The application requested Runtime to terminate it in an unusual way. For more information, contact application support." Unlike the usual one, there is an OK button in this dialog box, but not a debug button, so it then finishes, and I don’t leave as much as the stack trace, or even a hint of how much of my code could be such an error. I'm not sure where in my code it crashes.

How to fix runtime error issue? What are the possible causes of a runtime error? (maybe memory related errors?) What problems should I check on my code to try to fix such a crash? I need some ideas on how to fix this problem, its a little elusive.

+4
source share
2 answers

When you see this dialog box, start VS2008 using the project COM object. Then use the Debug-> Attach menu for processing to attach the debugger to the IE process that loaded your COM object. Then go to the process (Debug-> break all) and you will get a stack trace.

+4
source

He is bombing due to an unhandled exception. This gives you the option to disable the debugger when you first throw randomness right at the point where it is raised. Open your project, make iexplorer.exe a startup program. Debugging + Exceptions, check the "Drop" check box for unmanaged exceptions. Make it crash to get a breakpoint.

+3
source

All Articles