Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentOutOfRangeException in Winterdom.Viasfora.Text.BraceCache.FindIndexOfFirstBraceInSpan() #15

Closed
jongalloway opened this issue Jan 2, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@jongalloway
Copy link

Getting this pretty often (version 1.2 installed):

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at Winterdom.Viasfora.Text.BraceCache.FindIndexOfFirstBraceInSpan(SnapshotSpan wantedSpan) in C:\tomasr\viasfora\Text\BraceCache.cs:line 177
at Winterdom.Viasfora.Text.BraceCache.Invalidate(SnapshotPoint startPoint) in C:\tomasr\viasfora\Text\BraceCache.cs:line 43
at Winterdom.Viasfora.Text.RainbowClassifier.UpdateBraceList(ITextSnapshot snapshot, INormalizedTextChangeCollection changes) in C:\tomasr\viasfora\Text\RainbowClassifier.cs:line 89
at Winterdom.Viasfora.Text.RainbowClassifier.BufferChanged(Object sender, TextContentChangedEventArgs e) in C:\tomasr\viasfora\Text\RainbowClassifier.cs:line 155
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

@tomasr
Copy link
Owner

tomasr commented Jan 2, 2014

Thanks for the Bug report, Jon.

Has any specific repro scenario come up?

I've rewritten much of this code for v1.3, which should be out in a couple of days and so this specific error shouldn't happen anymore.

I've posted a beta version of 1.3 at http://winterdom.com/files/Winterdom.Viasfora.vsix you can try if you want.

@ghost ghost assigned tomasr Jan 2, 2014
@tomasr
Copy link
Owner

tomasr commented Jan 5, 2014

Code completely rewritten in v1.3. As part of refactoring, the line cache was removed, eliminating the need to keep it in sync with the text buffer.

@tomasr tomasr closed this as completed Jan 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants