Debug & Release mode

I'm developing Stage Editor which is used for game.

And It reached to the end. So I recompiled it for release mode and

executed this release version.

Oops, This is MDI application.

The main frame window is work well.

But problem is occured when I pressed "New" button (Create new child frame & Doc & View)

The error message is "Access violation - Divided by zero".

So I traced into the OnNewDocument and found that CFrameWnd's Create does not

work properly.

But when I recompile this project with Debug mode... It works well.

How can I fix this problem?

Thanks for your reading.
[690 byte] By [Yong-Hee, Nam] at [2007-11-15 22:06:42]
# 1 Re: Debug & Release mode
Your first step should be to recompile your debug mode, but turn on the same optimization settings that you have in release mode (actually, except for generating debugging information, make all of the settings the same).

The alternative is to begin by turning off all optimizations in release mode, and see if everything works. If it does, begin turning on optimizatiosn one at a time, until things stop working.

Larry Widing /WUGNET

MVP, CSP
Larry Widing at 2007-11-10 3:07:58 >
# 2 Re: Debug & Release mode
Try compiling the release mode version with debug information turned on, and run that one through the compiler...

Cheers,

Robin
Robin Abecasis at 2007-11-10 3:09:03 >
# 3 Re: Debug & Release mode
Thanks for reading my poor question and answering for that.

Special thanks to Robin Abecasis and Larry Widing.

I found the bug and the fault is mine.

I misunderstood the calling sequence when working with view class.

The calling sequence is first OnSize() and next OnInitialUpdate().

My important code is in OnInitialUpdate. So when OnSize is called

my program is knocked down.

I appreciate to ... all the members of this site. Thanks
Yong-Hee, Nam at 2007-11-10 3:10:02 >