I recently fixed a defect in our product, the symptom of which was an access violation caused by accessing a dangling pointer.
For good practice I added a unit test
I don't know if this will help you any, but I once ran into a bug which would manifest differently if the program was run under the Visual Studio debugger, or program was run externally, then had debugger attached.