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