Re: Profiling or Debugging Help
Mike Copeland wrote:
This product is now more than ten years old and unsupported. It might be the
right choice considering that you target similarly obsolete win98 though.
Just wanted to mention that.
I have developed a 32bit Console application that has started to
abort with Stack faults at predictable and repeatable intervals. From
what I read, there's a presumed level of recursion being exceeded
(actually, I doubt that...) or subroutine nesting that is too high.
What exactly do you get as error?
Looking at the code doesn't seem to bear out either...
I'm seeking some way to "profile" this application, so that I can see
where the problem is occurring. I have the faulting address, but I
don't know how to use that information.
The problem occurs when I run this program in its intended
environment: Windows 98 on laptops. I cannot get this error to occur in
the VS6.0 IDE (where it might be easier to track down the problem), and
I'm wondering what tools, information, or techniques might help me
discover and fix the problem.
On what OS are you running VC6? If not on win98, you might try to do that
for a test. You can also activate debug symbols for release builds
(debugging gets a bit whacky due to the optimizer, but is feasible). You
could also checkpoint the stack consumption by storing a local var's
address in main() and then comparing with other locals' addresses lateron
to see how far they are apart. Lastly, I believe that the win32 API allows
detecting and handling stack overflows, I seem to remember that Boost.Regex
uses this feature to properly handle bloated regular expressions.
Perhaps there's a compiler setting that might increase the Stack
limit, but beyond a temporary fix that's not a permanent solution I want
That's in the linker settings. Further, you can specify a stack size when
creating threads. You could try to reduce the stack size and see if the
problem then occurs on your development machine or increase it and see if
it vanishes on the target machine.
C++ FAQ: http://parashift.com/c++-faq-lite
Sator Laser GmbH
Gesch??ftsf??hrer: Thorsten F??cking, Amtsgericht Hamburg HR B62 932