Bug 4007 - Crash on Windows XP with -d_sql and running as a service
: Crash on Windows XP with -d_sql and running as a service
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Windows Service
: 6.5b1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-27 09:33 UTC by Stuart Hickinbottom
Modified: 2006-08-29 14:11 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Hickinbottom 2006-08-27 09:33:00 UTC
I've been helping Graham debug an issue that looked like it was due to the Lazy Search plugin - see the following threads:

http://forums.slimdevices.com/showthread.php?t=26539
http://forums.slimdevices.com/showthread.php?t=26648

After having looked at this myself I think there's actually a problem when running as a service on Windows XP.

I'm running the r9173 nightly, and whenever I turn on d_sql through the web interface the server crashes shortly after (eg while playing or when trying to use the web interface - it never seemed to live more than a few seconds after turning on that debug flag).

Looking in the Windows 'application' event log the last event that appeared was as follows:

Can't call method "print" on an undefined value at C:\Program Files\SlimServer\server\CPAN/DBIx/Class/Storage/Statistics.pm line 96.

Both the slim.exe and mysqld.exe processes then exit.

This happens for me when running no plugins apart from those included in the standard distribution. Graham has reported the same behaviour on his system.

The odd thing is, when I start slimserver from a console window with "slim -d_sql" it doesn't crash and correct dumps out the SQL that's being executed.

I've tried turning on other debug flags (such as d_http, d_formats, d_info and d_server), and don't seem to ever get any events at all in the application event log, so perhaps that's a clue.

I don't normally run it on Windows (I only installed it to help debug Graham's problem), so I'm not sure how long this behaviour may have been present.

I believe there's definitely a problem here, and it might be the root cause of the problems Graham reported in those other threads.

If you want me to perform any other investigations just let me know.
Comment 1 Chris Owens 2006-08-28 10:20:45 UTC
Ross could you have a look at reproducing this, please?
Comment 2 Ross Levine 2006-08-28 13:01:51 UTC
No problems reproducing this bug, enable d_sql from web interface and SlimServer crashes immediatly. Here is the output from Event Viewer:

Error:
The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Can't call method "print" on an undefined value at C:\Program Files\SlimServer\server\CPAN/DBIx/Class/Storage/Statistics.pm line 96.

Information:
C:\PROGRA~1\SLIMSE~1\server\Bin\MSWIN3~1\mysqld.exe: Normal shutdown
Information:
C:\PROGRA~1\SLIMSE~1\server\Bin\MSWIN3~1\mysqld.exe: Shutdown complete

SlimServer Version: 7.0a1 - 9192 - Windows XP - EN - cp1252
Comment 3 Jim McAtee 2006-08-29 11:15:22 UTC
I saw something very similar recently running the Perl version.  With both --d_sql and --d_mysql designated, SlimServer when run as a service crashes on start up with nothing logged to SlimServer's logs and a meaningless error in the Windwos event logs .  But I can run SlimServer with the same combo of switches if launched from the console.  I can also run the service with one or the other of the two switches.
Comment 4 Dan Sully 2006-08-29 14:11:47 UTC
Fixed in change 9261