I am trying to work out what code is causing our application to crash using WinDbg.
We have the .pdb symbols for our compiled application in the following folder:
E:\MyApplication
In order to load the symbols we set the symbol path to:
E:\MyApplication;srv*E:\Symbols*https://msdl.microsoft.com/download/symbols;
This should load our local pdb files from the E drive then all other symbols will be loaded from the symbol server and cached to the E:\Symbols folder.
However if I set !sym noisy
and then run !analyze -v
:
SYMSRV: UNC:
e:\MyApplication\MyApplication.exe\5AB2A76A278000\MyApplication.exe - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.exe\5AB2A76A278000\MyApplication.ex_ - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.exe\5AB2A76A278000\file.ptr - path not found
SYMSRV: RESULT: 0x80070003
SYMSRV: BYINDEX: 0x1A
e:\symbols*https://msdl.microsoft.com/download/symbols
MyApplication.exe
5AB2A76A278000
SYMSRV: UNC: e:\symbols\MyApplication.exe\5AB2A76A278000\MyApplication.exe - path not found
SYMSRV: UNC: e:\symbols\MyApplication.exe\5AB2A76A278000\MyApplication.ex_ - path not found
SYMSRV: UNC: e:\symbols\MyApplication.exe\5AB2A76A278000\file.ptr - path not found
SYMSRV: HTTPGET: /download/symbols/MyApplication.exe/5AB2A76A278000/MyApplication.exe
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.exe/5AB2A76A278000/MyApplication.ex_
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.exe/5AB2A76A278000/file.ptr
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: RESULT: 0x80190194
DBGHELP: C:\Program Files (x86)\Windows Kits\10\Debuggers\MyApplication.exe - file not found
DBGHELP: e:\MyApplication\MyApplication.exe - OK
DBGHELP: e:\MyApplication\MyApplication.exe found
DBGENG: Partial symbol load found image e:\MyApplication\MyApplication.exe.
SYMSRV: BYINDEX: 0x1B
e:\MyApplication
MyApplication.pdb
AC8AC5D12F6C47259920050B2F46CEF81
SYMSRV: UNC: e:\MyApplication\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pdb - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pd_ - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\file.ptr - path not found
SYMSRV: RESULT: 0x80070003
SYMSRV: BYINDEX: 0x1C
e:\symbols*https://msdl.microsoft.com/download/symbols
MyApplication.pdb
AC8AC5D12F6C47259920050B2F46CEF81
SYMSRV: UNC: e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pdb - path not found
SYMSRV: UNC: e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pd_ - path not found
SYMSRV: UNC: e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\file.ptr - path not found
SYMSRV: HTTPGET: /download/symbols/MyApplication.pdb/AC8AC5D12F6C47259920050B2F46CEF81/MyApplication.pdb
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.pdb/AC8AC5D12F6C47259920050B2F46CEF81/MyApplication.pd_
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.pdb/AC8AC5D12F6C47259920050B2F46CEF81/file.ptr
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: RESULT: 0x80190194
DBGHELP: MyApplication.pdb - file not found
DBGHELP: D:\Services\TEST_SET\BuildAgent\work\5862d9870f4438d8\source\MyApplication\obj\Release\MyApplication.pdb - file not found
*** WARNING: Unable to verify checksum for MyApplication.exe
*** ERROR: Module load completed but symbols could not be loaded for MyApplication.exe
The E:\MyApplication directory does contain the MyApplication.pdb file.
Then running the analysis is useless due to the method names from our application being unknown, for example if I try to inspect the crashing exception:
0:000> !PrintException /d 00000223b92c1f28
Exception object: 00000223b92c1f28
Exception type: System.Runtime.InteropServices.SEHException
Message: External component has thrown an exception.
InnerException: <none>
StackTrace (generated):
SP IP Function
000000BEE7BFD900 0000000000000000 MyApplication.Wpf.UserControls.dll!Unknown+0x1
000000BEE7BFD9B0 00007FF8AD7EAF10 System_Core_ni!System.Linq.Enumerable+WhereSelectListIterator`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].MoveNext()+0x70
000000BEE7BFDA00 00007FF8549A7CF2 MyApplication.Util.Wpf.dll!Unknown+0x82
000000BEE7BFDA60 00007FF856EF9B02 MyApplication.Wpf.UserControls.dll!Unknown+0xc2
What am I missing to make the symbols load correctly?
You can see from the !sym noisy
logs where WinDbg is looking; if all else fails, you can just put the pdb exactly where its searching. For example, create this path:
e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81
and then copy MyApplication.pdb into the folder.
A proper approach, though, would probably be to learn about symstore and use it to build up your local symbol server.
User contributions licensed under CC BY-SA 3.0