This is a discussion from a MS programmer: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=707167&SiteID=1
he says to look at the callstack when the MDA (managed debugging assistant) fires. This should tell me which RCW is being freed.
The call to release the RCW is Marshal.ReleaseCOmObject. This is being done while the RCW is still being reference in the stack of the current thread or in another thread.
Could be on of the following:
- RCW blocked on an outgoing call and a re-entrancy occured while is was block
- asynchronous call occured on a background thread.
May need to do one of the following:
- cancel the data transfer and wait
- to avoid re-entrancy more the data transfer to a background thread so I can control the canceling (this may be my problem)
- disable "Enable Just My Code" under Tools Options (Debugging)
- Enable unmanaged code debugging in the project properties settings

No comments:
Post a Comment