Bug 1453 - WIDE CHARACTER ' server crash
: WIDE CHARACTER ' server crash
Status: CLOSED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Streaming From SlimServer
: 6.1.0
: PC Windows (legacy)
: P1 blocker with 1 vote (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-27 07:30 UTC by Nalle Johansson
Modified: 2008-08-18 10:54 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
My configurationfile (301.41 KB, text/plain)
2005-05-12 13:41 UTC, Nalle Johansson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nalle Johansson 2005-04-27 07:30:37 UTC
My systems craches within 10 minutes now. I have tryed 5.x and every last 
nightly of 6.x and all of them crashes my server with WIDE CHARACTER SEND.

Is there anything I can do to play my music again?

Nalle

DEBUG MESSAGE:
Malformed UTF-8 character (unexpected non-continuation byte 0x52, immediately
        after start byte 0xc5) in unpack at /PerlApp/Slim/Display/Graphics.pm li
ne 70 (#2)
Malformed UTF-8 character (unexpected non-continuation byte 0x52, immediately af
ter start byte 0xc5) in unpack at /PerlApp/Slim/Display/Graphics.pm line 70.
Malformed UTF-8 character (unexpected non-continuation byte 0x52, immediately
        after start byte 0xc5) in unpack at /PerlApp/Slim/Display/Graphics.pm li
ne 70, <GEN93> line 1 (#2)

Wide character in send at /PerlApp/IO/Socket.pm line 218 (#3)
    (W utf8) Perl met a wide character (>255) when it wasn't expecting
    one.  This warning is by default on for I/O (like print).  The easiest
    way to quiet this warning is simply to add the :utf8 layer to the
    output, e.g. binmode STDOUT, ':utf8'.  Another way to turn off the
    warning is to add no warnings 'utf8'; but that is often closer to
    cheating.  In general, you are supposed to explicitly mark the
    filehandle with an encoding, see open and perlfunc/binmode.
Comment 1 KDF 2005-04-27 12:42:21 UTC
do you have a slimp3 connected?  is it large text, using rssnews screensaver
possibly?
Comment 2 Blackketter Dean 2005-04-28 21:05:27 UTC
Nalle:  Is this happening in a nightly build?  Also, are you using the built slim.exe executable or another 
version of perl?

Dan: Vidur told me about a bug in an old version of perl where two joined non-utf8 strings could result 
in a utf8 string.  That could explain this bug.  Apparently, it's been recently fixed, so an updated 
version of perl might do the trick.

Vidur: can you post details?
Comment 3 Nalle Johansson 2005-04-29 01:37:56 UTC
I use the .exe file and I have tryed it as a service and as a executable in a 
cmd-window.

I have tryed all versions of nigly 27/4.
Comment 4 Nalle Johansson 2005-04-29 01:44:11 UTC
I just tryed version 6.03 lat3est build 28/4 2005. (There is no .exe in 29/4 
directory)

When starting slim.exe I got:
Use of uninitialized value in exists at /PerlApp/Slim/Buttons/Home.pm line 159, 
<DATA> line 1 #1

After a while I got 
Malformed UTF-8 character (unexpected non-continuation byte 0x52, immediately
        after start byte 0xc5) in unpack at /PerlApp/Slim/Display/Graphics.pm li
ne 70 (#2)
Malformed UTF-8 character (unexpected non-continuation byte 0x52, immediately af
ter start byte 0xc5) in unpack at /PerlApp/Slim/Display/Graphics.pm line 70.
Wide character in send at /PerlApp/IO/Socket.pm line 218 (#3)
    (W utf8) Perl met a wide character (>255) when it wasn't expecting
    one.  This warning is by default on for I/O (like print).  The easiest
    way to quiet this warning is simply to add the :utf8 layer to the
    output, e.g. binmode STDOUT, ':utf8'.  Another way to turn off the
    warning is to add no warnings 'utf8'; but that is often closer to
    cheating.  In general, you are supposed to explicitly mark the
    filehandle with an encoding, see open and perlfunc/binmode.
Comment 5 KDF 2005-05-03 15:17:02 UTC
if you turn on d_ui, what is the last bit in the log before the crash?
Comment 6 Nalle Johansson 2005-05-03 16:02:10 UTC
2005-05-04 00:59:07.8794 vfdUpdate european
line1: Now Playing (5 of 248)             01:55
line2: Lambretta - Bimbo.mp3                  ��notesymbol��

2005-05-04 00:59:07.9104 vfdUpdate european
line1: Now Playing (5 of 248)             01:55
line2: Lambretta - Bimbo.mp3                  ��notesymbol��

Wide character in send at /PerlApp/IO/Socket.pm line 218.
Comment 7 Nalle Johansson 2005-05-03 16:14:13 UTC
And with all debug features on this is the last part:

2005-05-04 01:14:45.5599 new state: OP
2005-05-04 01:14:45.5619 state: OP, framelen: 0, inbuflen: 0
2005-05-04 01:14:45.5655 attempting to read 4 bytes
2005-05-04 01:14:45.5679 Got 4 bytes from client, 0 remaining
2005-05-04 01:14:45.5699 new state: LENGTH
2005-05-04 01:14:45.5720 state: LENGTH, framelen: 0, inbuflen: 0
2005-05-04 01:14:45.5740 attempting to read 4 bytes
2005-05-04 01:14:45.5762 Got 4 bytes from client, 0 remaining
2005-05-04 01:14:45.5783 new state: DATA
2005-05-04 01:14:45.5805 state: DATA, framelen: 29, inbuflen: 0
2005-05-04 01:14:45.5825 attempting to read 29 bytes
2005-05-04 01:14:45.5846 Got 29 bytes from client, 0 remaining
2005-05-04 01:14:45.5865 Got Slimproto frame, op STAT, length 29, IO::Socket::IN
ET=GLOB(0x3c0a2c0)
2005-05-04 01:14:45.5909 FACTORYTEST    event=stat      mac=00:04:20:05:0a:38
signalstrength=92
2005-05-04 01:14:45.5949 00:04:20:05:0a:38 Squeezebox stream status:
        event_code:      vfdc
        num_crlf:        4
        mas_initiliazed: 109
        mas_mode:        2
        bytes_rec_H      0
        bytes_rec_L      4130029
        fullness:        228037 (99%)
        bytes_received   4130029
        signal_strength: 92
        jiffies:         2171261148
2005-05-04 01:14:45.6156 new state: OP
2005-05-04 01:14:45.6177 state: OP, framelen: 0, inbuflen: 0
2005-05-04 01:14:45.6210 attempting to read 4 bytes
2005-05-04 01:14:45.6231 Got 4 bytes from client, 0 remaining
2005-05-04 01:14:45.6257 new state: LENGTH
2005-05-04 01:14:45.6278 state: LENGTH, framelen: 0, inbuflen: 0
2005-05-04 01:14:45.6299 attempting to read 4 bytes
2005-05-04 01:14:45.6320 Got 4 bytes from client, 0 remaining
2005-05-04 01:14:45.6341 new state: DATA
2005-05-04 01:14:45.6359 state: DATA, framelen: 29, inbuflen: 0
2005-05-04 01:14:45.6385 attempting to read 29 bytes
2005-05-04 01:14:45.6405 Got 29 bytes from client, 0 remaining
2005-05-04 01:14:45.6423 Got Slimproto frame, op STAT, length 29, IO::Socket::IN
ET=GLOB(0x3c0a2c0)
2005-05-04 01:14:45.6466 FACTORYTEST    event=stat      mac=00:04:20:05:0a:38
signalstrength=92
2005-05-04 01:14:45.6507 00:04:20:05:0a:38 Squeezebox stream status:
        event_code:      vfdc
        num_crlf:        4
        mas_initiliazed: 109
        mas_mode:        2
        bytes_rec_H      0
        bytes_rec_L      4131372
        fullness:        228418 (99%)
        bytes_received   4131372
        signal_strength: 92
        jiffies:         2171261188
2005-05-04 01:14:45.6713 new state: OP
2005-05-04 01:14:45.6734 state: OP, framelen: 0, inbuflen: 0
2005-05-04 01:14:45.6768 attempting to read 4 bytes
2005-05-04 01:14:45.6793 no more to read.
2005-05-04 01:14:45.6815 firing timer 1.39693188667297 late.
2005-05-04 01:14:45.6837 screenSaver idle display 1115169255.68361(mode:playlist
)
2005-05-04 01:14:45.6918 sending squeezebox frame: grfd, length: 562
2005-05-04 01:14:45.6927 writeNoBlock: writing a segment of length: 568
2005-05-04 01:14:45.6936 settimer: CODE(0x162680c), now: 1115169285.69362, time:
 1115169286.68361
2005-05-04 01:14:45.6961 firing timer 1.3338406085968 late.
2005-05-04 01:14:45.6982 writeNoBlock: writing a segment of length: 568
2005-05-04 01:14:45.7043 settimer: CODE(0x30b356c), now: 1115169285.70435, time:
 1115169285.71231
2005-05-04 01:14:45.7059 firing timer 0.252752065658569 late.
Wide character in send at /PerlApp/IO/Socket.pm line 218.
2005-05-04 01:14:45.7269 Got to the END.
2005-05-04 01:14:45.7279 Got sigint.
2005-05-04 01:14:45.7286 SlimServer cleaning up.
Comment 8 KDF 2005-05-04 11:57:18 UTC
*** Bug 1491 has been marked as a duplicate of this bug. ***
Comment 9 Nalle Johansson 2005-05-12 12:50:02 UTC
Cant someone do a crashfix in a ugly way?
I cant use my system at all now. about 2-3 min uptime before restart the server 
and then a downtime for at least 2 min.

Is there any other server that can be used with my slimdevices? Or should I 
just put them in the trashcan?

Nalle
Comment 10 Dan Sully 2005-05-12 13:33:07 UTC
Nalle - is there a particular file or stream that you can reproduce this with?

If so, can you add an attachment to this bug?

Thanks.
Comment 11 Nalle Johansson 2005-05-12 13:35:32 UTC
No it alwayd crash the server after a few minutes. 
I tryed to log everything but cant se what goes wrong.

It crashes while not playing music to. But it takes longer time.

Nalle
Comment 12 Dan Sully 2005-05-12 13:37:20 UTC
Ok - could you attach your slimserver.pref / slimserver.conf file?
Comment 13 Nalle Johansson 2005-05-12 13:41:07 UTC
Created attachment 516 [details]
My configurationfile

Here is my configuration file
Comment 14 Nalle Johansson 2005-05-12 14:44:17 UTC
Same with all players in "off". "Wide Char" and the server dies
Comment 15 Nalle Johansson 2005-05-16 05:39:49 UTC
A new thing:
I have a batfile that writes date and time to a textfile every thime slim.exe 
restart and I can now see that it normaly dies at exactly 5 minutes of uptime.
The players can all be placed if stop-mode while this is happening.

I dont know if this is any help but that is the only thing I can see.

Comment 16 Michael Herger 2005-05-17 08:53:56 UTC
Nalle, have you ever tried reinstalling slimserver from scratch? Remove slimserver, remove (rename) 
everything slimserver related (slimserver.prefs, slimserversql.db, slimserver*), reinstall slimserver. Does it 
still crash?

In the duplicate bug 1491 Kevin asked you to unplug all devices and enable them one after another to 
see if it's only one device which is causing the problem. Did you try this?
Comment 17 Nalle Johansson 2005-05-17 12:50:11 UTC
asked you to unplug all devices and enable them one after another to 
see if it's only one device which is causing the problem. Did you try this?

Yes. With all players offline - the server was crashing.

I reinstalled everything once and I then copied my database and settingsfiles 
to the new installation and the same problem was there.

At the moment I have removed everything that was part of slimserver and the 
server is now rescanning my music. 50 K songs will take a while. 
Comment 18 KDF 2005-05-17 14:18:02 UTC
this is very clearly a unicode issue.  an itunes playlist with the funky
apostrophe (another bug that I can't be bothered to search for again) causes a
'wide character' warning when I try to print the title during a debug.  I expect
you have a few tracks, or rss feed info that causes an improperly handled
unicode chracter to be sent to the player.  

If you've eliminated rss as the cause, try using only a portion of your library.
 That is probably easier than changing the locale of your PC. the example you
posted in comment 6, should any of that have had any accents in the characters?
Comment 19 KDF 2005-05-17 14:34:04 UTC
I have no idea how to deal with this, but hunting in the code maybe I can
eliminate some possible sources of this. 

Are you using xPL or CLI?
what do you see in the log for d_protocol d_cli?

the crash in Socket.pm at line 218 occurs in the send() routine, which seems to
be only used from CLI.pm, xPL.pm and Discovery.pm and SLIMP3.pm.  So, its
crashing using CLI, xPL, server saying hello, when a player is trying to find
the server or a text or controls sent to slimp3 (and I can't seem to find the
response to comment 2 regarding large text on slimp3)
Comment 20 Nalle Johansson 2005-05-17 14:41:34 UTC
no accents in the characters in comments 6...

It must be one or many songs in my database that is bad in some way. I have 
just reinstalled everything and now rescanning the library. (have been dooing 
that for 3 hours now, but the server has not crashed yet...)
Comment 21 Nalle Johansson 2005-05-17 14:45:58 UTC
Im running slim.exe in a cmd-window and use the CLI to change playlists.
Every plugin and menyoption except browse playlist has been turned off.

But now its running - but hasn�t scan all my library yet - maybe it stops when 
is see a song with anything wierd in the tags?

Nalle
Comment 22 Michael Herger 2005-05-17 15:11:37 UTC
Kevin, might there be a problem when the CLI is calling a player with some special character in its 
name? There are at least two of them: 

f9:6b:35:66:24:50-playername = GG39 Reception, v�
2a:f9:16:97:07:45-playername = KT11 Gymreception H�ger, Biceps
00:04:20:05:54:5a-playername = KT11 Telefonv�xeln, Calcaneus

Nalle, could you send part of the script that's access the server using the CLI? I'd like to test this on my 
machine, I have umlauts in my player's names, but no script to test. 
Comment 23 Nalle Johansson 2005-05-18 08:54:09 UTC
For now my system is stable and no players or any settings have swedish chars 
(���) and the system has now been up for 6-7 hours.

Comment 24 Chris Owens 2008-03-11 11:28:11 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!