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

Home Posts Topics Members FAQ

Visual Basic 2005 - ContextSwitchDe adLock was detected when debugging

Dear All,

If i step over my visual basic 2005 code, i got this error:

The CLR has been unable to transition from COM context 0x1a2008 to COM
context 0x1a2178 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.
Can anyone help with this? please
Thanks in advance.

Connie
Dec 7 '06 #1
2 3847

Are you creating and consuming these COM objects on a thread?
Dec 7 '06 #2
Does this happen when stepping through the code or running hitting F5
and just letting it run on it's own?

If you are stepping through the code it's fairly common to get these
errors if you stop on certain lines (ones that use objects that are COM
objects or use COM interop) for extended amounts of time. Generally, if
you only get them when stepping through the code you should be ok, just
press "Continue" and go about your business. If you get them when the
code is running on it own (ie you're not stepping through) you've
probably got a big problem...

Thanks,

Seth Rowe
Connie wrote:
Dear All,

If i step over my visual basic 2005 code, i got this error:

The CLR has been unable to transition from COM context 0x1a2008 to COM
context 0x1a2178 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.
Can anyone help with this? please
Thanks in advance.

Connie
Dec 7 '06 #3

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

Similar topics

2
1511
by: elnahrawi | last post by:
Download ebook http://books-download.com/?Book=1487-Visual+Basic+2005+Jumpstart Okay, all you VB6 developers--time's up. As of March 2005, Microsoft no longer supports this version of Visual Basic. And you can't blame them. Three years ago, they introduced the .NET Framework--an elegant, powerful platform--along with the new component-based VB.NET language. But roughly five million of you decided to stick with VB6, mostly to maintain...
4
12643
by: garth | last post by:
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? ContextSwitchDeadlock 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...
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.
4
2161
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a problem. Can they not just post the fix. I see no reason to contact MS since I have most likely sent about 1500 dumps to them and I would think this would get their attention.
25
2479
by: Marco | last post by:
Hi everyone. I've been trying to move some small applications written in vb.net 2003 to vb.net 2005 express just for testing purposes. I have noticed so far that the applications seem to run much slower in the 2005 version. Especially when it comes to nested loops. I haven't done much testing so it might just be this one computer but I was curious to know if anyone else has experienced these kind of problems when moving to the 2005...
10
2709
by: kimiraikkonen | last post by:
Visual C#.NET 2005 express has some issues, unlike VB.NET 2005 has none of them: The most annoying one is: For example if there's a coding error, it must be reported at the buttom of the screen in "error list" "REAL-TIME". At least, that was like that in VB.NET 2005 express. But in Visual C# .NET 2005 you won't be able to aware of coding errors till you press "play" build & run button.
0
1235
by: Just Me | last post by:
Bit of an odd one, but heres the deal. I had a Windows NT domain controller and a Member Server , my development machine was in the same domain , but I lost the domain controller. I since installed SQL Server 2005 on the member server and it works OK. However, when I try and "Step Into" the stored procedure from Visual Studio, it tells me "Unable to start T-SQL Debugging. Could not connect to computer 'sqlserver; The system detected a...
2
2320
by: Z.K. | last post by:
I was wondering if someone could tell me why I get this message and how to prevent it. If I hit continue, it runs fine, but want to know what I am doing wrong so I won't get this error in the future. also what is the file Clock.vshost.exe; my application is Clock.exe. Z.K. 'Clock.vshost.exe' (Managed): Loaded 'C:\Documents and Settings\Super_Wizard\My Documents\Visual Studio
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
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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...
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
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.