Reputation:
I have inherited the maintainance of an activeX control written in c++/c that crashes in release mode but not in debug mode.
When embedded in a web page, this AX control triggers an access violation in release mode but not in debug mode
Here are the details from IE 8
Description:
Stopped working
Problem signature:
Problem Event Name: APPCRASH
Application Name: iexplore.exe
Application Version: 8.0.7601.17514
Application Timestamp: 4ce79912
Fault Module Name: mymodule.OCX
Fault Module Version: 13.0.0.771
Fault Module Timestamp: 4dc325f9
Exception Code: c0000005
Exception Offset: 003ebc80
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Do anyone have recommendations on how to go about addressing this problem?
Upvotes: 0
Views: 699
Reputation: 1
Because I have lost lots of time to find the right solution, I share it here:
The license string passed to CreateControl must have been allocated using SysAllocString, or your licensed ActiveX control may crash. On my project, this was only in Release mode... Don't know why it works in Debug mode.
Found the solution indirectly here.
Upvotes: 0
Reputation: 11925
Generate debug symbols in your release build. Then you can debug the crash.
Alternatively, instead of waiting for the crash to happen, attach to the process before following the steps that cause the crash to occur. In the VS exceptions dialog, have VS stop immediately when an access violation is thrown (Debug | Exceptions | Win32 Exceptions | c0000005). Then repro; at that point, VS should display a message box when the AV happens.
If the crash repros at the same place everytime, should be easy to diagnose.
Upvotes: 3