Re: Unusual (to me) local variable corruption problem

As I noted, the problem does not exhibit after a debug build. I don't
think asking the debugger to watch the location would particularly
help in any case since afaik it does not do so on an instruction by
instruction basis, and I already know "well enough" where it occurs -
a call to a function about 10 lines long that calls a couple of OLE
functions. I haven't tried to isolate further because that last
function isn't related to the problem variable and shouldn't touch
memory anywhere near it, except for another int on the stack near the
problem, but which I'm pretty sure I've cleared of guilt.

I could step through that last function but to actually see where the
problem occurs I'd end up doing it at the asm level where a couple of
innocent calls to OLE API's will turn into pages of code. So I was
hoping to piggyback on someone's previous experience with a similar

[Actually there's something scary going on with the OLE libraries - my
first problem came when I handed a release version of the "thoroughly
debugged" program to my user and it wouldn't even open a spreadsheet
for him. It launched Excel but the command to open a workbook failed.
I beat on that for a while and "fixed" that problem by telling the
compiler to use "default" optimization rather than "best speed" which
had been the choice. I think I have the latest libraries fwiw.]

"William DePalo [MVP VC++]" <> wrote:

"JT" <NgPoster@xxxxxxxxxxx> wrote in message
I have a fairly prosaic Win32 GUI app that corrupts an int local to
one of my functions. Changing the position of the int on the
function's stack "solves" the problem, as if I'm writing something to
the wrong location, but a dummy variable placed in that location does
not suffer the same fate. Nor does placing large dummy arrays on
either side of the problem variable (which of course dramatically
changes its location relative to its active neighbors) isolate the
problem variable from its unknown assailant.

Have you tried setting a "data breakpoint" so that the debugger notifies you
when the integer's value changes?



Relevant Pages

  • Re: Unusual (to me) local variable corruption problem
    ... I would suspect calling convention mismatch or number of arguments ... Are those OLE functions of some COM objects, ... [Actually there's something scary going on with the OLE libraries - my ... Have you tried setting a "data breakpoint" so that the debugger notifies ...
  • Re: About Post "It actually happened!"
    ... The debugger in D7 is crap. ... Ole ... Prev by Date: ...
  • VarR8Round bug?
    ... Please give me some advice ... //in debugger this value is shown as 0.014999999999999999 ... I post my question in this newsgroup because VarR8Round is part of OLE ... Is this newsgroup proper place for my question? ...
  • Re: Need Help Debugging
    ... you should use straight and plain ADPlus.VBS from the debugger package. ... debug info loaded, etc... ... does that avoid using the stack ?!? ... which is our custom CRITICAL_SECTION class. ...
  • Re: AD+ crash logs and .dmps Part II
    ... This a .dll provided by an online payment verification ... The Debugger docs have some basic info but overall, understanding ... details the formation and usage of the stack. ...