Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Assert Fail in g_CmdManager->SerializeState v2.42 Collapse All
Subject Author Date
Michael Morrison Sep 2, 2005 - 11:59 AM

What is the most likely cause for the assert fail:

ASSERT( !(pCmdItem->StateIsBasic()) );

On line 1798 of ExtCmdManager.cpp? This is happening inside g_CmdManager->SerializeState at startup when it loads the state from the registry.

If I delete my registry entries I can run the app once without problems - but on the second run it assert fails in that spot.

Thanks.

Technical Support Sep 2, 2005 - 1:21 PM

With regard to expandable menus, there are two types of commands:
1) The basic command is always initially visible in menus regardelss of how often the user clicks it (or the same command in toolbars).
2) Any other command is not initially visible in menus. It becomes visible depending on how often it is used in comparisson with other commands.

The command usage statistics information is tracked by the Prof-UIS command manager component. This information is loaded/saved to/from the system registry or MFC archive object when your application invokes the g_CmdManager->SerializeState(...) code. The assertion described in your message may occur when you have defined some command as basic and then your application tries to load the state of the command manager that contains command usage statistics of this basic command.

Of course, if the problem persists, you can send us your project so that we can help you.