Eric Roth
November 28th, 2000, 05:08 PM
I am trying to convert a MFC project that executes successfully in Debug compilation over to a final Release. Unfortunately, the release version crashes following the execution of any function triggered by a WM_PAINT message, like OnPaint(), OnDraw, or Invalidate(), which generates a WM_PAINT message. The triggered function completes execution, but then, just after, it crashes. This makes me believe it is an issue with the run-time stack being improperly managed upon return from the function.
This is the message I get when it crashes: <<The instruction at "0x5f401351" referenced memory at "0x00000037". The memory could not be "read".>>
I have read some articles about converting to a Release version. They suggested tips that I tried like using the /GZ switch at compilation, and removing important code from ASSERT() calls or replacing the ASSERTs with VERIFYs. Additionally, I have explored making sure all my varibles and objects are properly initialized. I have turned off all compiler optimizations. I believe the OnPaint() and OnDraw methods are properly registered into the message map, and have the proper arguments. I don't know what else I can try. If you have encountered a similar situation before, I'd appreciate any advise you could offer.
Thanks,
Eric Roth
rothe@lunainnovations.com
This is the message I get when it crashes: <<The instruction at "0x5f401351" referenced memory at "0x00000037". The memory could not be "read".>>
I have read some articles about converting to a Release version. They suggested tips that I tried like using the /GZ switch at compilation, and removing important code from ASSERT() calls or replacing the ASSERTs with VERIFYs. Additionally, I have explored making sure all my varibles and objects are properly initialized. I have turned off all compiler optimizations. I believe the OnPaint() and OnDraw methods are properly registered into the message map, and have the proper arguments. I don't know what else I can try. If you have encountered a similar situation before, I'd appreciate any advise you could offer.
Thanks,
Eric Roth
rothe@lunainnovations.com