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.
Subject |
Author |
Date |
|
Neville Franks
|
Jul 3, 2007 - 1:04 AM
|
Hi, I have occasional reports from my users where ProfileBarStateSave() fails and CMainFrame::DestroyWindow() crashes. I have all the code in CMainFrame::DestroyWindow() in a try-catch block and the catch isn’t being entered. Only: return CExtNCW<CMDIFrameWnd>::DestroyWindow(); is outside the try-catch block.
The Version of the app has not changed when this happens. The Stack backtrace is as follows:
-------- *** Stack trace for last set context - .thread/.cxr resets it ChildEBP RetAddr WARNING: Stack unwind information not available. Following frames may be wrong. 0012ee78 0012ef1c ProfUIS262n!CExtHookSink::HookChains_t::g_HookWndProc+0xa5 0012ee7c 00786b90 0x12ef1c 0012f000 0040bca7 ProfUIS262n!CExtHookSink::HookChains_t::g_HookWndProc 00000000 00000000 Surfulater!CMainFrame::DestroyWindow+0x177 ------
Any idea why ProfileBarStateSave() randomly fails and why the crash occures?
I am using Prof-UIS V2.62
|
|
Neville Franks
|
Jul 3, 2007 - 10:13 PM
|
Thanks Suhai. I’ve added m_wndMenuBar.RemoveAllWndHooks(); and will update to the latest Prof-UIS version.
I’d still like to get some answer to ProfileBarStateSave() failing?
|
|
Technical Support
|
Jul 4, 2007 - 9:52 AM
|
The problem you reported in the top message often occurred in versions earlier than 2.70 but after the release of 2.70 nobody reported it. Besides, it was not related to the code that serializes the control bars. It occurred during automatic destruction of the main frame’s children and popup/descendant windows. We need to take a look at the complete call stack so that we can help you out with this.
|
|
Suhai Gyorgy
|
Jul 3, 2007 - 2:15 AM
|
Here is Support’s answer concerning the DestroyWindow crash: "We fixed a problem in 2.70 that may have to do with the error you encountered, especially if you are using MDI tabs in your project.
This problem is caused by an incorrect sequence of method calls that are performed to terminate window hooks. The termination calls should follow in the order reversed to the order the hooks were initialized. This may occur if you are using some hook-based classes like the menu bar and MDI tabs. Please try the following code at the beginning of the CMainFrame::DestroyWindow(): m_wndMenuBar.RemoveAllWndHooks(); " Although I don’t have MDI tabs, I also had the same problem and inserting this one line did help avoiding the crash.
But of course this still doesn’t answer your question with the failing ProfileBarStateSave().
|
|