After executing some new code, my C++ application started to behave strange (incorrect or incomplete screen updates, sometimes no screen updates at all). After a while we found out that the new code is causing an Access Violation. Strange enough, the application simply keeps on running (but with the incorrect screen updates).
At first we thought the problem was caused by a "try-catch(...)" construction (put there by an overactive ex-colleague), but several hours later (carefully inspecting the call stacks, adding many breakpoints, ...) we found out that if there's an Access Violation in a paint event, Windows catches it, and simply continues running the application.
- Is this normal behavior?
- Is it normal that Windows catches exceptions/errors during a paint event?
- Is there a way to disable this? (if not, it would mean that we have to always run in the debugger with all exceptions enabled while testing our code).
EDIT:
- On XP the correctly crashes (the wanted behavior after an Access Violation)
- On Vista and Windows 7 the application keeps on running