|
Hi, folks!
I develop test & measurement systems for our manufacturing operation. One of my systems' updates has introduced a very reliable crash and I'm having some difficulty tracking down the problem.
I have a desktop PC set up the same way as my testers (w/o the hardware). When I run the app in debug mode there I can trace the program flow through the call stack window (I'm using the VC 6 IDE as my debugger). However, when I try the same thing on real hardware the CS window is blank (even if I set a break at WinMain). Also, if I try to use the step out of function button, the status bar displays a message saying the function has no return address (yet stepping through it returns just fine!).
Any clues as to how I can solve this? Both locations read the same project (dsw and dsp) files, so the settings should be the same, right?
Here are links to window snapshots showing the debugger in action. The first image is running on the desktop system, showing the proper view of the call stack. The second image is running on the test system. Note the absence of any info in the call stack window. The last image is also on the hardware, but using Wndbg. Note that the call stack seems to be ok.
Desktop View
Hardware View
Hardware View using WnDbg
TIA!
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Hi Jesse,
Have you tried setting up a symbol server to see if that improves things ?
A little self promotion, but only because I am trying to help...
Setting up a symbol server
Also, I assume you have copied the .pdb file to the 'real hardware' machine ?
regards,
|
|
|
|
|
|
Thanks for the link. That certainly sounds like my problem; I'll have a look into it.
Again, thanks!
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
cgreathouse,
That was it! Thank you very much.
Turned out that the imagehlp.dll on the system that worked was v 4.00. The version on the failing system was 5.00.2128.1. I replaced it with the v 4.00 and now I get a call stack.
Have a beer on me!
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
how i can say str.GetAt(i) != letter (A-Z) so it could be 12345,./0- etc
|
|
|
|
|
Maybe use !isalpha(str.GetAt(i)) or !iswalpha(str.GetAt(i))
(_istalpha() is the generic TCHAR version)
See isalpha, iswalpha, _isalpha_l, _iswalpha_l[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
thanks !
|
|
|
|
|
Is there a way to set an alternate directory for .ncb, .suo, and .aps files? They consume a lot of space on my USB flash drive. I can delete them as a temporary solution but then they get re-created later when I re-open the solution file.
|
|
|
|
|
I have an application that is writing data to a serial port. To allow all the data to be written before I do anything else I use while( pCom->tx_in_progress ){;} . While in the debug configuration this works without a problem but when I change to release and run the program it hangs. Any ideas?
Thanks.
|
|
|
|
|
Hi
do you have initial values in your parameters? Are you checking them before going into the loop. In debug the variables get values alone, but in release not. There are more messages about this problem in forum, take a look with search option
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I am initializing the variable when I instantiate my class. The problem seems to be in the while loop. If I turn off optimization, or just have the default, for my release configuration it runs. When I optimize for "maximum speed" the program hangs. It must be how the compiler is dealing with the "empty" while loop.
Any ideas? Thanks.
|
|
|
|
|
masnu wrote: While in the debug configuration this works without a problem but when I change to release and run the program it hangs. Any ideas?
Refer this[^] article by Joseph M. Newcomer.
Prasad
MS MVP - VC++
|
|
|
|
|
Thanks Prasad (and Joseph). I found the answer in his article.
For those who are curious the problem came about in the declaration of tx_in_progress. It was declared as int tx_in_progress . When I wrote while (pCom->tx_in_progress) {;} and optimized for speed the compiler assumed nothing in the loop modified the variable so it never checked it again, creating an endless loop. The solution is to declare it as volatile int which tells the compiler not to make any assumptions about the variable. I'm pretty sure that is the cause of it. If anyone has something different please let me know.
Great article by Joseph. Thanks.
|
|
|
|
|
please ..source code for program in oop in c++
i can't write program in c++ in oop please i want to be expert in oop
LORAN
To Be Or Not To Be
(KARFER)
|
|
|
|
|
Do you know C++ ? see MFC/C++ [^] is helpfuls?
|
|
|
|
|
You should search the definition for the "class" word, once you've read that you'll understand what is the oop about...
Then making that code will be easy (at the beggining) of course you can make it as hard as you want, but for example, look for the CButton source code or any other control in the MFC, and then you'll understand.
Hope this helps.
|
|
|
|
|
how can i check the stack-overflow through my programme.
|
|
|
|
|
|
thank you,i am reading it now!
|
|
|
|
|
I hope it solved your problem.
|
|
|
|
|
//this is add to stack function
<br />
void push (int x)<br />
{<br />
if (top >size -1)
cout <<"Stack is full";<br />
else<br />
<br />
stack[top++]=x;
}<br />
<br />
int pop ()<br />
{<br />
if (top >0)<br />
return stack[top--];<br />
else<br />
cout <<"stack is empty";<br />
}<br />
O.K ...
Go Head ...
To Be Or Not To Be
(KARFER)
|
|
|
|
|
loran1986 wrote: please ..source code for program in oop in c++
#include <iostream>
int main()
{
std::cout << "I've a long way to go...\n";
}
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Try a google search for object oriented scribble. Read through that code and you'll be an expert in no time.
|
|
|
|
|
Rick York wrote: Try a google search for object oriented scribble. Read through that code and you'll be an expert in no time.
Some testimonials of satisfied users of your suggestion:
1. I went through the code for a couple of minutes and now I am very confident. I am currently re-writing Linux - Mr. XYZ
2. Scribble code is the best. I wrote a mail server, right after going through the code. - Mr. ABCD
3. I wrote an ERP package for our company in C++, immediately after having a look at scribble code. - Mr. GHIJ
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|