Skip to content

Error: Editing F# files is throwing an exception #281

Open
@BlueBayliss

Description

@BlueBayliss

Versions

  • Git Diff Margin version: 3.10.1.191
  • Visual Studio version: VS Professional 2019 v16.3.10

What happened

When editing an F# file I always get the gold exception bar saying "An exception of type ArgumentException has been encountered. This may be caused by an extension. [Open log file]"

Steps to Reproduce

Steps to reproduce the behavior:

  1. Open an F# solution using *.fs files
  2. Edit one of the *.fs files
  3. Exception is usually thrown within the first few key presses
  4. After dismissing the gold bar the plugin appears to continue working fine
  5. Disabling GitDiffMargin and restarting Visual Studio causes the issue to go away

Log extracts

System.ArgumentException: The specified SnapshotPoint or SnapshotSpan is on a different ITextSnapshot than this SnapshotSpan. at Microsoft.VisualStudio.Text.SnapshotSpan.EnsureSnapshot(ITextSnapshot requestedSnapshot) at Microsoft.VisualStudio.Text.SnapshotSpan.IntersectsWith(SnapshotSpan snapshotSpan) at GitDiffMargin.EditorDiffMargin.UpdateNormalDiffDimensions(DiffViewModel diffViewModel, HunkRangeInfo hunkRangeInfo) at GitDiffMargin.EditorDiffMargin.UpdateDiffDimensions(DiffViewModel diffViewModel, HunkRangeInfo hunkRangeInfo) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.EditorDiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffMarginViewModelBase.RefreshDiffViewModelPositions() at GitDiffMargin.DiffMarginBase.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

System.ArgumentException: The supplied SnapshotPoint is on an incorrect snapshot. Parameter name: bufferPosition at Microsoft.VisualStudio.Text.OverviewMargin.Implementation.DefaultScrollMap.TranslatePosition(SnapshotPoint bufferPosition) at Microsoft.VisualStudio.Text.OverviewMargin.Implementation.DefaultScrollMap.GetCoordinateAtBufferPosition(SnapshotPoint bufferPosition) at Microsoft.VisualStudio.Text.OverviewMargin.Implementation.SideBySideScrollMap.GetCoordinateAtBufferPosition(SnapshotPoint bufferPosition) at Microsoft.VisualStudio.Text.OverviewMargin.Implementation.ScrollMapWrapper.GetCoordinateAtBufferPosition(SnapshotPoint bufferPosition) at GitDiffMargin.ScrollDiffMargin.UpdateDiffDimensions(DiffViewModel diffViewModel, HunkRangeInfo hunkRangeInfo) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffMarginViewModelBase.RefreshDiffViewModelPositions() at GitDiffMargin.DiffMarginBase.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

ActivityLog.txt

Additional context

This seems related to issue #83

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions