same code works in Debug, crashes in Release!!!!

same code works in Debug, crashes in Release!!!!

Post by Max Glase » Fri, 20 Jun 1997 04:00:00



Hello Terry,

We have here the same situation. I am using VC++ 4.2 and now I was
downloading the 4.2b patch thinking that maybe it will help.

Our debug version works fine but the release version crashes
in the function Open or OpenEx (the same as you). The only thing
we know at the moment is that the program crashes in MCF42.DLL
We don't have no possibilty to encapsulate the problem without
debug information.

Our code is in a DLL and is an extension for the MS-Exchange Server.

I will very apreciate if You can forward me any answer to your
messages in the newsgroups giving a promising solution to this
problem. We are working on this since last week.

Regards,

Max Glaser

Ing.-Bro Dr. Glaser
Von-Beck-Str. 8
D-76133 Germany



Quote:> I'm working on a database application using VC 4.2 with the 4.2b patch
> applied. I've found that my code works fine as long as I build it as

Debug,
 
 
 

same code works in Debug, crashes in Release!!!!

Post by Terry Ra » Fri, 20 Jun 1997 04:00:00


The solution to my problem was creating a new project and copying my source
files (cpp and h files only) into the new project's dir. Then I just added
all the files into the project and rebuilt. Now debug and release works
fine.  The only explaination I can come up with is that one of my project
files (mdp or other) got corrupted.  At any rate, with the new project,
everything is working.



Quote:> I'm working on a database application using VC 4.2 with the 4.2b patch
> applied. I've found that my code works fine as long as I build it as
Debug,
> but when I build it as Release, it crashes!  Of course, I can't tell
> exactly where it's crashing in Release mode but based on the output of
the
> application, it seems to be crashing when it tries to open the database
> connection. I've tried using both the OpenEx and Open member functions of
> CDatabase and I get the same results.

> Is anyone else experiencing this problem? Does anyone have a solution
other
> than upgrade to 5.0 and cross your fingers?

> Thanks,

> Terry


 
 
 

same code works in Debug, crashes in Release!!!!

Post by Dennis N. Jum » Sat, 21 Jun 1997 04:00:00


Turn off the optimizers and recompile.
IF that works, Turn on (one at a time?) optimizations until you find the
set which works for your application
^^

Dennis



> Hello Terry,

> We have here the same situation. I am using VC++ 4.2 and now I was
> downloading the 4.2b patch thinking that maybe it will help.

> Our debug version works fine but the release version crashes
> in the function Open or OpenEx (the same as you). The only thing
> we know at the moment is that the program crashes in MCF42.DLL
> We don't have no possibilty to encapsulate the problem without
> debug information.

> Our code is in a DLL and is an extension for the MS-Exchange Server.

> I will very apreciate if You can forward me any answer to your
> messages in the newsgroups giving a promising solution to this
> problem. We are working on this since last week.

> Regards,

> Max Glaser

> Ing.-Bro Dr. Glaser
> Von-Beck-Str. 8
> D-76133 Germany



> > I'm working on a database application using VC 4.2 with the 4.2b patch
> > applied. I've found that my code works fine as long as I build it as
> Debug,

 
 
 

same code works in Debug, crashes in Release!!!!

Post by Frederic Tache » Sat, 21 Jun 1997 04:00:00


Hi,

what is the optimizing level you use for release compilation.
Perhaps you have bugs (memory leaks) that doesn't appear in debug mode,
because of the different use of memory manager.
You can try to build your app with No optimisation in release mode,
if it always hang, try to put some debug point (message windows) to search
what is(are) the part of code that make programs doesn't work.
If  you can't find where is the problem you could try to use some product
to check memory leaks (I know Numega Bounds Checker, I'm not sure but it
seem that they have an evaluation version on their site)

Good luck
Frederic Tachet


Quote:>I'm working on a database application using VC 4.2 with the 4.2b patch
>applied. I've found that my code works fine as long as I build it as
Debug,
>but when I build it as Release, it crashes!  Of course, I can't tell
>exactly where it's crashing in Release mode but based on the output of
the
>application, it seems to be crashing when it tries to open the database
>connection. I've tried using both the OpenEx and Open member functions of
>CDatabase and I get the same results.

>Is anyone else experiencing this problem? Does anyone have a solution
other
>than upgrade to 5.0 and cross your fingers?

>Thanks,

>Terry

 
 
 

same code works in Debug, crashes in Release!!!!

Post by Frederic Tache » Sat, 21 Jun 1997 04:00:00


Hi,

what is the optimizing level you use for release compilation.
Perhaps you have bugs (memory leaks) that doesn't appear in debug mode,
because of the different use of memory manager.
You can try to build your app with No optimisation in release mode,
if it always hang, try to put some debug point (message windows) to search
what is(are) the part of code that make programs doesn't work.
If  you can't find where is the problem you could try to use some product
to check memory leaks (I know Numega Bounds Checker, I'm not sure but it
seem that they have an evaluation version on their site)

Good luck
Frederic Tachet


Quote:>I'm working on a database application using VC 4.2 with the 4.2b patch
>applied. I've found that my code works fine as long as I build it as
Debug,
>but when I build it as Release, it crashes!  Of course, I can't tell
>exactly where it's crashing in Release mode but based on the output of
the
>application, it seems to be crashing when it tries to open the database
>connection. I've tried using both the OpenEx and Open member functions of
>CDatabase and I get the same results.

>Is anyone else experiencing this problem? Does anyone have a solution
other
>than upgrade to 5.0 and cross your fingers?

>Thanks,

>Terry