Bug 5179 - SlimServer crashes on startup on Chinese/Japanese Windows
: SlimServer crashes on startup on Chinese/Japanese Windows
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Windows Service
: 6.5.3
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-23 05:54 UTC by Michael Herger
Modified: 2008-12-15 11:58 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
test executable to crash perl (PDK7 build) (1.07 MB, application/octet-stream)
2007-07-25 12:58 UTC, Michael Herger
Details
Fix for the crasher (625 bytes, patch)
2007-07-26 15:02 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2007-07-23 05:54:35 UTC
There are two threads now which lead to the conclusion that we've got a problem with Chinese/Japanese setups on Windows:

http://forums.slimdevices.com/showthread.php?t=36958
http://forums.slimdevices.com/showthread.php?t=36923

Startup fails with the following lines:

Unknown encoding: cp936 at /<C:\Program Files\SlimServer\server\slim.exe>Encode/Guess.pm line 44.
BEGIN failed--compilation aborted at /<C:\Program Files\SlimServer\server\slim.exe>Slim/Formats.pm line 15.
BEGIN failed--compilation aborted at /<C:\Program Files\SlimServer\server\slim.exe>Slim/Music/Info.pm line 28.
BEGIN failed--compilation aborted at slimserver.pl line 113.
Undefined subroutine &main::main called at slimserver.pl line 58.

Where the codepage reference can vary. There's been cp930, too.

This is on systems where 6.5.2 would work perfectly fine. Probably moving from PDK6 to PDK7 wasn't a good choice.

Hey, Mickey, could you set up a Chinese Windows to test with?
Comment 1 Michael Herger 2007-07-23 06:08:35 UTC
cp950 this was, not 930
Comment 2 Chris Owens 2007-07-23 20:07:57 UTC
Ross and Steven and Wallace, do any of you have a Chinese windows image handy?  If not, do you still have the MSDN download info to create one?
Comment 3 Wallace Lai 2007-07-24 08:57:33 UTC
Hi, Chris,

I have a Chinese XP CD at home.  I do not have the Japanese one.

Let's download them.

I am emailing you about the MSDN account info.

Thanks
Wallace
Comment 4 Wallace Lai 2007-07-24 09:10:09 UTC
Is it traditional Chinese or Simplified Chinese?  Is it real double byte OSes or English XP with double byte support?

If it is failing on both Chinese and Japanese, it could be an issue for double byte XP.  It may be a good idea to check Korean too, if it is supported by SlimServer.

Comment 5 Mickey Gee 2007-07-24 12:36:00 UTC
According to this Microsoft web page,

http://www.microsoft.com/globaldev/reference/oslocversion.mspx

here's the breakdown of code pages for Japanese and Chinese Windows:

Chinese Windows XP (Taiwan & Traditional) / Vista (Taiwan & Hong Kong SAR): code page 950
Chinese Windows XP (Simplified)/ Vista (PRC): code page 936
Japanese Windows XP / Vista: code page 932

The guys reporting bugs didn't say Korean, which code page 949.

The easy assumption is that all of these currently don't work, and any fix could possibly fix all of them.

I would suggest testing all of them whenever any fix is created.
Comment 6 Mickey Gee 2007-07-24 12:38:59 UTC
Since the original bug had a code page 950 and 932 issues, we can assume the users were some version of Chinese Windows with traditional character set and Japanese Windows.
Comment 7 Spies Steven 2007-07-24 14:20:52 UTC
I just finished downloading and installing SS 6.5.3 on Traditional Chinese Windows XP SP2 and I get the same "Unknown encoding: cp950" error.

Is this possibly the result of updating ActiveState on the build machine?  Any other ideas?
Comment 8 Michael Herger 2007-07-24 14:30:32 UTC
I fear so, because I couldn't find any change in the relevant parts of the server. I asked about it in the ActiveState forums, but didn't get an answer so far. Do we have some support plan with them?
Comment 9 Michael Herger 2007-07-24 14:31:12 UTC
Somebody (Dean, Andy?) could probably try to build a version with the PDK6 to doublecheck.
Comment 10 Spies Steven 2007-07-24 16:20:18 UTC
I just finished installing SVN on Traditional Chinese Windows XP SP2 using the instructions on the Wiki and it seems to run just fine.  Sounds like the new build code may in fact be the problem.

SlimServer Version: 6.5.4 - TRUNK - Windows XP - EN - cp950
Server IP address: 10.0.3.20
Perl Version: 5.8.8 MSWin32-x86-multi-thread
MySQL Version: 5.0.22-community-nt 
Comment 11 Michael Herger 2007-07-25 12:19:23 UTC
I've got a first feedback from ActiveState's support. They're asking for a minimalistic program to reproduce the case. To whom could I send an executable to test on that chinese/japanes system? Or could the VM be made available for download somewhere so I could run the tests over here?
Comment 12 Mickey Gee 2007-07-25 12:27:51 UTC
Michael: I'll see if one of the guys here can help you with getting you access to Chinese or Japanese Windows in one form or another. Of course, don't you have MSDN access by now? If so, you can download that stuff, too.

You are familiar with one of those languages, aren't you? 8^)

Comment 13 Michael Herger 2007-07-25 12:33:44 UTC
Dean has ordered MSDN, but I haven't the details yet. And now that I'm fluent in Hebrew, it will be easy to learn Chinese ;-).

BTW: VMware Fusion (Mac) does a great job installing Windows without user input. This should allow me to install without knowing "Regional settings" in Chinese (that's _not_ in lesson one of "Chinese for Dummies").
Comment 14 Michael Herger 2007-07-25 12:58:55 UTC
Created attachment 2072 [details]
test executable to crash perl (PDK7  build)

Do you see the "Hooray" message when running this mini application on your Chinese system in a command window or does it crash?
Comment 15 Spies Steven 2007-07-25 13:54:32 UTC
I see "Hoooray! I survived!" when I run crasher both with and without ActiveState perl installed on Traditional Chinese
Windows.  What does it mean?
Comment 16 Michael Herger 2007-07-25 14:16:36 UTC
That means that my test case was too simple :-(. Thanks. I'm downloading a chinese copy of Windows right now, so I can test myself.
Comment 17 Michael Herger 2007-07-26 10:53:42 UTC
What a shame: I didn't read the release notes carefully enough. Our crasher is closely related to the smaller executable files. PDK7 simply doesn't bundle the necessary files any more to gain some memory. Here's the answer from Activestate's support (which was very responsive, btw):

PDK 7 no longer bundles Encode::CN, Encode::JP, Encode::KR or Encode::TW by
default every time it sees that Encode is being used.  This saves over 2MB
in the generated executable.
 
You can explicitly add them with either --add Encode::CN etc, or add some
block to the program like this:
 
    if (0) { # Tell PerlApp to bundle these modules
        require Encode::CN;
        require Encode::JP;
        # ...
    }

-------------

If nobody has done it when I'm back, I'll give it a try later tonight. Adding the necessary modules should be pretty straight forward.
Comment 18 Michael Herger 2007-07-26 15:02:45 UTC
Created attachment 2073 [details]
Fix for the crasher

This patch against 6.5.x branch should fix the crasher (it did on my machine).
Comment 19 Spies Steven 2007-07-26 15:10:59 UTC
Michael, will this change make it into the nightly?
Comment 20 Michael Herger 2007-07-26 15:27:42 UTC
I've checked it in to 6.5.x (12428) and trunk (12429). It will be in tomorrow's build. Let's give it some exposure. I'll ask the guys in the thread to update their installation and give feedback.
Comment 21 Michael Herger 2007-07-27 04:17:36 UTC
Installed last night's build and it's running successfully on my Chinese system. Please reopen if there are any further problems with this issue.
Comment 22 Spies Steven 2007-07-27 11:44:21 UTC
Works for me too, thanks!
Comment 23 James Richardson 2008-12-15 11:58:17 UTC
This bug has been fixed in the latest release of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.