Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No call stack in VS2010 debugger

I've got an app that loads a DLL, and subsequently crashes. I modified the IDE's working directory to be the solution build directory, so that I could run the debugger on the built DLL which is built from another project in this solution. When the app gets an access violation, I can see the current function, but nothing of the call stack, and none of the locals will evaluate. I've checked and there are debugger symbols in this directory, and it was all built in debug mode. What could be the cause of the debugger failing?

Edit: If I place a breakpoint, then the debugger works fine- although, of course, this still doesn't tell me why the app is crashing, but I do get a call stack and all the symbols will happily evaluate.

like image 381
Puppy Avatar asked Oct 11 '22 21:10

Puppy


1 Answers

Having the debugger work when it hits a break point and fails when you break after an access violation in native code usually a sign that the access violation is preceded or accompanied by a corruption of the stack.

The debugger depends on certain values in the stack being properly set in order for it to both build the correct stack view and access local variables. If this data is corrupted it can prevent both locals from being displayed and an accurate picture of the stack from being generated.

In the case where you hit the break point before the access violation the stack is still in tact and the debugger can freely view information.

like image 115
JaredPar Avatar answered Oct 20 '22 00:10

JaredPar