Removing docking pane results in a crash |
Post Reply |
Author | |
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
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! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
What version you have?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
fatbone77
Newbie Joined: 10 January 2007 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
I encounter the same situation in V10.4. To repeat the problem, just click pin button on any floating pane, then click close button.
|
|
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
|
Thank you for the fix provided.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |