Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / July 2006

Tip: Looking for answers? Try searching our database.

The CLR has been unable to transition...for 60 seconds....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob R. Ainscough - 28 Jul 2006 17:22 GMT
I get this A LOT while I'm stepping thru my code in Debug mode.

"The CLR has been unable to transition from COM context 0x1a0348 to COM
context 0x1a04b8 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."

Is there a work around because sometimes I take longer than 60 seconds to go
over my next line of code.
billr - 28 Jul 2006 17:51 GMT
How long are your lines of code????!!!

Signature

Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk

> I get this A LOT while I'm stepping thru my code in Debug mode.
>
[quoted text clipped - 11 lines]
> Is there a work around because sometimes I take longer than 60 seconds to go
> over my next line of code.
Brian Gideon - 28 Jul 2006 18:18 GMT
Rob,

This sounds like the ContextSwitchDeadlock Managed Debugging Assistant
(MDA).  It can be deactivated by going into Debug | Exceptions and then
uncheck ContextSwitchDeadlock underneath Managed Debugging Assistants.
It can also be deactivated via the app.config.  But, I wouldn't just
blindly deactivate this MDA without at least knowing why it's
occurring.

Brian

> I get this A LOT while I'm stepping thru my code in Debug mode.
>
[quoted text clipped - 11 lines]
> Is there a work around because sometimes I take longer than 60 seconds to go
> over my next line of code.
Rob R. Ainscough - 28 Jul 2006 18:40 GMT
Brian,

How can I determine why it is occuring?  This always happens if i spend more
than 60 seconds on a single line of code, say if I'm looking at a long
complex string containing values that I parse out and I'm checking positions
or content within the string.  Or if I step thru code and go get a cup of
coffee and return and the try to step to the next line.

What are the implications with "deactivating" this MDA option?

Thanks, Rob.

> Rob,
>
[quoted text clipped - 26 lines]
>> go
>> over my next line of code.
Brian Gideon - 28 Jul 2006 19:19 GMT
Rob,

I'd say it's occurring because you are essentially stalling the message
loop by spending a lot of time stepping through code.  In your case
it's probably more of a nuisance than anything else.  I'd just disable
it.  The implications of disabling it are that you may lose a useful
tool for discovering bugs before you release the application.  MDAs are
disabled in release builds anyway.  That's why you only see it during a
debugging session.

Brian

> Brian,
>
[quoted text clipped - 7 lines]
>
> Thanks, Rob.
Rob R. Ainscough - 30 Jul 2006 19:22 GMT
Brian,

Yes, just a nuisance, I will disable -- but to be honest, I haven't found
where in the VS 2005 I can disable?  No such option under Debug.  Is this a
C# only option?

Rob.

> Rob,
>
[quoted text clipped - 21 lines]
>>
>> Thanks, Rob.
Brian Gideon - 31 Jul 2006 02:50 GMT
Rob,

Right click on the toolbar area and select Customize.  You'll find it
in the list of commands under Debug.  Just drag it up to your Debug
menu.  It wasn't in the menu with my install either.

Brian

> Brian,
>
[quoted text clipped - 3 lines]
>
> Rob.
Rob R. Ainscough - 31 Jul 2006 15:07 GMT
Brian thanks, Rob.

> Rob,
>
[quoted text clipped - 12 lines]
>>
>> Rob.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.