stack trace not working independently?

  • Thread starter Thread starter saju.prabhakaran
  • Start date Start date
S

saju.prabhakaran

We have an application developed in c++ and the development environment
is visual studio .net 2003. We have added a cpp program to the
application which will create a log file containing the trace back
details which will help us to identify the areas of application
crashes. The log file will contain details about the file name, line
number and the order of the called functions leading to the crash. The
cpp program we had added is stackwalker.cpp which is downloaded from
the net. This application is working fine in the system where we are
building the application. But when we copy the executable alone to a
different system where we dont have any supporting softwares like
visual studio .net 2003, it is creating a log file but the log file
does not have the necessary trace back details. Can any one say why the
trace back details is not getting generated when we run the executable
alone in a separate system. Is there any separate library files or dll
files that we need to include along with the executable or do we need
to make any changes in the environmental variable settings.
 
I'll take a guess and you need to run gflags (try gflags /?). I doubt this should be in a production system. What did the docs say on ..., well according to google

All the leaks will be listed in the file YouAppName.exe.mem.log in the application directory (only in debug builds; it is deactivated for release builds).

and
Visual Studio 7 and Win2K / NT
I found a problem with the executables built with VS7 and run on Win2K or NT. The problem is due to an old version of dbghelp.dll. The PDB files generated from VS7 are in a newer format (DIA). It appears that the VS installations do not update dbghelp.dll on Win2K. So the original version (5.0.*) is still on the system and will be used. But with this version it is not possible to read the new PDB format. So, no callstack can be displayed.

To get it to work you have to do the following
Download the latest Debugging Tools for Windows (which includes dbghelp.dll). You have to install it to get the files. But you only need the dbghelp.dll! Now we have another problem. The installer does not replace the original dbghelp.dll. So we need to copy the dbghelp.dll in our EXE dir. Now to make sure the right version is loaded you have to put a file with the name appname.local in your EXE dir (please replace appname with the EXE name (without extension)). Now it should also work on WinNT/2K.
 
Back
Top