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 » CExtDynamicBarSite::_BarFreeImpl called with this == NULL Collapse All
Subject Author Date
Geert Mys Apr 16, 2007 - 1:22 PM

Introduction


An MDI application, with CChildFrame derived class has 5 CExtControlbar docked into one pane. When one of these panes is put to floated state and the application is closed, it crashes in CExtDynamicBarSite::_BarFreeImpl.


Is this some kind of bug, or not correctly implemented?


Below you find technical details.


Thank you for your assistance.


Geert.



Code fragments


CChildFrameComments::OnCreate creates the dockbars:

  if (!m_edit.Create (this))
    return -1;

  m_edit.GetFrame ()->DockControlBarInnerOuter (AFX_IDW_DOCKBAR_BOTTOM, true);
  //ShowControlBar(m_edit.GetFrame (), TRUE, TRUE);
  
  if (!m_teachers.Create (this))
    return -1;
  if (!m_teacherClasses.Create (this))
    return -1;
  if (!m_students.Create (this))
    return -1;
  if (!m_commentClasses.Create (this))
    return -1;
  if (!m_commentConfig.Create (this))
    return -1;

  m_edit.GetFrame ()->EnableDocking (CBRS_ALIGN_ANY);
  m_teachers.GetFrame ()->EnableDocking (CBRS_ALIGN_ANY);
  m_teacherClasses.GetFrame ()->EnableDocking (CBRS_ALIGN_ANY);
  m_students.GetFrame ()->EnableDocking (CBRS_ALIGN_ANY);
  m_commentConfig.GetFrame ()->EnableDocking (CBRS_ALIGN_ANY);

  m_teachers.GetFrame ()->DockControlBarInnerOuter (AFX_IDW_DOCKBAR_LEFT, true);
  m_teachers.GetFrame ()->DockControlBarIntoTabbedContainer (m_teacherClasses.GetFrame (), -1, NULL, false);
  m_teachers.GetFrame ()->DockControlBarIntoTabbedContainer (m_students.GetFrame (), 0, NULL, false);
  m_teachers.GetFrame ()->DockControlBarIntoTabbedContainer (m_commentClasses.GetFrame (), 1, NULL, false);
  m_teachers.GetFrame ()->DockControlBarIntoTabbedContainer (m_commentConfig.GetFrame (), 2, NULL, false);

  RecalcLayout ();

  ShowControlBar(m_teachers.GetFrame (), TRUE, TRUE);
  ShowControlBar(m_teacherClasses.GetFrame (), TRUE, TRUE);
  ShowControlBar(m_students.GetFrame (), TRUE, TRUE);
  ShowControlBar(m_commentClasses.GetFrame (), TRUE, TRUE);
  ShowControlBar(m_commentConfig.GetFrame (), TRUE, TRUE);

  RecalcLayout ();


When one of the docked frames is being floated and the application is closed, it asserts at
   ASSERT (this != NULL)
 


in CExtDynamicBarSite::_BarFreeImpl.

The call stack shows that _BarFreeImpl has recursively been called.
>	ProfUIS264md.dll!CExtDynamicBarSite::_BarFreeImpl(CExtDynamicControlBar * pBar=0x0908d1b0, bool bForceFloatMode=true, bool bForceNoOptimizeMode=false)  Line 27704 + 0x19 bytes	C++
 	ProfUIS264md.dll!CExtDynamicControlBar::WindowProc(unsigned int message=2, unsigned int wParam=0, long lParam=0)  Line 25043	C++
 	mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x0908d1b0, HWND__ * hWnd=0x005805a8, unsigned int nMsg=2, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes	C++
 	mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x005805a8, unsigned int nMsg=2, unsigned int wParam=0, long lParam=0)  Line 389	C++
 	mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x005805a8, unsigned int nMsg=2, unsigned int wParam=0, long lParam=0)  Line 411 + 0x15 bytes	C++
 	USER32.DLL!77e4158f() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for USER32.DLL]	
 	USER32.DLL!77e3c19d() 	
 	USER32.DLL!77e3c1ca() 	
 	NTDLL.DLL!77f91baf() 	
 	mfc80d.dll!CWnd::DestroyWindow()  Line 993 + 0xd bytes	C++
 	ProfUIS264md.dll!CExtDynamicBarSite::_BarFreeImpl(CExtDynamicControlBar * pBar=0x0908d1b0, bool bForceFloatMode=false, bool bForceNoOptimizeMode=false)  Line 27896 + 0xf bytes	C++
 	ProfUIS264md.dll!CExtDynamicBarSite::_BarFreeAllImpl(bool bForceNoOptimizeMode=false, bool bFreePersistentBars=true, bool bFreeDynamicBars=true)  Line 27940 + 0x12 bytes	C++
 	ProfUIS264md.dll!CExtDynamicBarSite::BarFreeAll(bool bFreePersistentBars=true, bool bFreeDynamicBars=true)  Line 27914	C++
 	ProfUIS264md.dll!CExtDynamicBarHookSink::OnHookWndMsg(long & lResult=0, HWND__ * hWndHooked=0x001305f8, unsigned int nMessage=2, unsigned int & wParam=0, long & lParam=0)  Line 26425	C++
 	ProfUIS264md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=2, unsigned int & wParam=0, long & lParam=0)  Line 210 + 0x26 bytes	C++
 	ProfUIS264md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x001305f8, unsigned int nMessage=2, unsigned int wParam=0, long lParam=0)  Line 287 + 0x14 bytes	C++
 	USER32.DLL!77e4158f() 	
 	USER32.DLL!77e3c19d() 	
 	USER32.DLL!77e3c1ca() 	
 	NTDLL.DLL!77f91baf() 	
 	USER32.DLL!77e1f21e() 	
 	USER32.DLL!77e1f13a() 	
 	USER32.DLL!77e5479a() 	
 	USER32.DLL!77e4158f() 	
 	USER32.DLL!77e3afa1() 	
 	USER32.DLL!77e27e2d() 	
 	ProfUIS264md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=545, unsigned int & wParam=1246712, long & lParam=0)  Line 236 + 0x20 bytes	C++
 	ProfUIS264md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00180518, unsigned int nMessage=545, unsigned int wParam=1246712, long lParam=0)  Line 287 + 0x14 bytes	C++
 	USER32.DLL!77e4158f() 	
 	USER32.DLL!77e3b7a9() 	
 	USER32.DLL!77e27c15() 	
 	mfc80d.dll!CMDIChildWnd::MDIDestroy()  Line 997 + 0x4c bytes	C++
 	mfc80d.dll!CMDIChildWnd::DestroyWindow()  Line 446	C++
 	mfc80d.dll!CDocument::OnCloseDocument()  Line 749	C++
 	mfc80d.dll!CDocTemplate::CloseAllDocuments(int __formal=0)  Line 355	C++
 	mfc80d.dll!CDocManager::CloseAllDocuments(int bEndSession=0)  Line 588	C++
 	mfc80d.dll!CWinApp::CloseAllDocuments(int bEndSession=0)  Line 90	C++
 	mfc80d.dll!CFrameWnd::OnClose()  Line 802	C++
 	Puntenboek.exe!CPuntSplitter::OnClose()  Line 391	C++
 	mfc80d.dll!CWnd::OnWndMsg(unsigned int message=16, unsigned int wParam=0, long lParam=0, long * pResult=0x0012eadc)  Line 2028	C++
 	mfc80d.dll!CWnd::WindowProc(unsigned int message=16, unsigned int wParam=0, long lParam=0)  Line 1741 + 0x20 bytes	C++
 	Puntenboek.exe!CExtNCW<CMDIFrameWnd>::WindowProc(unsigned int message=16, unsigned int wParam=0, long lParam=0)  Line 420 + 0x14 bytes	C++
 	mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x028a6cb0, HWND__ * hWnd=0x002604fe, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes	C++
 	mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x002604fe, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0)  Line 389	C++
 	mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x002604fe, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0)  Line 411 + 0x15 bytes	C++
 	USER32.DLL!77e4158f() 	
 	USER32.DLL!77e3afa1() 	
 	USER32.DLL!77e27e2d() 	
 	ProfUIS264md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=16, unsigned int & wParam=0, long & lParam=0)  Line 236 + 0x20 bytes	C++
 	ProfUIS264md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x002604fe, unsigned int nMessage=16, unsigned int wParam=0, long lParam=0)  Line 287 + 0x14 bytes	C++
 	USER32.DLL!77e4158f() 	
 	USER32.DLL!77e3c19d() 	
 	USER32.DLL!77e3c1ca() 	
 	NTDLL.DLL!77f91baf() 	
 	USER32.DLL!77e3b6d5() 	
 	mfc80d.dll!CThreadLocalObject::GetData(CNoTrackObject * (void)* pfnCreateObject=0x78246a10)  Line 419 + 0x11 bytes	C++
 	mfc80d.dll!CThreadLocal<AFX_MODULE_THREAD_STATE>::GetData()  Line 177 + 0xd bytes	C++
 	00000014()	

Geert Mys Apr 19, 2007 - 11:00 AM

Dear,

Thanks for your fast and effective support concerning the shutdown problem you send me by mail.

I really do appreciate your business.


Geert.

Geert Mys Apr 18, 2007 - 8:56 AM

I send to support@prof-uis.com a sample to reproduce the problem. Is it for any help to you.
Thank you.

Technical Support Apr 17, 2007 - 1:56 AM

The information you provided is not enough to understand what’s causes the crash. We need either to take a look at the source code of the main frame window and, we guess, at the source code of the m_edit object if it allocates dynamic control bars. You can also send us a project which reproduces the crash so we can find out what’s wrong.