473,608 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between Debug and Release compilation?

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 a flag I can set...

Regards,
Jonas

Apr 18 '07 #1
5 3392
On Wed, 18 Apr 2007 01:02:59 -0700, Jonas Hallgren
<ha***********@ gmail.comwrote:
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!?
What error messages?
I'm hoping it is a simple option somewhere or a flag I can set...
Well...you could always set your build configuration to "Debug". :)

Normally, if the code is written correctly, Debug and Release builds work
exactly the same. If you don't tell us what the actual problem is, it's
not likely we can tell you what you need to fix.

Pete
Apr 18 '07 #2
On 18 Apr, 10:10, "Peter Duniho" <NpOeStPe...@nn owslpianmk.comw rote:
On Wed, 18 Apr 2007 01:02:59 -0700, Jonas Hallgren

<hallgrenjo...@ gmail.comwrote:
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!?

What error messages?
I'm hoping it is a simple option somewhere or a flag I can set...

Well...you could always set your build configuration to "Debug". :)

Normally, if the code is written correctly, Debug and Release builds work
exactly the same. If you don't tell us what the actual problem is, it's
not likely we can tell you what you need to fix.

Pete
Hi,

Thanks for replying.

What I have done is to build an UserControl based on the DShowNET dll
in order to enumerate audio input devices and mixers/pins and relevant
settings.
The control then generates a menu for me, requiring me to first choose
a Device, in my case an SB X-Fi card. Then I can choose "line in" or
"microphone " etc. But while this works fine in Debug, either in debug
from VS2005 or running the executable in the Debug folder, the Release
version throws an ex when I want to choose/change from microphone to
"line in" or any other available choice.

The message is

System.NotImple mentedException
at DShowNET.IAMAud ioInputMixer.pu t_Enable(Boolea n fEnable)
at DirectX.Capture .AudioSource.se t_Enabled(Boole an value)
at etc etc

Strange since it works fine in debug mode...

Did this give you any clue to what could be happening here?

Regards,
Jonas

Apr 18 '07 #3
Hi again :)
Well...you could always set your build configuration to "Debug". :)
If I set my UserControl to Debug and my main app to Release it works
fine. I am a bit worried that the problem is in the third party dll of
which I have no control. I'll post this to the developer at
codeproject and hope for a reply!

Thanks again!
Jonas

Apr 18 '07 #4
On Wed, 18 Apr 2007 01:24:17 -0700, Jonas Hallgren
<ha***********@ gmail.comwrote:
[...]
The message is

System.NotImple mentedException
at DShowNET.IAMAud ioInputMixer.pu t_Enable(Boolea n fEnable)
at DirectX.Capture .AudioSource.se t_Enabled(Boole an value)
at etc etc

Strange since it works fine in debug mode...

Did this give you any clue to what could be happening here?
A clue? Sure. An answer? No. You didn't really post that much
information. The full stack trace might be useful, and of course seeing
the relevant code might be useful as well.

What I *do* see is that you're getting an exception that states that you
are attempting an operation that is not implemented in the object
(probably a COM object) you're trying to use. Based on what little stack
trace you did post, it appears that some audio input source is having it's
"enabled" state changed and that the source in question doesn't support
changing that state.

But that in no way answers why it works in Debug and not in Release. I'd
say the most likely reason is that in your Debug build the operation
simply doesn't happen. However, I suppose it's also possible that the
value being passed in for the value is somehow different, and that the
operation is supported only for a certain value of the setting.

All I can say is that you should be thankful you're getting an exception.
:) Many debug/release bugs don't manifest themselves in such an obvious
way. Here, you should be able to wait for the exception to happen in the
debugger, look at the call stack (starting at the deepest end of the
stack, where the exception actually happened, and working your way back)
for anything that might be depending on the debug/release characteristic
of the build and see what it might be doing differently. You may or may
not have to inspect all of the code all the way up the stack.

If you post the full call stack AND you post all of the code related to
that call stack that you have, there is a small possibility someone here
might be able to identify the problem for you. But I wouldn't get your
hopes up. The more code you post, the more likely it is that the problem
will actually be findable in the code you post, but the less likely it is
that someone will have the time and inclination to do the search for you.
It's a bit of a Catch-22 for you there. :)

You posted in a different message that it works if your UserControl is
Debug but your application is Release and that from that you conclude that
the problem is in a third-party DLL. Unless "your UserControl" is in fact
that third-party DLL, then I don't think that's the right conclusion. If
it works fine with your UserControl as Debug and everything else Release,
but not when the UserControl is *also* Release, then to me that strongly
suggests a bug in the UserControl itself.

Pete
Apr 18 '07 #5
On 18 Apr, 18:45, "Peter Duniho" <NpOeStPe...@nn owslpianmk.comw rote:
On Wed, 18 Apr 2007 01:24:17 -0700, Jonas Hallgren

<hallgrenjo...@ gmail.comwrote:
[...]
The message is
System.NotImple mentedException
at DShowNET.IAMAud ioInputMixer.pu t_Enable(Boolea n fEnable)
at DirectX.Capture .AudioSource.se t_Enabled(Boole an value)
at etc etc
Strange since it works fine in debug mode...
Did this give you any clue to what could be happening here?

A clue? Sure. An answer? No. You didn't really post that much
information. The full stack trace might be useful, and of course seeing
the relevant code might be useful as well.

What I *do* see is that you're getting an exception that states that you
are attempting an operation that is not implemented in the object
(probably a COM object) you're trying to use. Based on what little stack
trace you did post, it appears that some audio input source is having it's
"enabled" state changed and that the source in question doesn't support
changing that state.

But that in no way answers why it works in Debug and not in Release. I'd
say the most likely reason is that in your Debug build the operation
simply doesn't happen. However, I suppose it's also possible that the
value being passed in for the value is somehow different, and that the
operation is supported only for a certain value of the setting.

All I can say is that you should be thankful you're getting an exception.
:) Many debug/release bugs don't manifest themselves in such an obvious
way. Here, you should be able to wait for the exception to happen in the
debugger, look at the call stack (starting at the deepest end of the
stack, where the exception actually happened, and working your way back)
for anything that might be depending on the debug/release characteristic
of the build and see what it might be doing differently. You may or may
not have to inspect all of the code all the way up the stack.

If you post the full call stack AND you post all of the code related to
that call stack that you have, there is a small possibility someone here
might be able to identify the problem for you. But I wouldn't get your
hopes up. The more code you post, the more likely it is that the problem
will actually be findable in the code you post, but the less likely it is
that someone will have the time and inclination to do the search for you.
It's a bit of a Catch-22 for you there. :)

You posted in a different message that it works if your UserControl is
Debug but your application is Release and that from that you conclude that
the problem is in a third-party DLL. Unless "your UserControl" is in fact
that third-party DLL, then I don't think that's the right conclusion. If
it works fine with your UserControl as Debug and everything else Release,
but not when the UserControl is *also* Release, then to me that strongly
suggests a bug in the UserControl itself.

Pete
Hi and again thanks for the reply.

I am aware of my post lacking in relevant info and I actually scrapped
the whole idea, because I realised that I tried to use a control
designed for capturing audio and video to file, just to get hold of
the ability to choose audio input ports/pins/devices/mixers or
whatchamacallit .

Instead I found MixerLib at http://www.limegreensocks.com/dshow/ which
does exactly what I want and also taught me a great deal about
programming InterOp.

In the future I will try to make my questions more to the point :)

Regards,
Jonas

Apr 19 '07 #6

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

Similar topics

5
6978
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 checks in generated code that verified in debug mode that objects are valid, checks to verify the integrity of the stack, delete filled objects with specific bytes to help debug and so on. But in .NET such things aren't neccessary due to it...
6
1746
by: Ariel | last post by:
I have an application that works correctly in debug mode but it does not work in release. I am not using anything of the class system.diagnostics. I tried to disable the optimization code, but this did not work please I need a solution quickly!!. Thanks.
1
3758
by: Sam Kong | last post by:
Hello! Recently I had a strange problem with Visual C# 2005 beta 1. When I ran(F5 key) a program, <#if DEBUG> statement was not working. It ran as RELEASE mode. So I had to manually define DEBUG to make #if DEBUG work. When I first started the project, this problem didn't exist. The problem started to exist in the middle of doing the project. Today, I decided to figure out what went wrong.
6
1820
by: Do | last post by:
Hi: Is there somewhere in any config file where debug or release mode get set when I change the mode before rebuilding in VS.net? Thanks, Do
3
2438
by: ktrvnbq02 | last post by:
Hi, We have an ASP.NET application built in Release mode via Visual Studio. All of the C# code is in the code-behind files (i.e. *.aspx.cs files) and there is no C# in the *.aspx files themselves. In this scenario, will the following setting have any detrimental effect if left set to true when running a Release build described above?
9
1990
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
10
1799
by: Joe Befumo | last post by:
When I tried debugging for the first time, I pop-up asked me if I wanted to set the project to enable debugging. Now I'm ready to release and can't find anyplace to set the build to 'release'. A pointer would be appreciated. Thanks. Joe
3
3234
by: David Thielen | last post by:
Hi; In my ASP.NET solution I have the website and I have a project that is a library with most of the code. The dll it builds gets copied over in to the portal bin directory when I do a build in VS 2005. When aspnet_compile does a compile, does it just grab whatever dll is there or does it build the release version and copy it over if necessary? --
2
10514
by: Zytan | last post by:
When I do this, all code in the middle turns gray. I assume this is because DEBUG is not defined. But, I thought it was for debug mode. Is there something I am missing, or do people manually add DEBUG to the debug mode compilation? How do I tell the IDE which mode I am currently in (debug / release), like VC++ allows me to (it says in a toolbar which compilation mode you are currently in)? Perhaps I am merely in release mode, and thus...
0
8059
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8000
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
8495
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
8470
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...
0
6815
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6011
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
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3960
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
1328
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.