views:

237

answers:

1

I'm working a backup program and to determine the destination location, I give them the choice to type it in, or browse to it. Lately, I've been getting this error after they browse to it using the FolderBrowserDialog to set the location and the containing form is closed:

Managed Debugging Assistant 'DisconnectedContext' has detected a problem in 'C:\Users\JFV\Documents\Visual Studio 2008\Projects[backup program]\bin[backup].exe'. Additional Information: Context 0x792960' is disconnected. Releasing the interfaces from the current context (context 0x7927f0).This may cause corruption or data loss. To avoid this problem, please ensure that all contexts/apartments stay alive until the application is completely done with the RuntimeCallableWrappers that represent COM components that live inside them.

Has anyone else seen this error or know how to deal with it?

Any and all help appreciated!

-JFV

+1  A: 

There is a msdn article about your error message. But it has nothing to do with a FolderBrowserDialog.
Do you call Dispose() on the FolderBrowserDialog?

tanascius
@tanascius Yes, I call the Dispose() on it. I can't figure out why it's doing this now... It's never been an issue before and I haven't changed the code on it either...?
JFV
It sounds as if you should double check your thread handling. I don't even know, if you are working with threads here. Sorry, but I have no better ideas.
tanascius
@tanascius After disabling the messages, the program is working fine... That's just strange to me! Thanks for your help!
JFV