Re: /MT and /MD

Tech-Archive recommends: Fix windows errors by optimizing your registry



Dave (Wilkinson), many thanx!

indeed, i have been flailing around for a long time.
but still i have gathered a lot of usefull info.
and i have ind. had trouble posting the right questions sometimes,
but i was rather new to newsgroups like these.

thanx to your stimulation i'm a big step further now
to solving it. i'm retracing in my source after jumping to the debugger.
i'm very close.
it seems that at the moment of a function call/jump,
a valid pointer translates into an invalid/bad pointer!

any suggestions on this?

marco

"marco 2" <rebel-6-out@xxxxxxxxx> schreef in bericht
news:44233b24$0$2021$ba620dc5@xxxxxxxxxxxxxxxxxxxxxx
code jockey wrote to me:

"If the code is making an out-of-bounds memory access, and if it is
comparing
it to 0, then the codepath may differ in Debug vs. Release builds.
In Release mode, this outside-the-boundary-area is not initialized, and
could be zero. In Debug mode, it may not be zero."

can anyone or code jockey explain this to me, because i don't
completely understand this.

marco




"Code Jockey" <gimme@xxxxxxxxxxxx> schreef in bericht
news:%23O0rnyrTGHA.1672@xxxxxxxxxxxxxxxxxxxxxxx
If the code is making an out-of-bounds memory access, and if it is
comparing
it to 0, then the codepath may differ in Debug vs. Release builds.

In Release mode, this outside-the-boundary-area is not initialized, and
could be zero. In Debug mode, it may not be zero.

Have you used CRTDBG.H?

Build a Release version with Debug symbols, and set watchpoints on areas
that you suspect may be getting overwritten.




"marco 2" <rebel-6-out@xxxxxxxxx> wrote in message
news:4421fa56$0$2031$ba620dc5@xxxxxxxxxxxxxxxxxxxxxx
ok,

(i've asked about it a 1000 times, but no one seems to
be able to really help me. this is taking too long,
that's why i want to skip to debug mode).

they are runtime access violations (exceptions):

1 in ntdll.dll in res=heap_alloc(size), res becomes invalid
2 a freaked out loop-index with a value of about -10000 (where it should
be
pos. and max. +200 or so)

1 and 2 occur in different circumstances.
what more do you need to know?

marco

"David Wilkinson" <no-reply@xxxxxxxxxxxx> schreef in bericht
news:esyppehTGHA.4740@xxxxxxxxxxxxxxxxxxxxxxx
marco 2 wrote:
since i upgraded my project from v5/6 to v8,
and switched to iostream (from iostream.h), i have serious errors in
release builds, but not in debug builds.
my own source contains more than 11.000 lines of vc++ code.
only 5 or 6 lines cause trouble!!!!
i've been stuck on this for 3 months!

now, my question (for now) is:
is it ok/advisable to set release aside, and continue working
in debug mode?

marco


marco:

In my opinion, NO! Fix your code, NOW!

What kind of errors are these? Compile, link, run?

David Wilkinson








.



Relevant Pages

  • Re: /MT and /MD
    ... then the codepath may differ in Debug vs. Release builds. ... In Debug mode, it may not be zero." ...
    (microsoft.public.vc.language)
  • Re: /MT and /MD
    ... that's why i want to skip to debug mode). ... i've been stuck on this for 3 months! ... in debug mode? ...
    (microsoft.public.vc.language)
  • Re: /MT and /MD
    ... If the code is making an out-of-bounds memory access, ... In Debug mode, ...
    (microsoft.public.vc.language)
  • Re: Problem only in release version!
    ... not executed in Release mode (I believe, but I also thought Debug ... initialized variables to zero, ... The Release version will not initialize anything 'naturally' ... >>the contents of the memory addresses they happen to get assigned to). ...
    (microsoft.public.dotnet.languages.vc)
  • Re: CPtrArray Performance
    ... CPtrArray has approximately the same performance as an ordinary array. ... are you measuring debug or optimized code? ... can completely swamp the actual function execution. ... In debug mode, you worry about getting it right. ...
    (microsoft.public.vc.mfc)