Visual Studio regularly throwing exception
Asked Answered
I

2

6

Visual Studio 2015 is regularly becoming odd.

Keys typed are appearing in semi-random orders, I'll sometimes have to press keys twice or more.

I think this seems to be around key words, rather than variable names or literals.

After about five minutes I'll get the error dialogue telling me that there was an exception that might be caused by an extension.

The entry in ActivityLog.xml is below:

<entry>
  <record>762</record>
  <time>2015/08/11 20:17:02.056</time>
  <type>Error</type>
  <source>Editor or Editor Extension</source>
  <description>System.InvalidOperationException: IWpfTextView has not completed its layout.&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight, Boolean preserveViewportTop, Nullable`1 cancel)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DisplayTextLineContainingBufferPosition(SnapshotPoint bufferPosition, Double verticalDistance, ViewRelativePosition relativeTo, Nullable`1 viewportWidthOverride, Nullable`1 viewportHeightOverride)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DisplayTextLineContainingBufferPosition(SnapshotPoint bufferPosition, Double verticalDistance, ViewRelativePosition relativeTo)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.InterTextAdornmentSupport.Implementation.InterLineAdornmentManager.PerformLayout(SnapshotPoint trackingPoint)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.InterTextAdornmentSupport.Implementation.InterLineAdornmentManager.OnBatchedTagsChanged(Object sender, BatchedTagsChangedEventArgs e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
</entry>

What's going on? How can I fix or further diagnose this?

Details of Visual Studio

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA490
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA490
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA490
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA490
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-80000-00000-AA490
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA490
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Developer Assistant   1.0
Developer Assistant puts millions of code snippets and code sample projects at your fingertips while you are coding in Visual Studio.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

JetBrains ReSharper Ultimate 2015.1.2   Build 102.0.20150721.105606
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Azure HDInsight HQL Service   2.0.1000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.1000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.6
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.6.30508.1601

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft.Pex.VisualStudio   1.0
Pex

NCrunch   
Continuous Testing Tool for .NET
Copyright © 2010-2015 Remco Software Ltd

NuGet Package Manager   3.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

OneCodeQuickLaunchPackage   1.0
Information about my package

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50717.0
Microsoft SQL Server Data Tools

Visual C++ for Cross Platform Mobile Development   1.0
Visual C++ for Cross Platform Mobile Development

Xamarin   3.11.450.0 (2ab5145)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.0.115 (d23da369e436488f38c8ab8fe8a9ae7d9ea5256b)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.10.0.0 (7741cc495ab0baf04ff0405d0604bc27f0ecae2e)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration

Update

  1. Uninstalling NCrunch didn't solve anything
  2. Uninstallong both NCrunch and Resharper 9 seems to have fixed it.
  3. Reinstalling Resharper only seems to be OK.
  4. I have reinstalled NCrunch after
  5. I haven't tried reinstalling NCrunch yet a month and so far everything seems OK.
Isagoge answered 11/8, 2015 at 20:28 Comment(7)
One thing that's popping out to me is NCrunch. I haven't seen this but another user seems to have reported similar issues, is this kind of like what you're experiencing? Are you on windows 10? forum.ncrunch.net/yaf_postst1631_slow-typing-in-VS2015.aspxGrindery
That does look similar, I'll disable it and see what happens.Isagoge
Good luck! It looks like on further research it still has some issues in .NET 4.6. blog.ncrunch.net If this works for you let me knowGrindery
YES! That's it, as soon as I disable it the UI is slick again, re-enable it and immediately I had to hit the enter button twice. I'll run with it turned off for a few days to be sure.Isagoge
The project is in .NET 4.5.2, but .NET 6 is installed and I know that means that, whatever framework you're choosing, it'll use the new compiler.Isagoge
@AmandaLange Chuck it in the answers, you may as well claim those delicious rep. points.Isagoge
@Isagoge For what it's worth, I'm having this exact behavior/issue solely with Resharper (unless there is another common extension we're using, but it doesn't seem so).Disloyal
D
1

I've been having this issue just with Resharper (9.1.X).

I referenced this thread in my uninstall. I got an email from support to try some release candidates for 9.2. As long as 9.2 hasn't had an official release, it may be worth your time to try them if you are willing to take on a small risk.

https://confluence.jetbrains.com/display/ReSharper/ReSharper+9.2+EAP

I'm starting to try RC3, I'll come back to edit in my experience later. I figure it's probably better to get a possible solution up sooner rather than later, no matter what my experience with it dictates.

They just released Resharper 9.2. I'd see if installing that fixes the issue.

Alternatively, this answer helped solve the problem for me personally in case the new version doesn't solve the issues.

Disloyal answered 18/8, 2015 at 13:55 Comment(0)
G
0

potential problem - NCrunch extension has some issues currently sometimes in VS 2015. It is not currently behaving properly for .NET 4.6 according to this blog: http://blog.ncrunch.net/post/License-Server-Introduced!-NCrunch-216-now-available.aspx

Grindery answered 11/8, 2015 at 20:47 Comment(3)
Bugger, I've NCrunch uninstalled and computer restarted.... problem's still there!Isagoge
Darn, I thought we had it - I'll edit/leave my comment there in case this helps anyone else though. May just have to disable extensions until you think you've found it if that is what is throwing the exception. You can also try VS in Safe Mode msdn.microsoft.com/en-us/library/…Grindery
I've just uninstalled Reshaper too, then reinstalled it. It's looking good at present. If it behaves I'll reinstall NCrunch and see if it could just be a duff installation.Isagoge

© 2022 - 2024 — McMap. All rights reserved.