You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
With a new project create a file with the following code:
using System;
namespace test
{
class Foo
{
public void crashTest()
{
String.CompareOrdinal("",a");
// TODO: Implement Functionality Here
}
}
}
Note the error on line 9 with the 'a' not inside double quotes.
The parser then gets the line numbers for the TODO comment. It finds the comment start and end are at:
line 9, 38
line 9, 48
When they should be:
line 10, 4
line 10, 14
Then an exception is thrown:
Unhandled WPF exception
--> Exception:
System.ArgumentOutOfRangeException: Value must be >= 0
Parameter name: length
Actual value was -2.
at ICSharpCode.AvalonEdit.Utils.CharRope.ToString(Rope`1 rope, Int32 startIndex, Int32 length) in src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\Utils\CharRope.cs:line 55
at ICSharpCode.AvalonEdit.Document.TextDocument.GetText(Int32 offset, Int32 length) in src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\Document\TextDocument.cs:line 167
at CSharpBinding.Parser.TParser.AddCommentTags(SyntaxTree cu, IList`1 tagComments, ITextSource fileContent, FileName fileName, IDocument& document) in src\AddIns\BackendBindings\CSharpBinding\Project\Src\Parser\Parser.cs:line 104
at CSharpBinding.Parser.TParser.Parse(FileName fileName, ITextSource fileContent, Boolean fullParseInformationRequested, IProject parentProject, CancellationToken cancellationToken) in src\AddIns\BackendBindings\CSharpBinding\Project\Src\Parser\Parser.cs:line 77
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.ParseWithExceptionHandling(ITextSource fileContent, Boolean fullParseInformationRequested, IProject project, CancellationToken cancellationToken) in src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 312
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.DoParse(ITextSource fileContent, IProject parentProject, Boolean fullParseInformationRequested, CancellationToken cancellationToken) in src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 265
at ICSharpCode.SharpDevelop.Parser.ParserServiceEntry.Parse(ITextSource fileContent, IProject parentProject, CancellationToken cancellationToken) in src\Main\SharpDevelop\Parser\ParserServiceEntry.cs:line 209
at ICSharpCode.SharpDevelop.Parser.ParserService.Parse(FileName fileName, ITextSource fileContent, IProject parentProject, CancellationToken cancellationToken) in src\Main\SharpDevelop\Parser\ParserService.cs:line 251
at ICSharpCode.AvalonEdit.AddIn.CodeEditorView.UpdateParseInformationForFolding(ParseInformation parseInfo) in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\CodeEditorView.cs:line 497
at ICSharpCode.AvalonEdit.AddIn.CodeEditor.ParseInformationUpdated(ParseInformation parseInfo) in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\CodeEditor.cs:line 696
at ICSharpCode.AvalonEdit.AddIn.CodeEditor.FetchParseInformation() in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\CodeEditor.cs:line 650
at ICSharpCode.AvalonEdit.AddIn.CodeEditor.set_FileName(FileName value) in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\CodeEditor.cs:line 133
at ICSharpCode.AvalonEdit.AddIn.AvalonEditViewContent.Load(OpenedFile file, Stream stream) in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\AvalonEditViewContent.cs:line 163
at ICSharpCode.SharpDevelop.Workbench.OpenedFile.SwitchedToView(IViewContent newView) in src\Main\Base\Project\Workbench\File\OpenedFile.cs:line 326
at ICSharpCode.SharpDevelop.Workbench.OpenedFile.ForceInitializeView(IViewContent view) in src\Main\Base\Project\Workbench\File\OpenedFile.cs:line 146
at ICSharpCode.SharpDevelop.Workbench.FileServiceOpenedFile.ForceInitializeView(IViewContent view) in src\Main\SharpDevelop\Workbench\FileServiceOpenedFile.cs:line 73
at ICSharpCode.AvalonEdit.AddIn.AvalonEditViewContent..ctor(OpenedFile file, Encoding fixedEncodingForLoading) in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\AvalonEditViewContent.cs:line 69
at ICSharpCode.AvalonEdit.AddIn.AvalonEditDisplayBinding.CreateContentForFile(OpenedFile file) in src\AddIns\DisplayBindings\AvalonEdit.AddIn\Src\AvalonEditDisplayBinding.cs:line 56
at ICSharpCode.SharpDevelop.Workbench.FileService.LoadFileWrapper.Invoke(FileName fileName) in src\Main\SharpDevelop\Workbench\FileService.cs:line 356
at ICSharpCode.Core.FileUtility.<>c__DisplayClass13.<ObservedLoad>b__12() in src\Main\Core\Project\Src\Services\FileUtility\FileUtility.cs:line 724
at ICSharpCode.Core.FileUtility.ObservedLoad(FileOperationDelegate loadFile, FileName fileName, String message, FileErrorPolicy policy) in src\Main\Core\Project\Src\Services\FileUtility\FileUtility.cs:line 683
at ICSharpCode.Core.FileUtility.ObservedLoad(NamedFileOperationDelegate saveFileAs, FileName fileName, String message, FileErrorPolicy policy) in src\Main\Core\Project\Src\Services\FileUtility\FileUtility.cs:line 724
at ICSharpCode.Core.FileUtility.ObservedLoad(NamedFileOperationDelegate saveFileAs, FileName fileName, FileErrorPolicy policy) in src\Main\Core\Project\Src\Services\FileUtility\FileUtility.cs:line 729
at ICSharpCode.SharpDevelop.Workbench.FileService.OpenFile(FileName fileName, Boolean switchToOpenedView) in src\Main\SharpDevelop\Workbench\FileService.cs:line 324
at ICSharpCode.SharpDevelop.FileService.OpenFile(String fileName) in src\Main\Base\Project\Workbench\File\FileService.cs:line 71
at ICSharpCode.SharpDevelop.Project.DefaultProjectBehavior.<>c__DisplayClass1.<ProjectLoaded>b__0() in src\Main\Base\Project\Src\Project\Behaviors\DefaultProjectBehavior.cs:line 129
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
The text was updated successfully, but these errors were encountered:
With a new project create a file with the following code:
Note the error on line 9 with the 'a' not inside double quotes.
The parser then gets the line numbers for the TODO comment. It finds the comment start and end are at:
When they should be:
Then an exception is thrown:
The text was updated successfully, but these errors were encountered: