Bugzilla – Bug 7053
Tags with cyrillic characters breaks CLI
Last modified: 2009-09-08 09:30:18 UTC
Server: SC build 17126 for linux (redhat rpm package) Perl: 5.8.8 Platform: ClarkConnect 4.2 (linux) I have files tagged with cyrillic characters. If I use the CLI to load an album I will receive a track count as a part of the reply. I use this to iterate through the tracks of the album to get title and duration using "playlist title <num> ?" and "playlist duration <num> ?" Once I reach a file that has a title containing cyrillic characters the server stops responding to any further requests. I have to close the connection and reopen it to keep going. I turned the control.queries and control.command to debugging state and below is the result of entering "playlist title 2 ?" from a telnet connection to the server. After this I was unable to send any more commands ("exit" did not work) with this connection. Other connections continued to work as normal. To me it seems the [08-02-09 09:36:54.4335] timestamp shows that the title is retrived fine from the database. Not sure if it is impotant, but the filename itself is written with cyrillic characters as well. So is the directory where it is located. [08-02-09 09:36:54.4113] Slim::Control::Request::__parse (2319) Request: parse(playlist title 2 ?) [08-02-09 09:36:54.4122] Slim::Control::Request::__parse (2339) ..Trying to match [playlist] [08-02-09 09:36:54.4131] Slim::Control::Request::__parse (2424) ..[playlist] is HASH [08-02-09 09:36:54.4139] Slim::Control::Request::__parse (2339) ..Trying to match [title] [08-02-09 09:36:54.4147] Slim::Control::Request::__parse (2424) ..[title] is HASH [08-02-09 09:36:54.4155] Slim::Control::Request::__parse (2339) ..Trying to match [2] [08-02-09 09:36:54.4163] Slim::Control::Request::__parse (2347) ..no match for [2] [08-02-09 09:36:54.4170] Slim::Control::Request::__parse (2363) ...looking for a key starting with _ [08-02-09 09:36:54.4179] Slim::Control::Request::__parse (2369) ....considering [_index] [08-02-09 09:36:54.4187] Slim::Control::Request::__parse (2375) ....[_index] starts with _ [08-02-09 09:36:54.4194] Slim::Control::Request::__parse (2382) ....not out of verbs, adding param [_index, 2] [08-02-09 09:36:54.4210] Slim::Control::Request::__parse (2424) ..[_index] is HASH [08-02-09 09:36:54.4219] Slim::Control::Request::__parse (2339) ..Trying to match [?] [08-02-09 09:36:54.4227] Slim::Control::Request::__parse (2405) ..[?] is ARRAY -> done [08-02-09 09:36:54.4242] Slim::Control::Request::execute (1715) Enter [08-02-09 09:36:54.4253] Slim::Control::Request::dump (2208) Request: Query [00:04:20:12:65:ad->playlist title] f rom CLI (Dispatchable) [08-02-09 09:36:54.4263] Slim::Control::Request::dump (2212) Param: [_index] = [2] [08-02-09 09:36:54.4274] Slim::Control::Queries::playlistXQuery (1796) Begin Function [08-02-09 09:36:54.4301] Slim::Control::Request::dump (2208) Request: Query [00:04:20:12:65:ad->playlist title] f rom CLI (Done) [08-02-09 09:36:54.4311] Slim::Control::Request::dump (2212) Param: [_index] = [2] [08-02-09 09:36:54.4330] Slim::Utils::Misc::msg (1239) Warning: [09:36:54.4320] Wide character in print at /usr/s hare/squeezecenter/CPAN/Log/Log4perl/Appender/Screen.pm line 32. [08-02-09 09:36:54.4335] Slim::Control::Request::dump (2234) Result: [_title] = [Время] [08-02-09 09:36:54.4344] Slim::Control::Request::executeDone (1783) 0 [08-02-09 09:36:54.4372] Slim::Networking::Select::select (245) Error: Select task failed: Can't escape \x{0412}, try uri_escape_utf8() instead at /usr/local/bin/mypearl/lib/perl5/site_perl/Slim/Control/Stdio.pm line 133
Can you attach a log of the actual CLI transaction as well as a file that exhibits this behavior?
QA: please reproduce.
I'll try later today. I am writing a program to control SB's from a linux PC device and I use various commands to detect players, populate a tree-list with artist and albums and load albums. I also use (used) the "playlist title <num> ?" to retrieve, in a separate list, what is in the current (unamed) playlist so that the user can see what is played on startup. But I do not have to do this. Once I know that at a certain index in the current (maybe unamed) playlist is a file with cyrillic data. I can open a separate telnet session like this > telnet <ip-address> 9090 > playlist title <num> ? -> No reply and I can not enter more commands or leave using "exit" I have not tried to select an album (with the offending files) from the regular remote and then tested with telnet. I'll do that later today.
Espen - any chance you can upload some log files?
Created attachment 3131 [details] server.log with (control.command), (control.queries), (plugin.cli) set to DEBUG This log was created with no browsers connecting to the sever. I have an album (id = 384) from a russian artist (id = 91). All tracks have a title with cyrillic caracters. From a telnet connection I did this to hang the CLI session. >telnet 192.168.1.3 9090 Escape character is '^]'. >playlistcontrol cmd:load artist_id:91 album_id:384 >00%3A04%3A20%3A12%3A65%3Aad playlistcontrol cmd%3Aload artist_id%3A91 album_id%3A384 count%3A12 >playlist title 2 ? >? >? Notice no reply to the last two question marks (or anything else). Connection hangs. Also. I if open a new second telnet connection and type a command, then the missing replies arrive in the first telnet session and the first session can be operated again.
Ok, I hope the attached log file helps
Are you using the latest SC build? (7.0.1 nightly)
No, sorry I am not. Still using same setup as written in initial report. (awaiting some more hardware before I upgrade).
I fixed the uri_escape call to use uri_escape_utf8 in change 18149. Please re-test.
Fix works perfect here using 7.0.1 - 18235 - Red Hat
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1 Please try that version, if you still see the error, then reopen this bug. To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html
Reduce number of active targets for SC