473,781 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ContextSwitchDe adlock was detected

When I running my program in ste-by-step mode I get his error message, it
does not seem to apply when running in stand alone mode. What is the best to
debug this error message?

ContextSwitchDe adlock was detected
Message: The CLR has been unable to transition from COM context 0x1a19d8 to
COM context 0x1a1b48 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
CoWaitForMultip leHandles) and routinely pump messages during long running
operations.
Mar 14 '06 #1
4 12643
Good question that I'd like an answer to also. I got your error
message also today. I got a run time error on my target computer and
decided to process the data on my development computer and step through
it in the debugger to see exactly what was going wrong. Well I was
stepping through a perfectly benign for loop and at random times it
would either give the message you listed (about pumping, apartments,
and threads), or just hang. When it hung, it was supposed to step on a
perfectly fine code statement, like an endif statement or a boolean
test in an if statement. (The line of code that it would hang on would
vary from run to run.) Then it would make a sound like it was hitting
a breakpoint, even though the next statement didn't have a break point
set there. There was no yellow arrow, no highlighted line of code,
nothing. If I clicked on the Go triangle again, it would say, from a
balloon in the task tray,

"Microsoft Visual Studio Delay Notification
Microsoft Visual Studio is waiting for an internal operation to
complete. If you regularly encounter this delay during normal usage,
please report this problem to Microsoft."

The only way to get out of it was to kill off my app's executable that
was running (via Task manager or right-clicking in the task bar and
saying "Close Group". Then it would return to the development
environment.
I went to lunch and came back and then everything was OK - I couldn't
get anything strange to happen again. This after hours of pumping and
waiting messages before lunch! I still don't know what happened. Let
me know if anyone else has encountered these strange messages.

Mar 28 '06 #2
I post a bug mesage to the Express Website. So far no one has gotten back to
me. I can tell you that a Reboot will prolong the tiem between error
messages.

<ha******@hotma il.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Good question that I'd like an answer to also. I got your error
message also today. I got a run time error on my target computer and
decided to process the data on my development computer and step through
it in the debugger to see exactly what was going wrong. Well I was
stepping through a perfectly benign for loop and at random times it
would either give the message you listed (about pumping, apartments,
and threads), or just hang. When it hung, it was supposed to step on a
perfectly fine code statement, like an endif statement or a boolean
test in an if statement. (The line of code that it would hang on would
vary from run to run.) Then it would make a sound like it was hitting
a breakpoint, even though the next statement didn't have a break point
set there. There was no yellow arrow, no highlighted line of code,
nothing. If I clicked on the Go triangle again, it would say, from a
balloon in the task tray,

"Microsoft Visual Studio Delay Notification
Microsoft Visual Studio is waiting for an internal operation to
complete. If you regularly encounter this delay during normal usage,
please report this problem to Microsoft."

The only way to get out of it was to kill off my app's executable that
was running (via Task manager or right-clicking in the task bar and
saying "Close Group". Then it would return to the development
environment.
I went to lunch and came back and then everything was OK - I couldn't
get anything strange to happen again. This after hours of pumping and
waiting messages before lunch! I still don't know what happened. Let
me know if anyone else has encountered these strange messages.

Mar 28 '06 #3
ContextSwitchDe adlock is one of several new Machine Debugging
Assistants (MDA). It is not compiled into release builds so that's
probably why you don't see them outside of the debugger. It can be
disabled via the config file.

<http://msdn2.microsoft .com/en-us/library/d21c150d(en-us,VS.80).aspx>

Brian

ha******@hotmai l.com wrote:
Good question that I'd like an answer to also. I got your error
message also today. I got a run time error on my target computer and
decided to process the data on my development computer and step through
it in the debugger to see exactly what was going wrong. Well I was
stepping through a perfectly benign for loop and at random times it
would either give the message you listed (about pumping, apartments,
and threads), or just hang. When it hung, it was supposed to step on a
perfectly fine code statement, like an endif statement or a boolean
test in an if statement. (The line of code that it would hang on would
vary from run to run.) Then it would make a sound like it was hitting
a breakpoint, even though the next statement didn't have a break point
set there. There was no yellow arrow, no highlighted line of code,
nothing. If I clicked on the Go triangle again, it would say, from a
balloon in the task tray,

"Microsoft Visual Studio Delay Notification
Microsoft Visual Studio is waiting for an internal operation to
complete. If you regularly encounter this delay during normal usage,
please report this problem to Microsoft."

The only way to get out of it was to kill off my app's executable that
was running (via Task manager or right-clicking in the task bar and
saying "Close Group". Then it would return to the development
environment.
I went to lunch and came back and then everything was OK - I couldn't
get anything strange to happen again. This after hours of pumping and
waiting messages before lunch! I still don't know what happened. Let
me know if anyone else has encountered these strange messages.


Mar 28 '06 #4

Brian Gideon wrote:
Machine Debugging Assistants (MDA).


Err. Managed Debugging Assistants.

Mar 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
28072
by: Chandika | last post by:
Hi all, One of my database was suspected, So I try to recover database then it gives this error Err. 823 Torn Page Detected 823, ... 24, spid51 i/o error Torn Page (Detected) during read at offset 0x0000000040e0000 in file .........
3
43229
by: Tim Reynolds | last post by:
I support a .Net application running on a SERVER accessing MF Db2 data. Occasionally, we have some type of connection problem that we have been unable to debug up to this point. We typically receive one of these IBM.Data.DB2.DB2Exception messages: ERROR SQL30081N A communication error has been detected. Communication protocol being used: ‘TCP/IP'. Communication API being used: ‘SOCKETS'. Location where the error was detected:...
3
7044
by: Laura | last post by:
I've just installed the DB2 Run-time client in a Solaris machine. Then I finnish the installation configuring the connection: 1. machine catalog was OK: ========================== $ db2 catalog tcpip node atlas remote dsroracle server 8100 DB20000I The CATALOG TCPIP NODE command completed successfully. DB21056W Directory changes may not be effective until the directory cache is refreshed. 2. database catalog was OK:
32
5949
by: Clunixchit | last post by:
How can i read lines of a file and place each line read in an array? for exemple; array=line1 array=line2 ...
0
1385
by: Jesper | last post by:
Hi, In a single-threaded app I'm getting a ContextSwitchDeadlock MDA everytime I debug the app - in fact - I cant debug my app as I'm iterrupted by this funtionality before I can locate any bug!!!. I've read about how to deactivate this on the net, but none of the tricks work on my app. Please help. regards Jesper, DK.
1
2515
by: Waldy | last post by:
Hi there, every time I try stepping through C# projects in VS 2005, I am plagued by the ContextSwitchDeadlock error messages. Is there any way of avoiding this?
7
8114
by: Kalpana | last post by:
Hi, As iam working on convertion of C#1.1 to 2.0. Iam facing a problem (screen is flickered) while opening and closing any artifacts. When i tried to debug it is througing ContextSwitchDeadlock MDA exception i.e. The CLR has been unable to transition from COM context 0x1a0768 to COM context 0x1a08d8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a...
3
231
by: Benjamin Vigneaux | last post by:
Hello!! Well... this code works perfectly... what it does: It navigates a folder tree of N-Levels and it moves all the files from each folder to the root folder, then deletes the empty folders. protected void MoveStuff(DirectoryInfo RootFolder) { if (RootFolder.FullName != textBoxROOTpath.Text) {
1
3015
by: =?Utf-8?B?SkI=?= | last post by:
Hello As I debug the C# code with a break point and by pressing F11 I eventually get a message stating: ContextSwitchDeadlock was detected Message: The CLR has been unable to transition from COM context 0x17aeb8 to COM context 0x17abd8 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.
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10143
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.