question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IndexOutOfRangeException thrown in VtNetCore

See original GitHub issue

When I was using IAP Desktop to connect to a GCE instance via SSH, the following error occurred.

System.IndexOutOfRangeException: Buffer does not contain enough data to process request
   場所 VtNetCore.XTermParser.XTermInputBuffer.PeekAhead(Int32 skip)
   場所 VtNetCore.XTermParser.DataConsumer.Push(Byte[] data)
   場所 Google.Solutions.IapDesktop.Extensions.Shell.Controls.VirtualTerminal.ReceiveData(String text)
   場所 Google.Solutions.IapDesktop.Extensions.Shell.Views.SshTerminal.SshTerminalPane.OnDataReceivedFromServerAsync(Object sender, DataReceivedEventArgs args)
   場所 Google.Solutions.IapDesktop.Extensions.Shell.Views.SshTerminal.SshTerminalPaneViewModel.<>c__DisplayClass38_1.<ConnectAsync>b__6()

https://github.com/darrenstarr/VtNetCore/blob/060a72f074aafb8f8720f41616727a69755dade7/VtNetCore/XTermParser/XTermInputBuffer.cs#L133

IAP Desktop Version 2.17.616.0 .NET 4.8.4300.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jpassingcommented, Sep 3, 2021

The fix is now available in release 2.21.

1reaction
jpassingcommented, Aug 18, 2021

Certain Unicode characters such as U+201B SINGLE HIGH-REVERSED-9 QUOTATION MARK caused vtnetcore to wrongly interpret the following characters as an xterm control sequence (because 1b is the Escape character), which in turn could lead to an IndexOutOfRangeException. I’m pretty confident that the errors you’ve seen have been caused by this issue.

I implemented a fix and it will go into the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - What is an IndexOutOfRangeException ...
I have some code and when it executes, it throws a IndexOutOfRangeException , saying,. Index was outside the bounds of the array. What...
Read more >
IndexOutOfRangeException Class (System)
The exception that is thrown when an attempt is made to access an element of an array or collection with an index that...
Read more >
The Terminal Escape Sequences Ocean is Deep and Dark
We use VtNetCore at BastionZero to extract terminal commands in ... runs to the end of the InputBuffer it throws IndexOutOfRangeException, ...
Read more >
IndexOutOfRangeException in C#
It occurs when an invalid index is used to access a member of a collection. The following example throws the IndexOutOfRange exception: Example:....
Read more >
What is IndexOutOfRangeException in C#? - Code Maze
IndexOutOfRangeException gets thrown when we try to access a member of an array or a collection using an invalid index.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found