Discussion:
Windbg and process monitoring
(too old to reply)
Arnie
2007-11-13 16:42:21 UTC
Permalink
Hi all,

VS2005, C++. I have one app, out of many, at one customer, out of many,
that falls off the closing brace of main() and then causes a GPF. I have
never used windbg. I was wondering if it could be used to catch this kind
of problem. The app is built in release mode but I could get the matching
PDB file over to the customer. Would something like this work for my
purpose?

Thanks,
- Arnie
Nathan Mates
2007-11-13 17:31:25 UTC
Permalink
Post by Arnie
VS2005, C++. I have one app, out of many, at one customer, out of
many, that falls off the closing brace of main() and then causes a
GPF. I have never used windbg. I was wondering if it could be used
to catch this kind of problem. The app is built in release mode but
I could get the matching PDB file over to the customer. Would
something like this work for my purpose?
Think about this logically: even after the bottom of main(), is it
possible for some code of yours to run? In C++, absolutely. All your
static globals will have their static destructors called. What's very
likely is that you've got some memory trashing or other errors that
aren't caught until then.

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Arnie
2007-11-13 20:00:18 UTC
Permalink
Post by Nathan Mates
Think about this logically: even after the bottom of main(), is it
possible for some code of yours to run? In C++, absolutely. All your
static globals will have their static destructors called. What's very
likely is that you've got some memory trashing or other errors that
aren't caught until then.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Thanks for the reply Nathan. I certainly agree that memory is being trashed
somewhere. The problem is where.

Therre are no global objects but there are objects created on the stack in
main(). The objects are destroyed when going out of scope of main(). I
have tried creating these objects directly on the stack as well as using
boost: shared_ptr. The problem persists no matter what I do. I can't
reproduce it inhouse. I've debugged through all of the destructors after
main() ends and all is well - here anyway. I can't debug at the customer
site.

The problem is "Why only one console app at only one customer?" We have
around 80 console apps there and many are structured in a similar way. But,
only this one fails. That's why I was looking for something that could
"watch over" the process and give me some info on the GPF

- Arnie
Gerard O'Brien
2007-11-14 19:17:19 UTC
Permalink
Post by Arnie
Post by Nathan Mates
Think about this logically: even after the bottom of main(), is it
possible for some code of yours to run? In C++, absolutely. All your
static globals will have their static destructors called. What's very
likely is that you've got some memory trashing or other errors that
aren't caught until then.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Thanks for the reply Nathan. I certainly agree that memory is being trashed
somewhere. The problem is where.
Therre are no global objects but there are objects created on the stack in
main(). The objects are destroyed when going out of scope of main(). I
have tried creating these objects directly on the stack as well as using
boost: shared_ptr. The problem persists no matter what I do. I can't
reproduce it inhouse. I've debugged through all of the destructors after
main() ends and all is well - here anyway. I can't debug at the customer
site.
The problem is "Why only one console app at only one customer?" We have
around 80 console apps there and many are structured in a similar way. But,
only this one fails. That's why I was looking for something that could
"watch over" the process and give me some info on the GPF
- Arnie
You should check out DebugDiag
http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en
Arnie
2007-11-14 21:58:34 UTC
Permalink
Post by Gerard O'Brien
You should check out DebugDiag
http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en
Thanks. I'll take a look at it.

- Arnie

Loading...