Print Page | Close Window

Removing docking pane results in a crash

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=6064
Printed Date: 12 December 2024 at 9:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Removing docking pane results in a crash
Posted By: akur
Subject: Removing docking pane results in a crash
Date Posted: 10 January 2007 at 9:36am
Hello,

I'm using some docking panes in my app and everything works fine until I close the app with some of the panes in a
collapsed floating state. For collapsed, floating panes, I get a crash inside CXTPDockingPaneMiniWnd::FindPane(). Here is the call stack
of the crash, beyond CMainFrame::OnClose(), where I call DestroyPane():

        ToolkitPro1040vc80D.dll!CXTPDockingPaneMiniWnd::FindPane(...)  Line 491 + 0x19 bytes    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneMiniWnd::OnAction(...)  Line 756 + 0x1f bytes    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneMiniWnd::OnPinButtonClick()  Line 777 + 0x16 bytes    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneMiniWnd::RemovePane(...)  Line 179    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneSplitterContainer::RemovePane(...)  Line 448 + 0x3b bytes    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneLayout::_FreeEmptyPanes()  Line 685 + 0x22 bytes    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneLayout::DestroyPane(...)  Line 962    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneManager::DestroyPane(...)  Line 940    C++
     ToolkitPro1040vc80D.dll!CXTPDockingPaneManager::DestroyPane(int nID=4)  Line 1127    C++


I've found out that it's an 0xc0000005 access violation, because 'm_pTopContainer' is referenced in CXTPDockingPaneMiniWnd::FindPane(),
but it has been already set to NULL inside CXTPDockingPaneMiniWnd::RemovePane().

Where do you think lies the problem?

Thank you, in advance!




Replies:
Posted By: Oleg
Date Posted: 10 January 2007 at 9:48am
Hi,
What version you have?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: fatbone77
Date Posted: 10 January 2007 at 10:42pm
I encounter the same situation in V10.4. To repeat the problem, just click pin button on any floating pane, then click close button.


Posted By: akur
Date Posted: 11 January 2007 at 1:13am
Using the version 10.4 (currently porting our app from version 10.1, where  it was absolutely OK to destroy panes in CMainFrame::OnClose()).

I get the same crash with exactly the same call stack even in the "PaneSample" sample, if I modify the OnClose() handler from
this original code:
void CMainFrame::OnClose()
{
    // Save the current state for toolbars and menus.
    SaveCommandBars(_T("CommandBars"));
    CMDIFrameWnd::OnClose();
}


to this modified code:
void CMainFrame::OnClose()
{
    // Save the current state for toolbars and menus.
    SaveCommandBars(_T("CommandBars"));
    m_paneManager.DestroyPane(IDR_PANE2);
    CMDIFrameWnd::OnClose();
}



Run the sample app and before you close it, make sure pane2 is a collapsed floating pane.


Posted By: Oleg
Date Posted: 11 January 2007 at 2:14am
Hello,
 
Yes, sorry, we agree this problem of 10.4 and will fix if for 10.4.1.
 
Please Add to CXTPDockingPaneMiniWnd::FindPane method:
 
if (!m_pTopContainer) return;
 
and rebuild library.
 
 
Thank you for let us know.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: akur
Date Posted: 11 January 2007 at 2:24am
Thank you for the fix provided.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net