madskristensen / MarkdownEditor

A Visual Studio extension
Other
409 stars 93 forks source link

System.ArgumentOutOfRangeException while editing #196

Open RalfKoban opened 4 years ago

RalfKoban commented 4 years ago

Installed product versions

Description

On occasion I get following error while editing (found inside Activity Monitor log):

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: length
   at Microsoft.VisualStudio.Text.Span..ctor(Int32 start, Int32 length)
   at MarkdownEditor.Outlining.MarkdownOutliningTagger.<ProcessHeadingBlocks>d__10.MoveNext() in C:\projects\markdowneditor\src\Outlining\MarkdownOutliningTagger.cs:line 137
   at System.Linq.Enumerable.<UnionIterator>d__67`1.MoveNext()
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Steps to recreate

Unfortunately it is unclear to me how to exactly reproduce it. The document seemed to be a longer one and I had ActiveSync disabled.

The edited (added) text was:


## Test cases

### New installation
- Install Xyz on a Windows 7
- 

### Upgrade
### Downgrade

### Uninstallation

Current behavior

Throwing exception during editing

Expected behavior

Not throw an exception

madskristensen commented 2 years ago

This is fixed in the new preview extension https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor2