Works in Debug mode but not in Release mode 
Author Message
 Works in Debug mode but not in Release mode

I am compiling an IVR that has been ported from VS 6.0 to
VS.NET . The IVR picks up the phone when a call is made to
it and checks to see if it is normal business hours, after
hours, or a holiday and plays the appropriate messsage to
the caller. The IVR loads all this information from a
configuration file when it starts up.

So, in Debug mode the call sees that it is a holiday and
plays the holiday message, but when compiled in Release
mode and run it does not...no code has changed just the
compile mode. I tried stepping through it in Release mode
(since now with .NET you can) and found weird things
happening like NULL values where there shouldn't be and
other strange things. NONE of these things are found when
stepping through the code in Debug mode.

Can someome tell me if this has happened to them or
something similar when switching from Debug to Release?

Thanks in advance.

Michael McElroy



Tue, 12 Oct 2004 01:47:01 GMT  
 Works in Debug mode but not in Release mode
Forgot to say this was ported from VC++ 6 to VC++ .NET .

Quote:
>-----Original Message-----
>I am compiling an IVR that has been ported from VS 6.0 to
>VS.NET . The IVR picks up the phone when a call is made
to
>it and checks to see if it is normal business hours,
after
>hours, or a holiday and plays the appropriate messsage to
>the caller. The IVR loads all this information from a
>configuration file when it starts up.

>So, in Debug mode the call sees that it is a holiday and
>plays the holiday message, but when compiled in Release
>mode and run it does not...no code has changed just the
>compile mode. I tried stepping through it in Release mode
>(since now with .NET you can) and found weird things
>happening like NULL values where there shouldn't be and
>other strange things. NONE of these things are found when
>stepping through the code in Debug mode.

>Can someome tell me if this has happened to them or
>something similar when switching from Debug to Release?

>Thanks in advance.

>Michael McElroy
>.



Tue, 12 Oct 2004 01:57:55 GMT  
 Works in Debug mode but not in Release mode
When this happens to me, I usually add some builds:

Debug optimized:  Same as debug, except with optimization on.  Allows you to
debug (albeit with some weirdness) the optimized version.
Release, unoptomized:  Same as release, except with optimization turned off.
Helps determine if it is an optimization related problem



Tue, 12 Oct 2004 02:26:27 GMT  
 Works in Debug mode but not in Release mode
Thanks. That worked for me. It seems the Optimization
setting in Release mode still has some bugs in it.

Quote:
>-----Original Message-----
>When this happens to me, I usually add some builds:

>Debug optimized:  Same as debug, except with optimization
on.  Allows you to
>debug (albeit with some weirdness) the optimized version.
>Release, unoptomized:  Same as release, except with

optimization turned off.
Quote:
>Helps determine if it is an optimization related problem

>.



Tue, 12 Oct 2004 03:24:16 GMT  
 Works in Debug mode but not in Release mode
This may not be an optimizer bug: the biggest reason for differences in
behavior between debug and retail compiles is un-initialized variables. You
should try compiling with /RTCsu (Run-Time Error Checks) in debug mode -
this may help you track down any such un-initialized variables.

--
Jonathan Caves
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.



Quote:
> I am compiling an IVR that has been ported from VS 6.0 to
> VS.NET . The IVR picks up the phone when a call is made to
> it and checks to see if it is normal business hours, after
> hours, or a holiday and plays the appropriate messsage to
> the caller. The IVR loads all this information from a
> configuration file when it starts up.

> So, in Debug mode the call sees that it is a holiday and
> plays the holiday message, but when compiled in Release
> mode and run it does not...no code has changed just the
> compile mode. I tried stepping through it in Release mode
> (since now with .NET you can) and found weird things
> happening like NULL values where there shouldn't be and
> other strange things. NONE of these things are found when
> stepping through the code in Debug mode.

> Can someome tell me if this has happened to them or
> something similar when switching from Debug to Release?

> Thanks in advance.

> Michael McElroy



Tue, 12 Oct 2004 04:49:45 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Code works in debug mode but not in release mode

2. Program not work at release mode but work at debug mode

3. CString::GetBuffer does not work in debug mode but in release mode

4. MIDL compiler fails during release mode but works fine in debug mode

5. Works in Debug Mode crahses in Release Mode

6. Page fault when compile using Release mode but not Debug mode

7. Works in debug mode but not in release

8. extended stored procedure working in debug mode but not in release

9. DLL works fine in DEBUG but not in RELEASE mode

10. Run time Release mode error but no Debug mode error

11. Quiet NaNs, release mode and debug mode

12. Complining one project in release mode and another in debug mode

 

 
Powered by phpBB® Forum Software