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 / Interop / March 2007

Tip: Looking for answers? Try searching our database.

COM / CLR timeout error when debugging a project that hosts a WebBrowser

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon Davis - 23 Mar 2007 01:30 GMT
"The CLR has been unable to transition from COM context 0x1b78c0 to COM context 0x1b7a30 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 get this error message after 60 seconds of slowly stepping through some automation code in debug mode after the WebBrowser object has navigated somewhere. I ignore it since the code I'm debugging doesn't even relate to it, but half the time it causes the debugger to lose its call stack hooks or freeze up, so I have to stop and restart Visual Studio.

Is there any way to get rid of this error message, such as make it not show up for more than 60 seconds?

The WebBrowser object is instantiated in the .NET wrapper (System.Windows.Forms.WebBrowser).

Thanks,
Jon
Jon Davis - 27 Mar 2007 19:46 GMT
The solution to getting rid of this MDA message is documented here:

http://groups.google.com/group/microsoft.public.vsnet.debugging/browse_thread/th
read/1e4ac1010ae5920d/03ca1c82ea79287b

http://msdn2.microsoft.com/en-us/library/d21c150d.aspx
http://msdn2.microsoft.com/en-us/library/ms172233.aspx

However, I tried adding the registry key of MDA=0, but I still get this annoying MDA message. I tried shutting down and restarting Visual Studio, still this MDA message shows up. What the heck?

So I removed the registry key and ..

Debug->Exceptions ... (have to right-click + add "Exceptions ..." to menubar first) > Expand the MDA node and uncheck the box against contextswitchdeadlock

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=614396&SiteID=1

Problem resolved; still, I'd like to know why the registry key didn't fix this.

Jon

   "The CLR has been unable to transition from COM context 0x1b78c0 to COM context 0x1b7a30 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 get this error message after 60 seconds of slowly stepping through some automation code in debug mode after the WebBrowser object has navigated somewhere. I ignore it since the code I'm debugging doesn't even relate to it, but half the time it causes the debugger to lose its call stack hooks or freeze up, so I have to stop and restart Visual Studio.

 Is there any way to get rid of this error message, such as make it not show up for more than 60 seconds?

 The WebBrowser object is instantiated in the .NET wrapper (System.Windows.Forms.WebBrowser).

 Thanks,
 Jon

Rate this thread:







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.