Wednesday, June 11, 2008

Data Abort Exceptions

Data Abort Exceptions were not being handled in my native C++ Windows Mobile project (running in debug mode) recently ported from eVC4. Some error information appeared in the output window, but the application would not break at the error, it just exited.
Data Abort: Thread=8db6e4a8 Proc=8c247550 'MyProgram.exe'
AKY=00004001 PC=0165d6d8 RA=0165d6cc BVA=1e69006a FSR=00000407

This made it rather hard to debug. It didn't behave like this in eVC4!

After some investigations, I found an easy fix: On the Debug Exceptions menu, in the Win32 Exceptions category, turn on the option to Break when Access Violations are thrown.

Exception Handling Settings

Now when running in the debugger, Visual Studio happily gives the option to Break, Continue, or Ignore!

1 comment:

Josef said...

Hello

thank you for posting the Data Abort tipp. You saved my life.

I got a Data Abort in CreateWindow() within code that runs fine the day before. I thought I did not change anything but missed to allocate memory for a pointer. Thanks to your tipp I found the cause then easily.

Many thanks

Josef