ContextSwitchDeadlock in Visual Studio 2008
731205Nov 19 2009 — edited Nov 23 2009Hi,
I'm running a simple application to retrieve data form an oracle db and to publish/map it to a sql server DB.
I have a lot of data and queries can take quite some time to complete; certainly more than 60 seconds. Quite often the debugger reports a fault
that is: ContextSwitchDeadlock. It turns out this is a well known vs problem ( http://msdn.microsoft.com/en-us/library/ms172233.aspx ). However the workaround is to make your code play better by windows rules. Specifically: Follow COM rules regarding STA message pumping.
Of course I can't do this as it happens when the Oracle query is running; I'm filling a Dataset.
Has anyone encountered this before? What did you do to resolve it?
thanks
mark