Microsoft Developer Network >
Forums Home
>
Microsoft Visual Studio 2010 Beta 2 Forums
>
Visual Studio Extensibility Beta 2
>
Isolated Shell: Writing to output window pane causes unrecoverable hang
Isolated Shell: Writing to output window pane causes unrecoverable hang
- Hello,I'm current using a custom project type built using the MPF for Visual Studio 2010 found at http://mpfproj10.codeplex.com/ I'm having a problem where whenever the IDEBuildLogger goes to write an item to the OutputWindowPane it will cause a unrecoverable hang.The hang happens with the following line in IDEBuildLogger.cs of MPF:Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(this.OutputWindowPane.OutputStringThreadSafe(msg.ToString()));Anyone have any suggestions as to how this can be fixed?
Answers
- Hi Salec,
You are hitting a well-known incompatibility problem with the MPF Project and Visual Studio Beta 2.
The problem is that in Beta 2, the build runs on a Background Thread and, when "StartBuild" is called, the UI thread no longer pumps messages preventing calls through the logger from getting through.
Unfortunately, at this time we don't have a complete solution for you, but we're working on it and we will post updates to the CodePlex project.
- Paul Harrington
Visual Studio Platform and Ecosystem- Marked As Answer bySalec Friday, November 06, 2009 1:00 AM
All Replies
- At first I thought the problem was related to my project references. When I deleted the references and re added them making sure that they were not an older version it removed a "Object reference not set to instance of an object." message I was getting in my output window.Unfortunately the hangup still occurs. I've found it also occcurs with the following line again in IDEBuildLogger in the function AddToErrorList:this.taskProvider.Tasks.Add(task);If I comment out these lines, my isolated shell will run just fine (minus any logging which is quite aggrivating).
- Some further Infomation:This only seems to be a problem from within whatever thread is created when InvokeMSBuild is called. If I add a task to the taskProvider or attemp to write to the IVsOutputWindowPane inter face before OR after InvokeMSBuild, I can do it successfully. It makes me think that perhaps these interfaces are not threadsafe or perhaps something is not initialized properly.The following message is displayed in my debug output just before the shell hangs:*** HR originated: -2147024774*** Source File: d:\iso_whid\x86fre\base\isolation\com\copyout.cpp, line 1302*** HR propagated: -2147024774*** Source File: d:\iso_whid\x86fre\base\isolation\com\enumidentityattribute.cpp, line 144Again, any help would be greatly appreciated since right now I cannot add any errors or display anything during a build :(
- I've built an example shell project that is a completely stripped down custom project example which still causes shell hangs.http://www.salec.net/forum_stuff/VS2010TestShell.zipTo reproduce the hang:
- Build and run the shell
- Create a new "My Custom Project" project
- Build the project
You'll have to put a breakpoint inside of IDEBuildLogger.cs:190 to watch it hang when writing to the IVsOutputWindowPane.Has anyone else been able to create a custom project inside of Beta 2? - Hi Salec,
You are hitting a well-known incompatibility problem with the MPF Project and Visual Studio Beta 2.
The problem is that in Beta 2, the build runs on a Background Thread and, when "StartBuild" is called, the UI thread no longer pumps messages preventing calls through the logger from getting through.
Unfortunately, at this time we don't have a complete solution for you, but we're working on it and we will post updates to the CodePlex project.
- Paul Harrington
Visual Studio Platform and Ecosystem- Marked As Answer bySalec Friday, November 06, 2009 1:00 AM
- Excellent, I'm glad to know that this bug is well known and not something unique to my code. I will keep checking codeplex for the update.

