This project has moved. For the latest updates, please go here.

Plugin throws an exception during edit


Plugin throws an exception during edit of text file.
Visual studio ActivityLog.xml contains following exception:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: lineNumber
at Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber)
at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber)
at CodeMetrics.Adornments.MetricsAdornment.RepaintComplexity(ITextSnapshot textSnapshot)
at CodeMetrics.Adornments.MetricsAdornment.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

Steps to reproduce:
  1. Select multiple properties and methods in a class
  2. Delete the selected content
    Note: Even you try the STR, the issue appears only time to time.
    We should at least try to fix the behavior visible from the call stack, if we dont know source of the issue


elishalom wrote Jan 28, 2014 at 5:28 AM

Is there a way to reproduce it? Perhaps a specific edit or flow?
Does it happen a lot?

jirkapok wrote Jan 28, 2014 at 7:15 AM

Yes, good points, i will get more details.

jirkapok wrote Aug 28, 2015 at 8:09 AM

Didn't appear long time.