richterger / Perl-LanguageServer

Language Server for Perl
Other
224 stars 51 forks source link

Server hangs at cyrillic encoded string #76

Closed ragnayev closed 1 year ago

ragnayev commented 3 years ago

Hi,

A file with program code: ` use strict; use warnings;

print "А"; ` A - is in Cyrillic encoding. When trying to save the file, the server produces a lot of records in a log file:

EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661. EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661. EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.

VS Code ver. 1.54.1 Remote server debian 10.8 Local MacOS

Regards, Ruslan

richterger commented 3 years ago

Can you please attach the file to reproduce the error here.

ragnayev commented 3 years ago

Hi Gerald,

thank you very much for the extension

issue.txt

Regards, Ruslan

вс, 14 мар. 2021 г. в 18:41, Gerald Richter @.***>:

Can you please attach the file to reproduce the error here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richterger/Perl-LanguageServer/issues/76#issuecomment-798938469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKDX7QJKAJJGSOLZQCHUTTTDTRKRANCNFSM4YU2VJTA .

richterger commented 3 years ago

Which encoding do you see at the bottom of VSCode? Which is the encoding you are using? Is it utf-8 or ios8859-2 or anything else? For me the file is opened as utf-8 and everything works fine?

ragnayev commented 3 years ago

It's UTF-8 encoding displays at the bottom of VSCode.

I checked it out right now again. Just added a word in Cyrillic and saved the file. The log file immediately starts growing and fills with many lines

EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.

EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661. EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661.

after I quit from VSCode, log file contains:

EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661. LS: end aio read cnt=22 LS: line=<Content-Length: 58> LS: line=<> EV: error in callback (ignoring): Wide character in syswrite at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/AnyEvent/Util.pm line 661. LS: read data={"jsonrpc":"2.0","id":6,"method":"shutdown","params":null} LS: read header={ "Content-Length" => 58 } LS: ---> Request: { "method" : "shutdown", "id" : 6, "params" : null, "jsonrpc" : "2.0" }

LS: handle_req id=6 Attribute (params) does not pass the type constraint because: Validation failed for 'HashRef' with value undef at /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/Moose/Object.pm line 24 Moose::Object::new('Perl::LanguageServer::Req', 'HASH(0x558849c8e7f0)') called at /usr/local/share/perl/5.28.1/Perl/LanguageServer.pm line 250 Perl::LanguageServer::ANON at /usr/lib/x86_64-linux-gnu/perl5/5.28/Coro.pm line 716 Coro::_coro_run at -e line 0 LS: done handle_req id=6 Can't call method "logger" on an undefined value at /usr/local/share/perl/5.28.1/Perl/LanguageServer.pm line 241 during global destruction.

Regards,

вс, 11 июл. 2021 г. в 16:58, Gerald Richter @.***>:

Which encoding do you see at the bottom of VSCode? Which is the encoding you are using? Is it utf-8 or ios8859-2 or anything else? For me the file is opened as utf-8 and everything works fine?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richterger/Perl-LanguageServer/issues/76#issuecomment-877804684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKDX7R3BHSPCOUSJDW27H3TXGPPRANCNFSM4YU2VJTA .

richterger commented 3 years ago

Could you please set logLevel to 2, restart vscode and post the full log output

ragnayev commented 3 years ago

The current LogLevel is already 2

LogLevel state https://1drv.ms/u/s!AnBfo1WAClRC1gWHo4Q_8GBOcIJV?e=FRepZX

вс, 11 июл. 2021 г. в 19:56, Gerald Richter @.***>:

Could you please set logLevel to 2, restart vscode and post the full log output

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richterger/Perl-LanguageServer/issues/76#issuecomment-877831882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKDX7QUIYYCKFHOSO25YJ3TXHEMXANCNFSM4YU2VJTA .

richterger commented 1 year ago

Should be fixed in 2.6.0+