The process was terminated due to an unhandled exception when using the Interactive Window - by Michael_Baker

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 756196 Comments
Status Closed Workarounds
Type Other Repros 0
Opened 7/30/2012 4:45:30 PM
Access Restriction Public


When selecting View -> Other Windows -> C# Interactive Window the Visual Studio process crashes.

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Roslyn.Utilities.Contract+ContractFailureException
   at Roslyn.Services.Editor.Shared.Tagging.AbstractTagSource`1[[System.__Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Finalize()

Usng devenv /log and inspecting ActivityLog.xml the following errors are present (see attached).
Sign in to post a comment.
Posted by Microsoft on 10/22/2012 at 9:45 AM
Hi, this is fixed in later CTPs, please let me know if you are still experiencing this.

Posted by Michael_Baker on 9/9/2012 at 11:04 PM
I have attached another log from starting VS then running the C# interactive window.
Of note are several errors that occur similar to this:

System.InvalidOperationException: The current SynchronizationContext may not be used as a TaskScheduler.

at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()

at Roslyn.Services.Shared.Utilities.ThreadAffinitizedObject..ctor()

at Roslyn.Services.Editor.Shared.Threading.AsynchronousSerialWorkQueue..ctor(IAsynchronousOperationListener asyncListener)

at Roslyn.Services.Editor.Shared.Tagging.AbstractAsynchronousTagSource`1..ctor(IAsynchronousOperationListener asyncListener, ITaggerEventSource eventSource, Func`2 bufferToRelatedTagSource)

at Roslyn.Services.Editor.Shared.Tagging.AbstractAsynchronousTaggerProvider`1.CreateTagSource(ITextBuffer subjectBuffer)
at Roslyn.Services.Editor.CSharp.Classification.SemanticClassificationTaggerProvider.CreateTagSource(ITextBuffer subjectBuffer)

at Roslyn.Services.Editor.Shared.Tagging.AbstractAsynchronousTaggerProvider`1.GetTagSource(ITextBuffer subjectBuffer)

at Roslyn.Services.Editor.Shared.Tagging.AbstractAsynchronousTaggerProvider`1.CreateTagger[T](ITextBuffer subjectBuffer)

at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
Posted by Michael_Baker on 9/2/2012 at 4:34 PM
Hi Team

I am using the second CTP. The first CTP did not have this issue.
The steps to reproduce were provided as part of the details to open this case.
Posted by Peter Goodman on 9/2/2012 at 4:32 PM
More info:

Roslyn.Utilities.Contract.ContractFailureException was unhandled
Message=Should have been disposed! Instance allocated at:

.ctor at offset 285 in file:line:column <filename unknown>:0:0

     at Roslyn.Services.Editor.Shared.Tagging.AbstractTagSource`1.Finalize()
Posted by Peter Goodman on 8/23/2012 at 3:39 AM
I should say, the only steps to repro are the above, open the C# interactive window. I have Resharper installed
Posted by Peter Goodman on 8/23/2012 at 3:38 AM
I can also reproduce this issue. Using the second CTP

A first chance exception of type 'Roslyn.Utilities.Contract.ContractFailureException' occurred in Roslyn.Services.Editor.dll

Additional information: Should have been disposed! Instance allocated at:

.ctor at offset 285 in file:line:column <filename unknown>:0:0
Posted by Microsoft on 8/6/2012 at 3:54 PM
Hi, MLBaker. We cannot repro this ourselves. Could you provide an explicit set of steps that causes this to happen to you? Also, are you using the first or second CTP? If you are using the second CTP?