473,804 Members | 3,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stack trace not working independently?

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.

Apr 11 '06 #1
6 2176
sa************* *@gmail.com wrote:
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.


This is not a C++ language question. You should instead ask it in a
Microsoft-specific group, or ask it of the vendor of stackwalker.cpp .
See this FAQ for what is on-topic in this group and for some
suggestions of where else you might post:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

Apr 11 '06 #2

<sa************ **@gmail.com> píse v diskusním príspevku
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
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.


If you look at its implementation you will see that it relies on MS's
dbghelp.dll (imagehlp.dll), which implements the tracing capabilities and
interprets the MS debugging information, so that stack can be traced
and function addresses can be translated to function names. The reason
why it does not work on your machine is (either or both):

a) symbol files (.pdb) for your executable and dlls are not present on the
target computer

b) the supporting dlls on the target computer do not understand debugging
information produced by MSVC7.1 (this is very likely - for example
dbghelp.dll/imagehlp.dll shipped with Windows2000 does not understand
PDB files generated by MSVC7)

Back in 2003 I implemented another stack tracer that takes a similar
approach as stackwalker.cpp does. You might want to look at:
http://cvs.sourceforge.net/viewcvs.p...=1.8&view=auto

-- Marek

Apr 11 '06 #3
Thanks for your great help.
Is there any way to fix this issue, i mean make the present executable
working in another windows machine..
Shall i copy all thie required dll and .pdb file to the second machine
where my executable having problem.?

sam

Apr 12 '06 #4
> Is there any way to fix this issue, i mean make the present executable
working in another windows machine..
Shall i copy all thie required dll and .pdb file to the second machine
where my executable having problem.?


Yes. Copy the pdb files and the required DLLs. Debugger can be used to
determine what DLLs are mapped to your process (this should actually be
inspected after a stack trace is dumped because SymInitialize() might load
other DLLs).

Be aware that the stackwalk.cpp implementation (unlike mine) does not work
on NT4 nor W9x. However, this is probably no longer an issue...

-- Marek


Apr 12 '06 #5
Hi Marek,

Could you please help us in sharing the piece of sample code for
tracking the Stacks in release and debug code .We are not getting the
reuslts what we are expected.We are not able get the base class
StackTracer and stack_tracer_wi n32.h file.

We are getting compilation results when we build with #include
<dbghelp.h> included in the code .We dont find this file in my system.
Thanks in advance

Apr 12 '06 #6
sa************* *@gmail.com wrote:
Hi Marek,

Could you please help us in sharing the piece of sample code for
tracking the Stacks in release and debug code .We are not getting the
reuslts what we are expected.We are not able get the base class
StackTracer and stack_tracer_wi n32.h file.

We are getting compilation results when we build with #include
<dbghelp.h> included in the code .We dont find this file in my system.


How about taking this to an MS newsgroup?
Apr 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2518
by: Andy Fish | last post by:
Hi, in my c# code I have something like this: try { ... } catch (Exception ex) { ... throw ex; }
13
25568
by: Ben R. Bolton | last post by:
The documentation indicates that the threads "default stack size" is 1MB. The work "default" implies that it can be changed. Is it possible to change the StackSize in .NET? If so how? Is it possible to determine the amount of memory used in the current stack? Any assistance would be appreciated. Ben
1
4788
by: Jason Coyne | last post by:
I am trying to use the StackTrace class to get my current stack trace for some logging. Everything is working fine, except when I am using threading (specifically WaitCallBack and ThreadPool.QueueUserWorkItem) When I try to walk the stack from a location that has been called via QueueUserWorkItem, the stack stops at the point where the thread was launched. Is there a way to walk back further into the parent thread's stack (at the time...
3
24530
by: Jeremy | last post by:
While working with ASP.NET I've sometimes encountered errors in my applications, but I've always known exactly why I'm getting the error and have been able to fix it. So I've never needed to understand the Stack Trace, but I want to understand the stack trace so can somebody please explain it to me or point me to something that will Thanks Jeremy
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.