Calling Unadvise() in a connection point sink causes an access violation in ReleaseMinDependency build but not in Debug build.
Anyone ever seen this?
--Will Duty
wduty@radicalfringe.com
No. I recommend you do a rebuild all and see if that helps. I hate that though - I have had problems in release but not in debug before. I thought debug builds were supposed to be more strict than release builds?
Yeah, I tried that and several other things with no avail. Thanks though.
At first I was having a hard time compiling the release build (unresolved external _main). Then I read that taking out _ATL_MIN_CRT would solve the problem which it did. But then I started getting the access violation. So I got rid of all the c functions (especially wcstombs and mbstowcs to which I replaced with USES_CONVERSION macros) but I am still getting the error. I'll keep looking though.
Also, I was pretty sure the sink was connecting becuase I was receiving notifications from it prior to the access violation. It turned out that there was a subtle twist in the code which allowed for the Unadvise to be called after I had released the object. Two lines of code fixed that and everything works great now.
It's disconcerting that it wasn't showing up in the debug build.
All responses greatly appreciated.
--Will Duty
wduty@radicalfringe.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.