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 » RibbonBar sample crash Collapse All
Subject Author Date
Ian McIntosh Jul 25, 2007 - 12:55 PM

Hi,

I have an app that uses a ribbonbar. The ribbonbar is crashing on initialisation with the following call stack:

>    ProfUIS270m.dll!CExtCustomizeSite::OnCreateToolbarButton(CExtToolControlBar * pBar=0x01fa8b50, CExtCustomizeCmdTreeNode * pNodeI=0x01fb7f40, CExtCustomizeCmdTreeNode * pNodeC=0x01fb7f40) Line 8288    C++
    ProfUIS270m.dll!CExtRibbonNode::OnRibbonCreateBarButton(CExtRibbonPage * pBar=0x01fa8b50, CExtBarButton * pParentTBB=0x01fce5b0) Line 799 + 0x1a bytes    C++
    ProfUIS270m.dll!CExtRibbonNode::Ribbon_InitBar(CExtRibbonPage * pBar=0x01fa8b50, CExtBarButton * pParentTBB=0x01fce5b0, bool bInsertThisNode=true) Line 952 + 0x16 bytes    C++
    ProfUIS270m.dll!CExtRibbonNode::Ribbon_InitBar(CExtRibbonPage * pBar=0x01fa8b50, CExtBarButton * pParentTBB=0x00000000, bool bInsertThisNode=true) Line 969 + 0x14 bytes    C++
    ProfUIS270m.dll!CExtRibbonNodeTabPage::Ribbon_InitBar(CExtRibbonPage * pBar=0x01fa8b50, CExtBarButton * pParentTBB=0x00000000, bool bInsertThisNode=true) Line 3635 + 0x15 bytes    C++
    ProfUIS270m.dll!CExtRibbonNodeTabPageCollection::Ribbon_InitBar(CExtRibbonPage * pBar=0x01fa8b50, CExtBarButton * pParentTBB=0x00000000, bool bInsertThisNode=true) Line 3503 + 0x15 bytes    C++
    ProfUIS270m.dll!CExtRibbonNode::Ribbon_InitBar(CExtRibbonPage * pBar=0x01fa8b50, CExtBarButton * pParentTBB=0x00000000, bool bInsertThisNode=false) Line 969 + 0x14 bytes    C++
    ProfUIS270m.dll!CExtRibbonBar::SetButtons(CExtCustomizeCmdTreeNode * pNode=0x01fb17e0) Line 15733    C++

The trigger seems to be a call to LoadLibrary to load a dll that happens before anything else. If I take out the LoadLibrary call, it works fine. If I make the dll use ANSI character set it also works, but if the dll uses MBCS it crashes. I have replicated this using a new MFC dll to eliminate any code in the dll as the problem.

Any ideas?

Also, I was going to try to replicate this using the RibbonBar sample, but when I build this in MBCS it crashes.
I have built the ribbonBar sample with profUIS v2.70 MBCS.
It crashes on start up with this call stack:

>    mfc80d.dll!AfxAssertValidObject(const CObject * pOb=0x00000000, const char * lpszFileName=0x0129dddc, int nLine=4609) Line 78    C++
    ProfUIS270md.dll!007e9026()     
    [Frames below may be incorrect and/or missing, no symbols loaded for ProfUIS270md.dll]    
    ProfUIS270md.dll!007e9ea0()     
    ProfUIS270md.dll!007e71b7()     
    ProfUIS270md.dll!007e483a()     
    ProfUIS270md.dll!007ebc7e()     
    ProfUIS270md.dll!007e2a27()     
    ProfUIS270md.dll!00728d5f()     
    RibbonBar-md.exe!CMainFrame::OnCreate(tagCREATESTRUCTA * lpCreateStruct=0x0012f5d8) Line 1274 + 0x35 bytes    C++
    mfc80d.dll!CWnd::OnWndMsg(unsigned int message=1, unsigned int wParam=0, long lParam=1242584, long * pResult=0x0012f2a8) Line 2000 + 0xd bytes    C++
    mfc80d.dll!CWnd::WindowProc(unsigned int message=1, unsigned int wParam=0, long lParam=1242584) Line 1741 + 0x20 bytes    C++
    RibbonBar-md.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=1, unsigned int wParam=0, long lParam=1242584) Line 388 + 0x14 bytes    C++
    mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x0037b920, HWND__ * hWnd=0x012e1122, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1242584) Line 240 + 0x1c bytes    C++
    mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x012e1122, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1242584) Line 389    C++
    mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x012e1122, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1242584) Line 411 + 0x15 bytes    C++
    user32.dll!7e418734()     
    user32.dll!7e41d05b()     
    user32.dll!7e41b4c0()     
    user32.dll!7e41f9fe()     
    ntdll.dll!7c90eae3()     
    user32.dll!7e41fe13()     
    user32.dll!7e41fdd9()     
    ntdll.dll!7c96e0d4()     
    ntdll.dll!7c96d886()     
    ntdll.dll!7c949d18()     
    ntdll.dll!7c91b686()     
    ntdll.dll!7c926a44()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c96e0f0()     
    ntdll.dll!7c96e0d4()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c96cde9()     
    ntdll.dll!7c96e0d4()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c96cde9()     
    ntdll.dll!7c96e0f0()     
    ntdll.dll!7c96e0d4()     
    ntdll.dll!7c9268ad()     
    ntdll.dll!7c91056d()     
    ntdll.dll!7c96e0d4()     
    ntdll.dll!7c94a5d0()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c9268ad()     
    ntdll.dll!7c91b686()     
    ntdll.dll!7c91b298()     
    ntdll.dll!7c9106eb()     
    ntdll.dll!7c91056d()     
    user32.dll!7e419951()     
    ntdll.dll!7c91b686()     
    ntdll.dll!7c91b298()     
    ntdll.dll!7c9106eb()     
    user32.dll!7e418df1()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c9268ad()     
    ntdll.dll!7c91056d()     
    user32.dll!7e43ecaa()     
    user32.dll!7e41d4ee()     
    user32.dll!7e42ddad()     
    user32.dll!7e42dd98()     
    user32.dll!7e42dd52()     
    user32.dll!7e42dd5c()     
    ntdll.dll!7c91056d()     
    ntdll.dll!7c9176da()     
    ntdll.dll!7c917786()     
    ntdll.dll!7c9174d9()     
    ntdll.dll!7c917638()     
    kernel32.dll!7c80a661()     
    ntdll.dll!7c910833()     
    user32.dll!7e41fecc()     
    ntdll.dll!7c9106eb()     
    ntdll.dll!7c9175ba()     
    user32.dll!7e41ff66()     
    mfc80d.dll!AfxCtxCreateWindowExA(unsigned long dwExStyle=0, const char * lpClassName=0x001641d8, const char * lpWindowName=0x02337c18, unsigned long dwStyle=114278400, int X=-2147483648, int Y=-2147483648, int nWidth=-2147483648, int nHeight=-2147483648, HWND__ * hWndParent=0x00000000, HMENU__ * hMenu=0x06f70b27, HINSTANCE__ * hInstance=0x00400000, void * lpParam=0x00000000) Line 438 + 0xa1 bytes    C++
    mfc80d.dll!CWnd::CreateEx(unsigned long dwExStyle=0, const char * lpszClassName=0x001641d8, const char * lpszWindowName=0x02337c18, unsigned long dwStyle=13598720, int x=-2147483648, int y=-2147483648, int nWidth=-2147483648, int nHeight=-2147483648, HWND__ * hWndParent=0x00000000, HMENU__ * nIDorHMenu=0x06f70b27, void * lpParam=0x00000000) Line 694 + 0x35 bytes    C++
    mfc80d.dll!CFrameWnd::Create(const char * lpszClassName=0x001641d8, const char * lpszWindowName=0x02337c18, unsigned long dwStyle=13598720, const tagRECT & rect={...}, CWnd * pParentWnd=0x00000000, const char * lpszMenuName=0x00000080, unsigned long dwExStyle=0, CCreateContext * pContext=0x00000000) Line 564 + 0x54 bytes    C++
    mfc80d.dll!CFrameWnd::LoadFrame(unsigned int nIDResource=128, unsigned long dwDefaultStyle=13598720, CWnd * pParentWnd=0x00000000, CCreateContext * pContext=0x00000000) Line 696 + 0x35 bytes    C++
    RibbonBar-md.exe!CRibbonBarApp::InitInstance() Line 53 + 0x20 bytes    C++
    mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f1d, int nCmdShow=1) Line 37 + 0xd bytes    C++
    RibbonBar-md.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f1d, int nCmdShow=1) Line 33    C++
    RibbonBar-md.exe!__tmainCRTStartup() Line 589 + 0x35 bytes    C
    RibbonBar-md.exe!WinMainCRTStartup() Line 414    C