Occcont.cpp 925 assertion in Dialog when moving from VC++ 6.0 to VS2015
Article
Question
Monday, July 27, 2015 5:35 PM
Hi,
I have an app developed in VC++ 6.0 that i'm using the 2D Graph ActiveX Control in a dialog. I'd been using the control fine in 64 and 32 bit windows7. Now I'm trying to move to VS2015 - compiles OK but gets the following when it loads the dialog the control is in:
When i remove the graph control from the dialog my program runs OK. Note I tried registering ntgraph.ocx using both regsvr32 and syswow64\regsvr32 - registration successful, but program crashes same way.
Also - when i create a new project "from scratch" using VS2015, and put the NTGraph control in a dialog in that project, it seems to run fine. So then i tried deleting and re-adding the NTGraph control to the dialog in my recompiled project - still get the same assertion.
Any ideas how to debug this? Here's more detailed info:
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imagehlp.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\LabJackUD.dll'. Module was built without symbols.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\LabJackWUSB.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winusb.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winspool.drv'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Program Files (x86)\Measurement Computing\DAQ\cbw32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mfc140d.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winnsi.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec86b8d6858ec0bc\comctl32.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'procedure_screen.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\comctl32.dll'. Cannot find or open the PDB file.
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\oleinit.cpp(68) : AppMsg - Warning: OleInitialize returned scode = RPC_E_CHANGED_MODE ($80010106).
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp(919) : AppMsg - Warning: Resource items and Win32 Z-order lists are out of sync. Tab order may be not defined well.
Debug Assertion Failed!
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
Thanks so much!!!
All replies (2)
Monday, July 27, 2015 6:31 PM âś…Answered
Did you tried rebuilding your solution and it looks like Initialization is failing in your case. look for RPC_E_CHANGED_MODE in the MSDN A previous call to CoInitializeEx specified the concurrency model for this thread as multithread apartment (MTA). This could also indicate that a change from neutral-threaded apartment to single-threaded apartment has occurred.
Thanks
Rupesh Shukla
Monday, July 27, 2015 10:13 PM
Rupesh,
Thanks very much for the answer. I found a call to CoInitializeEx. When i remove that call the dialog will initialize including the graph control. Here's the code (note the comments make it work):
I've been working on this application for some time now, so i backtracked to find out why that call is there. Turns out, i'd added a MS Access database to it, and needed ATL support for that. That call to CoInitializeEx was added by Class Wizard, when i added the ATL support.
You can anticipate my next question - is a call to CoInitializeEx needed anymore (since i've moved from VC++ 6.0 to VS2015 and rebuilt) - things SEEM to be working OK but i don't want to create a problem later on down the line.