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

System.ArgumentOutOfRangeException: Value 1604 is too large for LineInfo.TextAt #19

Open
icsantos opened this issue Aug 18, 2021 · 2 comments

Comments

@icsantos
Copy link

Exception raised at 8/18/2021 4:34:29 PM:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Value 1604 is too large for LineInfo.TextAt
at IndentGuide.DocumentAnalyzer.LineInfo.set_TextAt(Int32 value)
at IndentGuide.DocumentAnalyzer.SetLineInfo(LineInfo[] lineInfo, ITextSnapshot snapshot, Int32 firstLine, Int32 lastLine, CancellationToken cancel)
at IndentGuide.DocumentAnalyzer.d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at IndentGuide.DocumentAnalyzer.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at IndentGuide.IndentGuideView.d__10.MoveNext()

@zooba
Copy link
Owner

zooba commented Jan 24, 2022

Should probably just not display anything at this distance. No need to raise - the noisy signal was mainly to catch issues at "reasonable" lengths, which don't appear to be there.

@dbgarlisch
Copy link

Loading a 37MB XML file triggered this same message for me:

Exception raised at 8/9/2022 6:38:31 PM:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Value 1048576 is too large for LineInfo.Number
   at IndentGuide.DocumentAnalyzer.LineInfo.set_Number(Int32 value)
   at IndentGuide.DocumentAnalyzer.SetLineInfo(LineInfo[] lineInfo, ITextSnapshot snapshot, Int32 firstLine, Int32 lastLine, CancellationToken cancel)
   at IndentGuide.DocumentAnalyzer.<ResetAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IndentGuide.IndentGuideView.<AnalyzeAndUpdateAdornmentsAsync>d__10.MoveNext()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants