473,320 Members | 1,848 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,320 software developers and data experts.

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 3373
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...@nnowslpianmk.comwrote:
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.NotImplementedException
at DShowNET.IAMAudioInputMixer.put_Enable(Boolean fEnable)
at DirectX.Capture.AudioSource.set_Enabled(Boolean 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.NotImplementedException
at DShowNET.IAMAudioInputMixer.put_Enable(Boolean fEnable)
at DirectX.Capture.AudioSource.set_Enabled(Boolean 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...@nnowslpianmk.comwrote:
On Wed, 18 Apr 2007 01:24:17 -0700, Jonas Hallgren

<hallgrenjo...@gmail.comwrote:
[...]
The message is
System.NotImplementedException
at DShowNET.IAMAudioInputMixer.put_Enable(Boolean fEnable)
at DirectX.Capture.AudioSource.set_Enabled(Boolean 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
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...
6
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...
1
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...
6
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
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...
9
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...
10
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...
3
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...
2
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.