I keep getting this error while using a surround snippet

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

I keep getting this error while using a surround snippet

Postby BladeMF » September 8th, 2016, 6:52 am

I get this at least two or three times a day doing different things.

Code: Select all
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length 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)
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: I keep getting this error while using a surround snippet

Postby Miloslav Beno » September 12th, 2016, 1:33 pm

Hi Blade,

Thanks for posting this! May I ask you to update to the latest 1.20 preview to see if this is gone.

Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: I keep getting this error while using a surround snippet

Postby BladeMF » September 16th, 2016, 7:16 pm

Miloslav Beno wrote:Hi Blade,

Thanks for posting this! May I ask you to update to the latest 1.20 preview to see if this is gone.

Thanks,


How do I get this preview?
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: I keep getting this error while using a surround snippet

Postby Miloslav Beno » September 17th, 2016, 5:58 pm

You can download latest preview version from our download page https://www.devsense.com/download

Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: I keep getting this error while using a surround snippet

Postby BladeMF » September 17th, 2016, 8:33 pm

Miloslav Beno wrote:You can download latest preview version from our download page https://www.devsense.com/download

Thanks,


Okay. Installing and letting you know.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: I keep getting this error while using a surround snippet

Postby BladeMF » September 18th, 2016, 9:37 am

Miloslav Beno wrote:You can download latest preview version from our download page https://www.devsense.com/download

Thanks,


Okay, I installed and then uninstalled it, because it has colorizing ussues:

Code: Select all
<?php

use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance.
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
// with other applications also using APC.
/*
$apcLoader = new ApcClassLoader('sf2', $loader);
$loader->unregister();
$apcLoader->register(true);
 */
$envName = "prod";
$debugMode = false;


Here it stops colorizing at the "$apcLoader->register(true);" line. This was a big problem for me so I didn't test further. Sorry :( Please alert when fixed and I will try again.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: I keep getting this error while using a surround snippet

Postby Jakub Misek » September 19th, 2016, 7:18 am

The issue with colorization has been fixed in latest update #1.20.9038

www.devsense.com/download

Thanks,
Jakub
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: I keep getting this error while using a surround snippet

Postby BladeMF » September 19th, 2016, 9:02 pm

Jakub Misek wrote:The issue with colorization has been fixed in latest update #1.20.9038

http://www.devsense.com/download

Thanks,
Jakub


Installing.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: I keep getting this error while using a surround snippet

Postby BladeMF » September 20th, 2016, 8:52 am

Jakub Misek wrote:The issue with colorization has been fixed in latest update #1.20.9038

http://www.devsense.com/download

Thanks,
Jakub


This version seems to have an issue with /** @var */ hints - they are not working, saw two just now. Its a syfony project.
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: I keep getting this error while using a surround snippet

Postby Jakub Misek » September 20th, 2016, 12:24 pm

BladeMF wrote:This version seems to have an issue with /** @var */ hints - they are not working, saw two just now. Its a syfony project.

Thanks for feedback, we did make the parser fully compatible with PHP7 which does not support such a feature. We're making improvements so the feature will be back in next update.

Thanks!
Jakub
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Next

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 54 guests

cron

User Control Panel

Login

Who is online

In total there are 54 users online :: 0 registered, 0 hidden and 54 guests (based on users active over the past 5 minutes)
Most users ever online was 297 on March 29th, 2024, 7:06 am

Users browsing this forum: No registered users and 54 guests