473,714 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Differences between release and debug

Hi,

does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?

Thanks,

JC
Nov 16 '05 #1
4 4156
je**********@ed s.com wrote:
Hi,

does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?


Reliance on content of uninitialized memory.

-cd
Nov 16 '05 #2
je**********@ed s.com wrote:
Hi,
does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?


For unmanaged code, the two main reasons for getting a different
behavior between release and debug versions are :

1/ The memory allocation mechanism. Unitialized or incorrectly
initiliazed pointers will be handled differently.

2/ Optimizations which are usually disabled in debug versions. For
example, my current project systematically crashes under Win9x when I
optimize for speed or size (I'm using VC6 for this one but the same
remarks apply). If I disable optimizations or use default optimization,
there's no problem. The same program runs fine in all cases under Win NT
+.

What differences are you observing?

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.xx
(replace .xx with .fr when replying by e-mail)

Nov 16 '05 #3
I am seing exceptions thrown in release mode that do not
occur in debug mode.

The optimisation is critical as there is usually a factor
of 10 speed between release and debug. So my next question
is ...

Is there a compile flag in debug that will set all
uninitialised variable to invalid values and show where
the problem is ?

Thanks,
-----Original Message-----
je**********@e ds.com wrote:
Hi,
does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?
For unmanaged code, the two main reasons for getting a

differentbehavior between release and debug versions are :

1/ The memory allocation mechanism. Unitialized or incorrectlyinitiliazed pointers will be handled differently.

2/ Optimizations which are usually disabled in debug versions. Forexample, my current project systematically crashes under Win9x when Ioptimize for speed or size (I'm using VC6 for this one but the sameremarks apply). If I disable optimizations or use default optimization,there's no problem. The same program runs fine in all cases under Win NT+.

What differences are you observing?

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.xx
(replace .xx with .fr when replying by e-mail)

.

Nov 16 '05 #4
Hi,
Is there a compile flag in debug that will set all
uninitialised variable to invalid values and show where
the problem is ?
Debug does this by default I think. Which version of VS are you using? Does
your app still crash when you vary the optimization settings? I had similar
sounding problems which simply vanished with VS 2003

Cheers

Doug Forster

<je**********@e ds.com> wrote in message
news:08******** *************** *****@phx.gbl.. . I am seing exceptions thrown in release mode that do not
occur in debug mode.

The optimisation is critical as there is usually a factor
of 10 speed between release and debug. So my next question
is ...

Is there a compile flag in debug that will set all
uninitialised variable to invalid values and show where
the problem is ?

Thanks,
-----Original Message-----
je**********@e ds.com wrote:
Hi,
does anyone know what would be the (most common) reasons
to get difference answers in VC++.net between running in
release and debug ?


For unmanaged code, the two main reasons for getting a

different
behavior between release and debug versions are :

1/ The memory allocation mechanism. Unitialized or

incorrectly
initiliazed pointers will be handled differently.

2/ Optimizations which are usually disabled in debug

versions. For
example, my current project systematically crashes under

Win9x when I
optimize for speed or size (I'm using VC6 for this one

but the same
remarks apply). If I disable optimizations or use default

optimization,
there's no problem. The same program runs fine in all

cases under Win NT
+.

What differences are you observing?

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.xx
(replace .xx with .fr when replying by e-mail)

.

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8276
by: Daniel | last post by:
Hi, Are there any differences between C# and VB.Net besides syntax? Performance-wise, how do they compare? Thanks, Dan
7
2911
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by using the following code in Page_Load event handler. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim intcount As Integer intcount = 0 For intcount = 0 To 4
9
1995
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb file? Is the .pdb necessary for the release version? Thanks a bunch. Dara
8
1213
by: Peter van der Veen | last post by:
Hi I've something strange. There is a different when an error occurs in 2 differen project/solutions. In one project when a get an error the debugger stops at the line which causes the error and show the error window. This is normal. (Title of the dialog = Microsoft Development Environment') A second project doesn't do that. It shows another error dialog (the
1
2251
by: TheSteph | last post by:
Hi, Does anybody know what's the difference between the "Debug build" of a C# application and the "Release build" ? In my case, both are 774.144 bytes, and both seems to have the same
6
9141
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++ project. I then add a class library, and add a reference to this project in the first project. When I do a release build, I see the following in the output from the DLL compile: /OUT:"C:\Documents and Settings\Andrew\My Documents\Visual Studio
7
3661
by: news.microsoft.com | last post by:
I have an asp.net 2.0 project that when I change the build configuration to release I get the following error: Command line error BC2014: the value 'None' is invalid for option 'debug'. If I go into the projects Advanced Compile Options and change the Generate Debug Info dropdown from None to PDB-Only the error goes away. Can anyone explain why I have to do this and what can I do to get the one option to work on a asp.net project? ...
3
1994
by: TBass | last post by:
Hello, Is there a way to get Visual Studio 2003 look to one directory for debug version dlls when set to DEBUG and then to another directory where I store the release version of a dll when set to RELEASE? My current project uses about 8 dlls I've written in the past, but I don't want to keep re-compiling them for debug/release depending on whether I'm compiling the current project for debug/release.
0
1738
by: =?Utf-8?B?SmVmLnB0Yw==?= | last post by:
Hi, I am currently facing exactly the same issue with Visual Studio 2005. Did you find a way to solve this problem ? "AntonioSACE" wrote:
0
8707
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9174
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9015
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4725
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2520
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2110
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.