Link to home
Start Free TrialLog in
Avatar of ISC
ISC

asked on

ContextSwitchDeadlock was detected - VB .Net

Hi,

I have developed a VB .Net application that calls a Oracle stored procedure (l_cmdSetting.ExecuteNonQuery) which takes about 10 mins to complete and return focus to the application. During this time the app waits for the SP to complete and displays the message

"ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x1b0778 to COM context 0x1b08e8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
"

I need the SP to complete before carrying on with application processing.

1) What does this mean?
2) Can I ignore this issue?
3) Do I need to code a fix and if 'yes' what should this be?

Thanks Ian



ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
EE Admin