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 » Crash on app exit Collapse All
Subject Author Date
Neville Franks Jan 14, 2008 - 12:40 AM

I’ve reported in the past that some of my users get a crash when my app closes. This is in CExtHookSink::HookChains_t::g_HookWndProc+0xa5.

I was told to add: m_wndMenuBar.RemoveAllWndHooks(); to CMainFrame::DestroyWindow() to fix this, but it didn’t help. I’m still using Prof-UIS V2.62.

I’ve just upgraded to Prof-UIS V2.82 and searched the forums again for issues like this and found two relevant posts. One says to add: CExtCustomizeSite::RemoveAllWndHooks(); to CMainFrame::DestroyWindow() if the CMainFrame class is derived from the CExtCustomizeSite class, which mine is. This is in addition to m_wndMenuBar.RemoveAllWndHooks();

And the other says:

"This assertion may occur only due to incorrect MFC state switching in some MFC regular DLL loaded into the running process of your application. If it’s true, the following call in the InitInstance() method of your application class should fix the problem:
CExt_ProfUIS_ModuleState::InitExtension( AfxGetAppModuleState() );"

My app does use both MFC and Regular DLL’s.

My questions are:
1) Do I need all three of these lines of code added to my app to resolve the crash problem? If not which ones.
2) Are these still required with Prof-UIS V2.82?

Thanks,
Neville

Technical Support Jan 14, 2008 - 11:44 AM

The problem was really in a de-initialization sequence of hook interfaces provided by the CExtHookSink class. Prof-UIS 2.82 is much less dependent on this type of hooks and future versions may be free of this hook component at all. You did manual de-initialization of a hook sink based object and, as a result, the de-initialization sequence became correct independently from any other conditions occurred during de-initialization of your application. We cannot provide you with 100% exact answers for your questions because we did not see the source code of your project. You can try to remove manual de-initialization invocations for hook sink objects in your project based on Prof-UIS 2.82. Or you can leave this part of code intact.