3

I launch my program in debug mode with Visual Studio, but when it has crashed, the error doesn't seem to be caught by Visual Studio. I don't get the execution stack at all.

When I launch the application, I can see this message in the output of Visual Studio:

'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file

Could someone try to help me ? I don't really know what information I can give to you, so please ask !

Thanks.

Configuration: Visual Studio C++ 2010 Premium Windows server 2008

In the output, the last messages are (in french sorry, but I can translate some sentences if needed)

'app.exe' : Chargé 'C:\Windows\SysWOW64\msimg32.dll', Cannot find or open the PDB file.
Exception de première chance à 0x0048d6f7 dans app.exe : 0xC0000005: Violation d'accès lors de la lecture de l'emplacement 0x0000aa96.
'app.exe' : Déchargé 'C:\Windows\SysWOW64\msimg32.dll'
'app.exe' : Déchargé 'C:\Windows\SysWOW64\WSHTCPIP.DLL'
'app.exe' : Déchargé 'C:\Windows\SysWOW64\nlaapi.dll'
'app.exe' : Déchargé 'C:\Windows\SysWOW64\NapiNSP.dll'
'app.exe' : Déchargé 'C:\Windows\SysWOW64\winrnr.dll'
'app.exe' : Déchargé 'C:\Windows\SysWOW64\FWPUCLNT.DLL'
Le thread 'Thread Win32' (0x1840) s'est arrêté avec le code 1 (0x1).
Le thread 'Thread Win32' (0x4740) s'est arrêté avec le code 1 (0x1).
Le thread 'Thread Win32' (0x2554) s'est arrêté avec le code 1 (0x1).
Le thread 'Thread Win32' (0x743c) s'est arrêté avec le code 1 (0x1).
Le thread 'Thread Win32' (0x3f2c) s'est arrêté avec le code 1 (0x1).
Le programme '[1780] app.exe: Natif' s'est arrêté avec le code 1 (0x1).

Note: Thread on PDB : PDB auto download

Community
  • 1
  • 1
Flows
  • 3,675
  • 3
  • 28
  • 52
  • The exception is handled by your code so the debugger doesn't have a reason to stop the program. You can force it to stop with Debug + Exceptions, tick the Thrown checkbox for Win32 exceptions. – Hans Passant Nov 07 '13 at 17:33

1 Answers1

0

Sometimes the call stack becomes difficult for the debugger to decode. You can help the debugger by downloading all PDB files that the debugger needs to understand the stack. You have to have internet connection while debugging.

When exception is raised go to call stack, right-click on some of the lines that are not recognized, for instance on the line with ntdll.dll, or user32.dll, and in the menu select Load Symbols From > Microsoft Symbol Servers. Debugger will now have more information in the call stack.

Repeat the process until you have enough information on call stack to find lines from your code.

Dialecticus
  • 16,400
  • 7
  • 43
  • 103
  • So it will show eventually the call stack in the mentioned files, such as ntdll.dll ? Or it may find in my own program too ? I don't have internet when debugging, I will try to download PDB files manually. – Flows Nov 07 '13 at 15:50
  • You have to have at least some items in call stack so that it is possible to perform the right-click on them. You can also write the dump file and then debug from some other machine that does have the internet connection. Menu Debug > Save Dump As. I have never tried it, but there's a chance that it would work. – Dialecticus Nov 07 '13 at 15:58
  • I auto downloaded some PDB from another machine. I need to finish it but the issue is that I don't have any call stack ... In the menu Debogage->Windows I don't see "Call Stack" – Flows Nov 07 '13 at 16:37