Missing Menu!
08-Jul-94 16:03:05
Sb: #29761-Missing Menu!
Fm: Sumeet Shrivastava 74441,172
To: Ron Stephan 72350,2446
Hi Ron,
The reason why you get an error in debug version and not release version is
because the ASSERT macro is defined only under debug build (when _DEBUG is
defined). So the problem that you are getting under debug build probably
also existed under release build but the assertion never occured.
Why the assertion?
——————
I am not sure what the error might be. Usually when you get an assertion
error, you should take down the file name and the line number where you get
the assertion. That helps a lot.
I did search through the code and my guess is that you get the assertion in
CFrameWnd::OnInitMenuPopup. Somehow, the pointer to the menu is NULL. This
does not normally happen unless you are dynamically modifying the menu (by
SetMenu() etc.) , or it is a side affect of memory getting corrupted
(corrupt pointer etc.).
For finding the cause of this error, I would suggest that you take a look at
article q108112 for debugging an assertion error. You might also want to run
your application with MFC Trace switched on. This can be done by selecting
"Enable Tracing" from "MFC Trace Options" icon under Visual C++ program
group.
Ron, hope this helps.
Thanks.
Sumeet Shrivastava
Microsoft Developer Support