ArgumentOutOfRangeException in VS

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

ArgumentOutOfRangeException in VS

Postby jorrit » April 15th, 2017, 9:40 am

When typing in PHP files of a PHP project in VS2015, it tries to evaluate the file, but of course it will show errors and warnings, because typing is in process. One of the first times this happens in a new VS session, VS always shows a message box refering to ActivityLog.xml. In the log, this is the exception made:
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
 at System.String.Substring(Int32 startIndex, Int32 length)
 at Microsoft.Web.Editor.Text.TextProvider.GetText(Int32 position, Int32 length)
 at Microsoft.Web.Editor.Text.TextProvider.GetText(ITextRange range)
 at Microsoft.Html.Core.Artifacts.ArtifactCollection.IsDestructiveChangeForItemSeparators(IArtifact item, ISensitiveFragmentSeparatorsInfo separatorInfo, String actualRightSeparator, Int32 start, Int32 oldLength, Int32 newLength, ITextProvider oldText, ITextProvider newText)
 at Microsoft.Html.Core.Parser.Fragments.SensitiveFragmentCollection`1.IsDestructiveChangeForSeparator(ISensitiveFragmentSeparatorsInfo separatorInfo, IReadOnlyList`1 itemsInRange, Int32 start, Int32 oldLength, Int32 newLength, ITextProvider oldText, ITextProvider newText)
 at Microsoft.Html.Core.Parser.Fragments.SensitiveFragmentCollection`1.IsDestructiveChange(Int32 start, Int32 oldLength, Int32 newLength, ITextProvider oldText, ITextProvider newText)
 at Microsoft.Html.Editor.Tree.TextChangeAnalyzer.ChangeInsideArtifact(TextChangeContext change)
 at Microsoft.Html.Editor.Tree.TextChangeAnalyzer.DetermineChangeType(TextChangeContext change)
 at Microsoft.Html.Editor.Tree.TreeUpdateTask.OnTextChanges(List`1 textChanges)
 at Microsoft.Html.Editor.Tree.HtmlEditorTree.OnTextBufferChanged(Object sender, TextContentChangedEventArgs e)
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

It happens with every PHP project. It does not happen when working on .NET projects. The error does not seem to affect behaviour of VS or PHP Tools.
jorrit
 
Posts: 16
Joined: March 26th, 2015, 8:08 am
Location: Amsterdam

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger