locked
Program crashed during DLLs loading stage -- anyway to know which DLL has problem? RRS feed

  • Question

  • Hello All,

    I am trying to run a 32-bit Debug built of a program in Visual Studio 2008 SP1.  The program was initially developed in Visual Studio 6.0 and eventually port to VS 2005 and then 2008.  The exectuable was built without errors.  However when I try to debug it, it stopped in the middle of loading the DLLs:

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\mct-59497\Win32\Debug\MCTCalculatorWin32D.exe'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\mct-59497\Win32\Debug\MCTDomainWin32D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcp90d.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugMFC_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_c94a3a24\mfc90d.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\user32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\msimg32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'

    'MCTCalculatorWin32D.exe': Loaded '\\theocc.com\shares\Department\Quantitative Risk Management\David\U\Predict\9.0.0.0\DLL\PRCDBAccess2000D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\odbc32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\common-library-trunk\occ-gui\Distribution\DLL\OCCGUIM9101D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\common-library-trunk\occ-stl\Distribution\DLL\OCCSTLDLLM91001D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\common-library-trunk\occ-logging\Distribution\DLL\OCCLoggingM9101D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\common-library-trunk\occ-sync\Distribution\DLL\OCCSyncDLLM9100D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\common-library-trunk\occ-sys-log\Distribution\DLL\OCCSysLogM9101D.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMFixedIncome.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\mct-59497\Win32\Debug\gsl.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\mct-59497\Win32\Debug\cblas.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_d495ac4e\msvcr90.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMGnuScientificLibrary.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMAlgorithmLibrary.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMStatsLibrary.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMMathLibraryACML.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\mct-59497\Win32\Debug\libacml_dll.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\Program Files\MATLAB\R2008b\bin\win32\libifcoremd.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\Program Files\MATLAB\R2008b\bin\win32\libmmd.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMDateTimeLibrary.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMDBLibrary.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\odbcbcp.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\version.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\OCC-DATA\Data\qrm-59497\Debug\QRMTheoModelLibrary.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.MFCLOC_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_15fc9313\mfc90enu.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll'

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\system32\odbcint.dll'

    OCCGUI.DLL Initializing!

    'MCTCalculatorWin32D.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcm90d.dll'

    Debugger:: An unhandled non-continuable exception was thrown during process load

    The program '[5288] MCTCalculatorWin32D.exe: Native' has exited with code -1073741701 (0xc000007b).

    I checked and all the dependent DLLs are present so it didn't look like it is missing DLLs.  I also tried the Depends.exe to check the dependency of the DLLs as well.

    The strange issue is I have no problem running the same code in debug version on other machines -- which has all 3 version of VS installed (VS 6.0, VS 8.0, VS 9.0).  However currently there are only 2 versions of VS installed on the machine I currently use (VS 8.0 and VS 9.0), and the problem exists.

    So I am wondering is there anything I can do to find out which DLL has problem loading?  Also is there any tools in C++ that helps me to step through the DLLs when they are being loaded?  I am not even able to get a stack snapshot when the program crashes.

    Any help is appreciated.  Thank you!

    moliu9394

    Wednesday, July 7, 2010 8:20 PM

Answers

  • Hi moliu9394,

    This issue seems like the application finds the DLL but not correct version. VS6.0 is difference from VS2005 and VS2008. It may offer some different DLLs with same name or it require the old version only.

    I believe your application crashes before main entry point; it is hard to attach the process for debug. There is a tool called Gflags. Based on my understanding, it will help you attach the application to debug even it just start. It will specify that a particular program always runs in a debugger. This setting is stored in the registry. It is effective immediately and remains effective until you change it. For more information, see http://technet.microsoft.com/en-us/library/cc738763(WS.10).aspx

    I hope this will help you figure out the problem.

    In addition, if you find there are correct version of DLLs in your system but not load successfully, consider the order for searching the DLLs.  See http://msdn.microsoft.com/en-us/library/7d83bc18.aspx. To reduce such issue, we suggest you locate the special DLLs in the application folder.

    Cheers,

    Yi

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Yi Feng Li Wednesday, July 14, 2010 4:42 AM
    Friday, July 9, 2010 7:20 AM