microsoft / CodeContracts

Source code for the CodeContracts tools for .NET
Other
882 stars 150 forks source link

Code Contracts crashing in background in VS2015 #447

Open JamesFaix opened 8 years ago

JamesFaix commented 8 years ago

Edit: Sorry, this is the same issue as #441

Hi Sergey,

There are several different issues I am currently experiencing with Code Contracts in VS2015.

The post I made on StackOverflow (http://stackoverflow.com/questions/38103495/vs2015-crashing-with-a-new-guard-page-when-just-editing-source-code) was the latest, and it seems to have stopped since upgrading to CC v1.10 RC2, but it could be just a coincidence.

Another issue I've been having is Code Contracts crashing in the background when I believe Roslyn is doing incremental compilation. This will not crash VS2015, but will prompt me to submit a bug to Code Contracts. This may be an issue with Code Contracts Editor Extensions. I am not sure if this is the right place for those issues. Here is the failure from the Output window:

Starting AugmentQuickInfoSession at 10:11 AM 5:56.31 AugmentQuickInfoSession failed System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: position at Microsoft.CodeAnalysis.SyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia) at ContractAdornments.IntellisenseContractsHelper.GetTargetAtTriggerPoint(ITrackingPoint triggerPoint, ITextSnapshot snapshot, SyntaxTree parseTree) at ContractAdornments.QuickInfoSource.<>cDisplayClass1.b0() at UtilitiesNamespace.Logger.PublicEntry(Action action, String entryName) 5:56.65 Code Contracts Editor Extensions 1.10.20606.1 14.0.25420.1 Visual Studio failed. 5:56.67 Work queue: 5:56.67 TextViewTracker for '(DocumentId, #b5893340-7a48-4523-86d8-4449af72b08c - C:\Users\jfaix\Workspaces\Simplugins\Production Projects\Disbursement Reporter-TrimData\DisbReporter.Core\DataAccess\Contracts\Contracts.cs)' unsubscribed from all events. 5:56.68 TextViewTracker for '(DocumentId, #1cea595b-75e0-41a7-ad45-51829965f74a - C:\Users\jfaix\Workspaces\Simplugins\Production Projects\Disbursement Reporter-TrimData\DisbReporter.DataProcessing2\DataViewer.cs)' unsubscribed from all events. 5:56.68 TextViewTracker for '(DocumentId, #b30ef025-d315-42bb-b4ab-6ee3f6e45039 - C:\Users\jfaix\Workspaces\Simplugins\Production Projects\Disbursement Reporter-TrimData\DisbReporter.DataProcessing2\ExtensionMethods.cs)' unsubscribed from all events. 5:56.68 Starting AugmentQuickInfoSession at 10:11 AM 6:0.558 AugmentQuickInfoSession failed System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: position at Microsoft.CodeAnalysis.SyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia) at ContractAdornments.IntellisenseContractsHelper.GetTargetAtTriggerPoint(ITrackingPoint triggerPoint, ITextSnapshot snapshot, SyntaxTree parseTree) at ContractAdornments.QuickInfoSource.<>cDisplayClass1.b0() at UtilitiesNamespace.Logger.PublicEntry(Action action, String entryName) 6:0.558 Code Contracts Editor Extensions 1.10.20606.1 14.0.25420.1 Visual Studio failed. 6:0.561 Work queue: 6:0.561

SergeyTeplyakov commented 8 years ago

Thanks a lot for bug report. I'll take a look at it.