Hi everybody
I'm working with a project in embedded Visual Studio 4 and I have a
general problem which I hope that somebody can help me with. My problem
is the following:
My project works fine in debug version but behaves strangely and
sometimes crashes when I run it in release version. I suspect that it
is some sort of memory problem but it is not that easy to find out what
the problem exactly is (the project is rather big with maybe 30000
lines of code).
It should be the same code that runs in the both versions, right? Or is
there some part of the code in a project that might differ in debug and
release version?

Thanks for all your help.
Regards.
/Babak

Re: Problem only in release version! by Alex

Alex
Mon Oct 10 17:30:50 CDT 2005

There are quite a few things different between debug and release builds.
System libraries have code ifdef'ed using DEBUG symbol. E.g. ATL will inject
some reference tracking code. But the major difference is with memory. Heap
allocator fills all newly allocated memory with 0xCD and once it is freed,
it fills it with 0xDD. Some other filler bytes exist. This often results in
difference in behaviour.


"babak" <babak.ayani@gmail.com> wrote in message
news:1128957366.260115.258340@g47g2000cwa.googlegroups.com...
> Hi everybody
> I'm working with a project in embedded Visual Studio 4 and I have a
> general problem which I hope that somebody can help me with. My problem
> is the following:
> My project works fine in debug version but behaves strangely and
> sometimes crashes when I run it in release version. I suspect that it
> is some sort of memory problem but it is not that easy to find out what
> the problem exactly is (the project is rather big with maybe 30000
> lines of code).
> It should be the same code that runs in the both versions, right? Or is
> there some part of the code in a project that might differ in debug and
> release version?
>
> Thanks for all your help.
> Regards.
> /Babak
>


Re: Problem only in release version! by babak

babak
Tue Oct 11 02:44:26 CDT 2005

Hi Alex
Thanks for your reply. The problem for me now is to find
out where in the code I might have uninitialized variables. As i said
before,
it a huge project I'm running so it could be pretty time consuming :(


Regards.
/Babak


Re: Problem only in release version! by r_z_aret

r_z_aret
Tue Oct 11 16:10:43 CDT 2005

I suggest checking a thread called "release/debug mode get different
run result in VC6.0?" in comp.os.ms-windows.programmer.misc that
started 9 Oct 2005.


On 10 Oct 2005 08:16:06 -0700, "babak" <babak.ayani@gmail.com> wrote:

>Hi everybody
>I'm working with a project in embedded Visual Studio 4 and I have a
>general problem which I hope that somebody can help me with. My problem
>is the following:
>My project works fine in debug version but behaves strangely and
>sometimes crashes when I run it in release version. I suspect that it
>is some sort of memory problem but it is not that easy to find out what
>the problem exactly is (the project is rather big with maybe 30000
>lines of code).
>It should be the same code that runs in the both versions, right? Or is
>there some part of the code in a project that might differ in debug and
>release version?
>
>Thanks for all your help.
>Regards.
>/Babak

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com