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 » Dragging a tab window to dock it to another tab's container causes ASSERT and crash Collapse All
Subject Author Date
Krustys Donuts Feb 2, 2010 - 1:21 AM

I encounter an ASSERT and crash when dragging a tab window to try to dock it to another tab window, and this crash happens in Debug mode only.  Sorry for the long message, as it’s a long working history.  Could you take a look and see what I am doing wrong?  I’m glad to provide more detailed information if you need.


I’m working on an MDI application whose GUI looks in general like this:


+----------------------------------------------------------+

+ File  Edit    View    Help                                   +

+----------------------------------------------------------+

+                               +                                            +

+                               +                                            +

+    (Tabs where    +                                            +

+     crash occurs) +                                            +

+                               +   (Documents Area)        +

+                               +                                            +

+                               +                                            +

+                               +                                            +

+                               +                                            +

+                               +                                            +

+-----------------------+                                            +

+ Tab #1 |                                                             +

+----------------------------------------------------------+

+                                                                              +

+          (Some other tabs go here)                   +

+                                                                             +

+----------------------------------------------------------+

+ Tab A | Tab B | Tab C | ...                                 +

+-----------------------------------------------------------+


What I want to do is show a Tab #2(and later a Tab #3) docked in the same window as Tab #1 when the application starts up, which would look the same as Tab A, Tab B and Tab C.  Tab #1, Tab A, Tab B and Tab C have their corresponding menu entries in the "View" menu.


Here are the steps to reproduce the problem:


Preconditions:

1). I’m working in Visual Studio Team System 2008 Development Edition.

2). I’m using Prof-UIS 2.84.

3). My CMainFrame is derived from CMDIFrameWnd directly.

4). I have my IDR_MAINFRAME menu resource, but I also define IDR_MY_DOCUMENT_MENU as an alternative menu resource to be shown when my documents are open.  IDR_MY_DOCUMENT_MENU provide more menu functionalities.


Step 1. Before adding any new code, run the current application.  As far as I know, Prof-UIS framework would record the current GUI layout information to the registry.


Step 2. Because I already have the code that does this job for Tab A, B and C, I try to follow it.  Then I do:

1). In the IDR_MAINFRAME and IDR_MY_DOCUMENT_MENU resources, add a new entry in the "View" menu for "Tab #2", whose ID is ID_VIEW_TAB_2.

2). In my CMainFrame’s header file, I add a new member variable for the Tab #2’s control bar: "CTab2CtrlBar m_wndTab_2_Bar;", which is derived from CExtControlBar.

3). In CMainFrame’s message map, add an entry "ON_COMMAND_EX(ID_VIEW_TAB_2, OnBarCheck)", where OnBarCheck() is implemented as follows:


BOOL CMainFrame::OnBarCheck(UINT nID)

{

    //Handles the show/hide command for a control bar with its associated dialog control identifier in the frame window

    return CExtControlBar::DoFrameBarCheckCmd(this, nID, true);

}


4). And an entry "ON_UPDATE_COMMAND_UI(ID_VIEW_TAB_2, OnUpdateControlBarMenu)", where the OnUpdateControlBarMenu() is implemented as follows:


void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI)

{

    //Performs updates for a control bar show/hide command in the frame window by using the CCmdUI object

    CExtControlBar::DoFrameBarCheckUpdate(this, pCmdUI, true);

}


5). In the CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) method, add new code(shown in red) to create Tab #2 which includes:

    (a). Add the "Create()" call on m_wndTab_2_Bar;

    (b). Add the ID_VIEW_TAB_2 to the staticBasicCommands[] array.


int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)

{

    // create the mdi frame window itself

    if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)

        return -1;

   

    //Load the main framewindow icon

    HICON hIcon = (HICON) LoadImage (g_GUIFrameworkInstance, MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON,0,0,LR_DEFAULTSIZE);

    //Change from default icon to the icon we just loaded

    SetIcon (hIcon, true);


    // Try to load shared MDI menus and accelerator tables.

    m_hMDIDocumentMenu = ::LoadMenu(g_GUIFrameworkInstance, MAKEINTRESOURCE(IDR_MY_DOCUMENT_MENU));

    m_hMDIDocumentAccel = ::LoadAccelerators(g_GUIFrameworkInstance, MAKEINTRESOURCE(IDR_MY_DOCUMENT_MENU));

   

    // prof-ui -- not sure what this does yet - maybe gets registry key settings?

    VERIFY( g_CmdManager->ProfileWndAdd( StaticDefs::__PROF_UIS_PROJECT_CMD_PROFILE_NAME, GetSafeHwnd()));

    // For each Profile Name, ProfUIS maintains a list of all menu commands in no particular order.

    // The following two lines of code populate this list.

    VERIFY( g_CmdManager->UpdateFromMenu( StaticDefs::__PROF_UIS_PROJECT_CMD_PROFILE_NAME, IDR_MAINFRAME));

    VERIFY( g_CmdManager->UpdateFromMenu( StaticDefs::__PROF_UIS_PROJECT_CMD_PROFILE_NAME, IDR_MY_DOCUMENT_MENU));

   

    // Here goes the code to initialize other GUI components.

   

    // Here is the code to create Tab #1.  "m_wndTab1Bar" is an object of CTab1CtrlBar, derived from CExtControlBar.

    m_wndTab_1_Bar.SetInitDesiredSizeVertical( CSize( 200, 400));

    m_wndTab_1_Bar.SetInitDesiredSizeHorizontal( CSize( 400, 200));

    if(!m_wndTab_1_Bar.Create( NULL, this, ID_VIEW_TAB_1))

    {

        TRACE0("Failed to create Tab #1\n");

        return -1;

    }

   

    // I add the code to create Tab #2.

    m_wndTab_2_Bar.SetInitDesiredSizeVertical( CSize( 200, 400));

    m_wndTab_2_Bar.SetInitDesiredSizeHorizontal( CSize( 400, 200));

    if(!m_wndTab_2_Bar.Create( NULL, this, ID_VIEW_TAB_2))

    {

        TRACE0("Failed to create Tab #2\n");

        return -1;

    }


   

    // Here is the code to create Tab A, Tab B and Tab C.

   

    // See below for the SetupDocking() implementation.

    if (!SetupDocking())

        return -1;

   

    // Then set the basic commands

    static UINT staticBasicCommands[] = {

        ID_FILE_...,

        ID_FILE_...,

        ID_VIEW_TAB_1,

        ID_VIEW_TAB_2,  // Newly added entry

        ID_VIEW_TAB_A,

        ID_VIEW_TAB_B,

        ID_VIEW_TAB_C,

        0  // end of command list

    };

   

    VERIFY( g_CmdManager->SetBasicCommands( StaticDefs::__PROF_UIS_PROJECT_CMD_PROFILE_NAME, staticBasicCommands));

   

    CWinApp *app = AfxGetApp();

    try{

        CExtControlBar::ProfileBarStateLoad( this,

            app->m_pszRegistryKey, app->m_pszProfileName, app->m_pszProfileName,

            &m_dataFrameWP,  // m_dataFrameWP is a WINDOWPLACEMENT

            true, true, HKEY_CURRENT_USER, true);

    }catch(...){} // catches exceptions generated by adding / removing toolbars on new versions

   

    // The remaining code goes here...

}


bool CMainFrame::SetupDocking()

{

    m_wndTab_A_Bar.EnableDocking(CBRS_ALIGN_ANY);

    m_wndTab_B_Bar.EnableDocking(CBRS_ALIGN_ANY);

    m_wndTab_C_Bar.EnableDocking(CBRS_ALIGN_ANY);

    m_wndTab_1_Bar.EnableDocking(CBRS_ALIGN_ANY);

    m_wndTab_2_Bar.EnableDocking(CBRS_ALIGN_ANY);  // Newly added code - Enable the docking for Tab #2.

   

    // Enable autohide feature for resizable control bars

    if( !CExtControlBar::FrameInjectAutoHideAreas(this))

        return false;

   

    // Dock the Tab A, B and C.

    m_wndTab_A_Bar.DockControlBar(AFX_IDW_DOCKBAR_BOTTOM, 1, this);

    m_wndTab_A_Bar.DockControlBarIntoTabbedContainer(&m_wndTab_B_Bar, -1, this);

    m_wndTab_A_Bar.DockControlBarIntoTabbedContainer(&m_wndTab_C_Bar, -1, this);

   

    // Dock Tab #1 and Tab #2.

    m_wndTab_1_Bar.DockControlBar(AFX_IDW_DOCKBAR_BOTTOM, 2, this);

    m_wndTab_1_Bar.DockControlBarIntoTabbedContainer(&m_wndTab_2_Bar, -1, this);  // Newly added code

   

    return true;

}


Step 3: Build and run the code above.  (I guess)Because the previously stored registry information only contains the Tab #1, Tab #2 is not docked into Tab #1 when the application runs up.  Therefore I click "View" -> "Tab 2" and now the Tab #2 is displayed above the Tab #1, as shown below:


+------------------------------------------------------+

+ File  Edit (etc.)                                             +

+------------------------------------------------------+

+ Tab #2            +                                            +

+-------------------+                                            +

+                         +                                            +

+                         +                                            +

+                         +                                            +

+-------------------+                                            +

+ Tab #1            +                                            +

+-------------------+                                            +

+                         +                                            +

+                         +                                            +

+                         +                                            +

+------------------------------------------------------+


Step 4: Then I start dragging the caption bar of Tab #2 and try to dock it to the same window as Tab #1.  Till now everything is fine, but when I release the mouse button, the following ASSERT is hit:


File: ExtControlBarTabbedFeatures.cpp

Line: 247

Code:

#ifdef _DEBUG

INT nRealDockedCount = GetDockedCount();

    ASSERT( nCount == nRealDockedCount );  <- Line 247

#endif // _DEBUG


At this moment, the value of "nRealDockedCount" is 1, but nCount is 2.


Step 5: The ASSERT in Step 4 doesn’t cause any crash.  By pressing F5 the application still can run well.


Step 6: According to my understanding, now the registry should store the GUI information of both Tab #1 and Tab #2.  Do not delete the information.  I then add Tab #3 by going through Step 2 again.


Step 7: Build and run.  Now Tab #1 and Tab #2 are docked together when the application runs up.  Tab #3 is not shown.  Click "View"->"Tab 3".  Tab #3 is displayed above the Tab #1 and Tab #2.


Step 8: Press down the left mouse button and start dragging the Tab #3.  During the drag, the docking markers are shown to let you select where you want to dock Tab #3, and I try to move to the center of the docking marker which can dock Tab #3 to the same tab container of Tab #1 and #2.  However, as soon as the mouse pointer is moved to the docking marker center(WITHOUT releasing the mouse button), a breakpoint is triggered:


File: dbgrptt.c

Line: 89

Code:

_CRTIMP void _cdecl _CrtDbgBreak(

    void

    )

{

    DebugBreak();

}    <- Line 89


The call stack at this momenet provides little information:


    ntdll.dll!7c92120e()

    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 

>    msvcr90d.dll!_CrtDbgBreak()  Line 89 C


Step 9: I press F5 to continue the execution, and the same ASSERT as in Step 4 is hit again:


File: ExtControlBarTabbedFeatures.cpp

Line: 247

Code:

#ifdef _DEBUG

INT nRealDockedCount = GetDockedCount();

    ASSERT( nCount == nRealDockedCount );  <- Line 247

#endif // _DEBUG


At this moment, the nRealDockedCount is still 1 while the nCount is 3.  The call stack is:


> ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x1b bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertTemporaryItemsFromImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1431 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertTemporaryItemsFrom(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1406 C++

  ProfUIS284md.dll!CExtControlBar::InternalDraggingState_t::DrawState(bool bErasingPrevious=true)  Line 15395 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStop(bool bCancel=false)  Line 12779 C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9713 + 0x14 bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++


Step 10: Press F5 to continue,and the DebugBreak() breakpoint and the ASSERT will be triggered repeatedly(about twice), and finally the following ASSERT fails:


File: afxwin2.inl

Line: 49

Code:

_AFXWIN_INLINE BOOL CWnd::PostMessage(UINT message, WPARAM wParam, LPARAM lParam)

    { ASSERT(::IsWindow(m_hWnd)); return ::PostMessage(m_hWnd, message, wParam, lParam); }


where the m_hWnd is 0xfeeefeee, an obvious bad window handle.


Call stack at this moment:

> mfc90d.dll!CWnd::PostMessageA(unsigned int message=133, unsigned int wParam=0, long lParam=0)  Line 49 + 0x2a bytes C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9723 C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x00140c1e, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes C++


Step 11: Press F5 to continue, and this time an "Access violation reading location" occurs in CWnd::Default():


File: wincore.cpp

Line: 273

Code:

LRESULT CWnd::Default()

{

    // call DefWindowProc with the last message

    _AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();

    return DefWindowProc(pThreadState->m_lastSentMsg.message,

        pThreadState->m_lastSentMsg.wParam, pThreadState->m_lastSentMsg.lParam); <- Line 273

}


Call stack:

> mfc90d.dll!CWnd::Default()  Line 273 + 0x1d bytes C++

  mfc90d.dll!CWnd::OnCompositionChanged()  Line 370 + 0x11 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9727 C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x00140c1e, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes C++


From now on the application cannot continue any more.


That’s all I have so far.




 

Technical Support Feb 2, 2010 - 2:07 PM

Please check the following:

1) Your CMainFrame::OnBarCheck() method invokes the CExtControlBar::DoFrameBarCheckCmd(this, nID, true); code where the third true parameter means the resizable bar show/hide commands should work like toolbar commands. This check box like command style can be used with resizable bars, but it’s not compatible with auto-hiding feature. Please check the auto-hiding feature is disabled in your app. I.e. the CExtControlBar::FrameInjectAutoHideAreas() method is not invoked. This method is invoked in the CMainFrame::SetupDocking() method. This is incorrect. You should choose what’s more important for you: auto-hiding or check like commands for resizable bars.

2) All the control bars must use the unique dialog control identifiers. This is very important. All the toolbars, status bar, menu bar, resizable bars must have an unique identifiers specified in parameters of their Create() methods.

We also need the following:

1) The complete stack listing at a crash time:

2) It would be very useful to take a look at entire source code of your main frame class. You can send it via e-mail.


Krustys Donuts Feb 3, 2010 - 4:05 AM

I removed the method call to "CExtControlBar::FrameInjectAutoHideAreas()" but unfortunately the crash doesn’t go away.  I also checked the controls’ IDs and they are unique.


I’ll check and see if I can send the code to you.


As you required, here is the information of the call stacks at crash time(I used my original code to retrieve the following information):


1). At the crash time(very poor call stack information):


File: dbgrptt.c

Line: 89

Code:

_CRTIMP void _cdecl _CrtDbgBreak(

    void

    )

{

    DebugBreak();

}


Full Call Stack:

  ntdll.dll!7c92120e()  

  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 

> msvcr90d.dll!_CrtDbgBreak()  Line 89 C


2). Then hit F5 to continue the execution, and a second breakpoint would be triggered("MyApp.exe" is my application):


File: ExtControlBarTabbedFeatures.cpp

Line: 247

Code:

#ifdef _DEBUG

INT nRealDockedCount = GetDockedCount();

 ASSERT( nCount == nRealDockedCount );

#endif // _DEBUG


Full Call Stack:

> ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x1b bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertTemporaryItemsFromImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1431 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertTemporaryItemsFrom(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1406 C++

  ProfUIS284md.dll!CExtControlBar::InternalDraggingState_t::DrawState(bool bErasingPrevious=true)  Line 15395 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStop(bool bCancel=false)  Line 12779 C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9713 + 0x14 bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] 

  user32.dll!77d18816()  

  user32.dll!77d28ea0()  

  user32.dll!77d28eec()  

  ntdll.dll!7c92e473()  

  user32.dll!77d194be()  

  user32.dll!77d2c174()  

  user32.dll!77d48a8d()  

  user32.dll!77d3a2bc()  

  ntdll.dll!7c930435()  

  ntdll.dll!7c930385()  

  ntdll.dll!7c937e09()  

  user32.dll!77d50877()  

  user32.dll!77d5082f()  

  user32.dll!77d2c2e8()  

  user32.dll!77d19195()  

  msvcr90d.dll!__crtMessageWindowA(int nRptType=2, const char * szFile=0x03a74f54, const char * szLine=0x0012b3c0, const char * szModule=0x00000000, const char * szUserMessage=0x0012a3c0)  Line 363 + 0x16 bytes C

  msvcr90d.dll!_VCrtDbgReportA(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 420 + 0x28 bytes C

  msvcr90d.dll!_CrtDbgReportV(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 241 + 0x1d bytes C

  msvcr90d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)  Line 258 + 0x1d bytes C

  mfc90d.dll!AfxAssertFailedLine(const char * lpszFileName=0x03a74f54, int nLine=247)  Line 25 + 0x14 bytes C++

  ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x17 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertTemporaryItemsFromImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1431 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertTemporaryItemsFrom(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1406 C++

  ProfUIS284md.dll!CExtControlBar::InternalDraggingState_t::DrawState(bool bErasingPrevious=false)  Line 15395 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingUpdateState(const CPoint & point={...}, bool bForceFloatMode=false)  Line 12961 C++

  ProfUIS284md.dll!CExtControlBar::_OnMouseMoveMsg(unsigned int nFlags=1, CPoint point={...})  Line 9763 + 0x2b bytes C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStart(const CPoint & point={...}, const CPoint & pointOffset={...}, CSize sizeWaitMouseMove={...})  Line 12636 + 0x24 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnLButtonDown(unsigned int nFlags=1, CPoint point={...})  Line 10123 + 0x2d bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=-917408, long * pResult=0x0012f9e0)  Line 2183 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  user32.dll!77d18816()  

  user32.dll!77d189cd()  

  user32.dll!77d196c7()  

  mfc90d.dll!AfxInternalPumpMessage()  Line 183 C++

  mfc90d.dll!CWinThread::PumpMessage()  Line 900 C++

  mfc90d.dll!CWinThread::Run()  Line 629 + 0xd bytes C++

  mfc90d.dll!CWinApp::Run()  Line 865 C++

  mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 47 + 0xd bytes C++

  MyApp.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 34 C++

  MyApp.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes C

  MyApp.exe!WinMainCRTStartup()  Line 403 C

  kernel32.dll!7c817077()  

  MyApp.exe!std::vector<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> >::_Insert_n(std::_Vector_const_iterator<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> > _Where={_ModuleName={...} _ModuleDescription={...} }, unsigned int _Count=3435973836, const ObjectInstanceXMLMarshaller::ModuleObjectDescription & _Val={...})  Line 1198 C++

  cccccccc() 


3). Hit F5 again to continue, and we go back to the dbgrptt.c:


File: dbgrptt.c

Line: 89

Code:

_CRTIMP void _cdecl _CrtDbgBreak(

    void

    )

{

    DebugBreak();

}


Full Call Stack:

  ntdll.dll!7c92120e()  

  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 

> msvcr90d.dll!_CrtDbgBreak()  Line 89 C


4). Hit F5.  Go back to the ExtControlBarTabbedFeatures.cpp


File: ExtControlBarTabbedFeatures.cpp

Line: 247

Code:

#ifdef _DEBUG

INT nRealDockedCount = GetDockedCount();

 ASSERT( nCount == nRealDockedCount );

#endif // _DEBUG


Full Call Stack:

  ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x1b bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertBarImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1530 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertBar(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1479 C++

  ProfUIS284md.dll!CExtControlBar::DockControlBarIntoTabbedContainer(CExtControlBar * pBar=0x0f26a7c0, int nIndex=0, CFrameWnd * pDockSite=0x0f1eb980, bool bRecalcLayout=true)  Line 19974 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingApplyState(CExtControlBar::InternalDraggingState_t & _ds={...}, bool bFinalApply=true)  Line 18508 + 0x23 bytes C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStop(bool bCancel=false)  Line 12786 + 0x19 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9713 + 0x14 bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] 

  user32.dll!77d18816()  

  user32.dll!77d28ea0()  

  user32.dll!77d28eec()  

  ntdll.dll!7c92e473()  

  user32.dll!77d194be()  

  user32.dll!77d2c174()  

  user32.dll!77d48a8d()  

  user32.dll!77d3a2bc()  

  ntdll.dll!7c930435()  

  ntdll.dll!7c930385()  

  ntdll.dll!7c937e09()  

  user32.dll!77d50877()  

  user32.dll!77d5082f()  

  user32.dll!77d2c2e8()  

  user32.dll!77d19195()  

  msvcr90d.dll!__crtMessageWindowA(int nRptType=2, const char * szFile=0x03a74f54, const char * szLine=0x0012b3c0, const char * szModule=0x00000000, const char * szUserMessage=0x0012a3c0)  Line 363 + 0x16 bytes C

  msvcr90d.dll!_VCrtDbgReportA(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 420 + 0x28 bytes C

  msvcr90d.dll!_CrtDbgReportV(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 241 + 0x1d bytes C

  msvcr90d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)  Line 258 + 0x1d bytes C

  mfc90d.dll!AfxAssertFailedLine(const char * lpszFileName=0x03a74f54, int nLine=247)  Line 25 + 0x14 bytes C++

  ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x17 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertTemporaryItemsFromImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1431 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertTemporaryItemsFrom(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1406 C++

  ProfUIS284md.dll!CExtControlBar::InternalDraggingState_t::DrawState(bool bErasingPrevious=false)  Line 15395 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingUpdateState(const CPoint & point={...}, bool bForceFloatMode=false)  Line 12961 C++

  ProfUIS284md.dll!CExtControlBar::_OnMouseMoveMsg(unsigned int nFlags=1, CPoint point={...})  Line 9763 + 0x2b bytes C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStart(const CPoint & point={...}, const CPoint & pointOffset={...}, CSize sizeWaitMouseMove={...})  Line 12636 + 0x24 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnLButtonDown(unsigned int nFlags=1, CPoint point={...})  Line 10123 + 0x2d bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=-917408, long * pResult=0x0012f9e0)  Line 2183 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  user32.dll!77d18816()  

  user32.dll!77d189cd()  

  user32.dll!77d196c7()  

  mfc90d.dll!AfxInternalPumpMessage()  Line 183 C++

  mfc90d.dll!CWinThread::PumpMessage()  Line 900 C++

  mfc90d.dll!CWinThread::Run()  Line 629 + 0xd bytes C++

  mfc90d.dll!CWinApp::Run()  Line 865 C++

  mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 47 + 0xd bytes C++

  MyApp.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 34 C++

  MyApp.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes C

  MyApp.exe!WinMainCRTStartup()  Line 403 C

  kernel32.dll!7c817077()  

> MyApp.exe!std::vector<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> >::_Insert_n(std::_Vector_const_iterator<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> > _Where={_ModuleName={...} _ModuleDescription={...} }, unsigned int _Count=3435973836, const ObjectInstanceXMLMarshaller::ModuleObjectDescription & _Val={...})  Line 1198 C++

  cccccccc() 


5). Hit F5 again.  An ASSERT fails in afxwin2.inl.


From the "Watch" window I can see the m_hWnd is a bad window handle which triggers the ASSERT.  I’m wondering how the window becomes invalid..


File: afxwin2.inl

Line: 49

Code:

_AFXWIN_INLINE BOOL CWnd::PostMessage(UINT message, WPARAM wParam, LPARAM lParam)

 { ASSERT(::IsWindow(m_hWnd)); return ::PostMessage(m_hWnd, message, wParam, lParam); }


Full Call Stack:

> mfc90d.dll!CWnd::PostMessageA(unsigned int message=133, unsigned int wParam=0, long lParam=0)  Line 49 + 0x2a bytes C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9723 C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] 

  user32.dll!77d18816()  

  user32.dll!77d28ea0()  

  user32.dll!77d28eec()  

  ntdll.dll!7c92e473()  

  user32.dll!77d194be()  

  user32.dll!77d2c174()  

  user32.dll!77d48a8d()  

  user32.dll!77d3a2bc()  

  ntdll.dll!7c930435()  

  ntdll.dll!7c930385()  

  ntdll.dll!7c937e09()  

  user32.dll!77d50877()  

  user32.dll!77d5082f()  

  user32.dll!77d2c2e8()  

  user32.dll!77d19195()  

  msvcr90d.dll!__crtMessageWindowA(int nRptType=2, const char * szFile=0x03a74f54, const char * szLine=0x0012b3c0, const char * szModule=0x00000000, const char * szUserMessage=0x0012a3c0)  Line 363 + 0x16 bytes C

  msvcr90d.dll!_VCrtDbgReportA(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 420 + 0x28 bytes C

  msvcr90d.dll!_CrtDbgReportV(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 241 + 0x1d bytes C

  msvcr90d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)  Line 258 + 0x1d bytes C

  mfc90d.dll!AfxAssertFailedLine(const char * lpszFileName=0x03a74f54, int nLine=247)  Line 25 + 0x14 bytes C++

  ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x17 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertTemporaryItemsFromImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1431 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertTemporaryItemsFrom(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1406 C++

  ProfUIS284md.dll!CExtControlBar::InternalDraggingState_t::DrawState(bool bErasingPrevious=false)  Line 15395 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingUpdateState(const CPoint & point={...}, bool bForceFloatMode=false)  Line 12961 C++

  ProfUIS284md.dll!CExtControlBar::_OnMouseMoveMsg(unsigned int nFlags=1, CPoint point={...})  Line 9763 + 0x2b bytes C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStart(const CPoint & point={...}, const CPoint & pointOffset={...}, CSize sizeWaitMouseMove={...})  Line 12636 + 0x24 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnLButtonDown(unsigned int nFlags=1, CPoint point={...})  Line 10123 + 0x2d bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=-917408, long * pResult=0x0012f9e0)  Line 2183 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  user32.dll!77d18816()  

  user32.dll!77d189cd()  

  user32.dll!77d196c7()  

  mfc90d.dll!AfxInternalPumpMessage()  Line 183 C++

  mfc90d.dll!CWinThread::PumpMessage()  Line 900 C++

  mfc90d.dll!CWinThread::Run()  Line 629 + 0xd bytes C++

  mfc90d.dll!CWinApp::Run()  Line 865 C++

  mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 47 + 0xd bytes C++

  MyApp.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 34 C++

  MyApp.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes C

  MyApp.exe!WinMainCRTStartup()  Line 403 C

  kernel32.dll!7c817077()  

  MyApp.exe!std::vector<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> >::_Insert_n(std::_Vector_const_iterator<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> > _Where={_ModuleName={...} _ModuleDescription={...} }, unsigned int _Count=3435973836, const ObjectInstanceXMLMarshaller::ModuleObjectDescription & _Val={...})  Line 1198 C++

  cccccccc() 


6). Hit F5. 


File: wincore.cpp

Line: 273

Code:

LRESULT CWnd::Default()

{

 // call DefWindowProc with the last message

 _AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();

 return DefWindowProc(pThreadState->m_lastSentMsg.message,

  pThreadState->m_lastSentMsg.wParam, pThreadState->m_lastSentMsg.lParam);

}


Full Call Stack:

> mfc90d.dll!CWnd::Default()  Line 273 + 0x1d bytes C++

  mfc90d.dll!CWnd::OnCompositionChanged()  Line 370 + 0x11 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnCancelMode()  Line 9727 C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=31, unsigned int wParam=0, long lParam=0, long * pResult=0x00128744)  Line 2042 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=31, unsigned int wParam=0, long lParam=0)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=31, unsigned int wParam=0, long lParam=0)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] 

  user32.dll!77d18816()  

  user32.dll!77d28ea0()  

  user32.dll!77d28eec()  

  ntdll.dll!7c92e473()  

  user32.dll!77d194be()  

  user32.dll!77d2c174()  

  user32.dll!77d48a8d()  

  user32.dll!77d3a2bc()  

  ntdll.dll!7c930435()  

  ntdll.dll!7c930385()  

  ntdll.dll!7c937e09()  

  user32.dll!77d50877()  

  user32.dll!77d5082f()  

  user32.dll!77d2c2e8()  

  user32.dll!77d19195()  

  msvcr90d.dll!__crtMessageWindowA(int nRptType=2, const char * szFile=0x03a74f54, const char * szLine=0x0012b3c0, const char * szModule=0x00000000, const char * szUserMessage=0x0012a3c0)  Line 363 + 0x16 bytes C

  msvcr90d.dll!_VCrtDbgReportA(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 420 + 0x28 bytes C

  msvcr90d.dll!_CrtDbgReportV(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, char * arglist=0x0012f454)  Line 241 + 0x1d bytes C

  msvcr90d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x03a74f54, int nLine=247, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)  Line 258 + 0x1d bytes C

  mfc90d.dll!AfxAssertFailedLine(const char * lpszFileName=0x03a74f54, int nLine=247)  Line 25 + 0x14 bytes C++

  ProfUIS284md.dll!CExtDockDynTabBar::CalcOrderedVector(CArray<CExtControlBar *,CExtControlBar *> & vBars={...})  Line 247 + 0x17 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::_InsertTemporaryItemsFromImpl(CExtControlBar * pBar=0x0f26a7c0, long & nIndex=0)  Line 1431 + 0x16 bytes C++

  ProfUIS284md.dll!CExtDynTabControlBar::InsertTemporaryItemsFrom(CExtControlBar * pBar=0x0f26a7c0, long nIndex=0, bool bUpdateTabWnd=false)  Line 1406 C++

  ProfUIS284md.dll!CExtControlBar::InternalDraggingState_t::DrawState(bool bErasingPrevious=false)  Line 15395 C++

  ProfUIS284md.dll!CExtControlBar::_DraggingUpdateState(const CPoint & point={...}, bool bForceFloatMode=false)  Line 12961 C++

  ProfUIS284md.dll!CExtControlBar::_OnMouseMoveMsg(unsigned int nFlags=1, CPoint point={...})  Line 9763 + 0x2b bytes C++

  ProfUIS284md.dll!CExtControlBar::_DraggingStart(const CPoint & point={...}, const CPoint & pointOffset={...}, CSize sizeWaitMouseMove={...})  Line 12636 + 0x24 bytes C++

  ProfUIS284md.dll!CExtControlBar::OnLButtonDown(unsigned int nFlags=1, CPoint point={...})  Line 10123 + 0x2d bytes C++

  mfc90d.dll!CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=-917408, long * pResult=0x0012f9e0)  Line 2183 C++

  mfc90d.dll!CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 1755 + 0x20 bytes C++

  mfc90d.dll!CControlBar::WindowProc(unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 506 + 0x14 bytes C++

  ProfUIS284md.dll!CExtControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 8622 C++

  ProfUIS284md.dll!CExtDynControlBar::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=-917408)  Line 4741 + 0x14 bytes C++

  mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0f26a7c0, HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 240 + 0x1c bytes C++

  mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 403 C++

  mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0040092c, unsigned int nMsg=513, unsigned int wParam=1, long lParam=-917408)  Line 441 + 0x15 bytes C++

  user32.dll!77d18734()  

  user32.dll!77d18816()  

  user32.dll!77d189cd()  

  user32.dll!77d196c7()  

  mfc90d.dll!AfxInternalPumpMessage()  Line 183 C++

  mfc90d.dll!CWinThread::PumpMessage()  Line 900 C++

  mfc90d.dll!CWinThread::Run()  Line 629 + 0xd bytes C++

  mfc90d.dll!CWinApp::Run()  Line 865 C++

  mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 47 + 0xd bytes C++

  MyApp.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f40, int nCmdShow=1)  Line 34 C++

  MyApp.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes C

  MyApp.exe!WinMainCRTStartup()  Line 403 C

  kernel32.dll!7c817077()  

  MyApp.exe!std::vector<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> >::_Insert_n(std::_Vector_const_iterator<ObjectInstanceXMLMarshaller::ModuleObjectDescription,std::allocator<ObjectInstanceXMLMarshaller::ModuleObjectDescription> > _Where={_ModuleName={...} _ModuleDescription={...} }, unsigned int _Count=3435973836, const ObjectInstanceXMLMarshaller::ModuleObjectDescription & _Val={...})  Line 1198 C++

  cccccccc() 


7). Hit F5, and we will get the same information as Step 6 repeatedly.

Technical Support Feb 3, 2010 - 12:11 PM

Very unfortunately, the call stack listing hasn’t helped us. Could you send us the UI related source code? We need the main frame’s source code first of all. We can also connect to your desktop remotely and clarify what’s wrong.

Krustys Donuts Feb 2, 2010 - 1:35 AM

I forgot to mention that I have already studied the "MDI" project in the "Samples" folder, to see how the tabs are created and docked.  I don’t think this "MDI" project and my project have any difference on the main working flow but "MDI" works very well while mine crashes...  Am I missing some important details??