473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Difference in Release & Debug Mode

ss
Hi

I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .

The exe is being started as a service. So I need the Release mode EXE.
I've checked the dlls being used . they are working fine for other
services.

Plz Help.
cheers
Jul 22 '05 #1
6 3825
ss wrote:
I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .

The exe is being started as a service. So I need the Release mode EXE.
I've checked the dlls being used . they are working fine for other
services.


Edit the Release mode settings, and turn on debugging. Rebuild. Tap <F10>.

But you must take future questions about things like these to newsgroups
that cover VC++ or services. Your questions are too hard for this newsgroup!

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #2
On Thu, 10 Jun 2004 10:39:59 UTC, "Phlip" <ph*******@yahoo.com> wrote:
ss wrote:
I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .
How does it fail? The appropriate microsoft.* forums will have a few
more people knowledgeable on why this type of problem occurs.
The exe is being started as a service. So I need the Release mode EXE.
I've checked the dlls being used . they are working fine for other
services.

No. You need the Release verson because you can't release the Debug
version. A Debug version can run as a service.
Edit the Release mode settings, and turn on debugging. Rebuild. Tap <F10>.
This will likely cure the symptom, but definitely not the problem.
Your code has some serious problems. It may not appear to fail in the Debug
version, but it may in time.

There are any number of common mistakes programmers make. Turn on all
warnings and recompile all the code. Look for things like uninitialized
data.
There are more 'obscure' possibilities like timing, but its more likely that
you are seeing one of the dozen or so simple programming mistakes.
But you must take future questions about things like these to newsgroups
that cover VC++ or services. Your questions are too hard for this newsgroup!


David
Jul 22 '05 #3
"ss" <sa**********@citigroup.com> wrote :
I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .


Often when debug builds run fine and release builds fail uninitialized
variables are the cause of the problem. Compile at the maximum warning
level; a source code checker like PC lint may also be useful to track down
this problem.

Note that your question is not about the C++ language, so it is not really
topical here. You better ask this question in a group dedicated to the
development tool you are using (which I guess is Microsoft Visual Studio).
See also: http://www.slack.net/~shiva/welcome.txt

--
Peter van Merkerk
peter.van.merkerk(at)dse.nl
Jul 22 '05 #4
David wrote:
No. You need the Release verson because you can't release the Debug
version. A Debug version can run as a service.


And you can add __asm { int 3 }; to invoke a hard breakpoint.
Edit the Release mode settings, and turn on debugging. Rebuild. Tap <F10>.


This will likely cure the symptom, but definitely not the problem.


It won't cure nothing. It will open the debugger and show source
statements, not disassembly. But the opcodes are compiled in release
mode anyway. You can see what line broke, and what its differences
were with debug mode.

--
Phlip
Jul 22 '05 #5
Where does it fail ? You actually need to do
some work to find the location and the cause.
You can try to track down the location by the use
of printf & log files to hone in on the failure spot,
or use message_box() to track down the location
in release mode since the debugger doesn't help much.
Comment out sections of code if you can and see if that
has any effect on the failure.

Common causes of release mode failing :-
( assuming you are using microsoft vc++)

1. ASSERT() statements containing necessary code
statements being optmized/preprocssed out of the
release code. Use VERIFY() instead.

2. Memory is initialized with random patterns in release
mode, this might cause some unpredicted behavior.
Initialize all memory before use.

3. You are using some undefined behavior which behaves
differently in different modes.

4. Mixtures of DLLs for debug/release being used at runtime.
Use the DEPENDS tool to check what dll are being found.
Check the run-time environment when the service is being run
is what you expect it to be.

In years gone by, compiler bugs often were a cause but is
more rare these days, I should assume you have a bug and
not blame the compilers.

dave

"ss" <sa**********@citigroup.com> wrote in message
news:d1**************************@posting.google.c om...
Hi

I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .

The exe is being started as a service. So I need the Release mode EXE.
I've checked the dlls being used . they are working fine for other
services.

Plz Help.
cheers

Jul 22 '05 #6
sa**********@citigroup.com (ss) wrote in message news:<d1**************************@posting.google. com>...
Hi

I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .

The exe is being started as a service. So I need the Release mode EXE.
I've checked the dlls being used . they are working fine for other
services.

Plz Help.


"debug mode"??? "release mode"??? Standard C++ has no such things.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
To iterate is human, to recurse divine.
-L. Peter Deutsch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Jul 22 '05 #7

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

Similar topics

5
by: codymanix | last post by:
What are the Differences between Debug & Release? Is the byte code the same and there is only difference in JIT compilation? And is there a great impact to Performance? In c++, there where...
2
by: Chris Pielak | last post by:
Hi. I'm about to try deploying my ASP.NET application, written with the 1.1 Framework. I'm coming across something odd when compiling in Debug and Release mode. When compiling in Debug mode, I...
3
by: Haldun ALIML | last post by:
Suppose that you have below property in some class, #if DEBUG public string DebugInfo { get { return "INDEX : " + _name + "\n" + "Index Owner : " + _owner.Name + "\n" + "Index Column Count:...
5
by: B. | last post by:
We just recently move to code from VC++6 to VC++.NET 2005 and upgrade the warning level from 3 to 4. In debug mode, we compile the application with no warning no error, but when I build it in...
5
by: Jonas Hallgren | last post by:
Hello, Is there any general tips on how to solve this problem: my Debug version runs fine but when I do a Release version I get error messages!? I'm hoping it is a simple option somewhere or...
7
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...
2
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream...
0
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:
3
by: =?Utf-8?B?bG10dGFn?= | last post by:
We have developed a number of different applications (ASP.NET web site, Windows services, DLLs, Windows forms, etc.) in C# 2.0. We have developed and unit tested all these applications/components...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.