Code-server: UTF-8 text garbling on opening file

Created on 1 Jul 2020  路  6Comments  路  Source: cdr/code-server

When I open the file (bake.txt), the editor of vscode tab has a text garbling.

Attached file (bake.txt) has 1000 repeated same lines and no text garbling.
But, opened file in editor has garbled line, it's line number is always 586.

It is reproduced on chrome and safari.

Log file is here. ClientLogPane Log(Remote Server).txt

  • Web Browser: chrome & safari
  • Local OS: MacOS Catalina
  • Remote OS: Debian10
  • Remote Architecture: x64
  • code-server --version: code-server 3.4.1 48f7c2724827e526eeaa6c2c151c520f48a61259

thanks.

bug

All 6 comments

The picture shows around line 586.
screenshot

I edited bufferSize:65536 to bufferSize:6553600 of /usr/lib/code-server/lib/vscode/out/vs/server/entry.js.

Text garblings is disappeared.

So, This bug may be related with buffer or data recombination between buffers.

Is /usr/lib/code-server/lib/vscode/out/vs/server/entry.js made from code-server/ci/dev/vscode.patch of this repository.

c.f.
code-server/ci/dev/vscode.patch:1544

  • bufferSize: 64 * 1024, // From DiskFileSystemProvider

Nice find!! I tried modifying the code to call VS Code's own readFileStream instead of handling it ourselves but the problem persists. Tomorrow I'm going to try out VS Code's remote SSH extension and see if it has the same problem to see if it's a bug in our implementation.

It works fine with the extension so it could be our implementation or it could be something in the web portion of VS Code, maybe with where it reads the stream returned by the server. :thinking:

@code-asher
Wow, This bug disappeared on ver.3.5.0.!
Do you know something about this.

I wasn't aware but that's great news! I'll go ahead and close the issue.

I wonder if it was accidentally fixed when the streams were modified to support multiple encodings.

Edit: also sorry for not responding earlier; I didn't get an email notification until 50 minutes ago for some reason. :shrug:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

balazssoltesz picture balazssoltesz  路  3Comments

KSXGitHub picture KSXGitHub  路  3Comments

Arsaev picture Arsaev  路  3Comments

pchecinski picture pchecinski  路  3Comments

lshamis picture lshamis  路  3Comments