Steve Baumgarten;165514 Wrote: 
> Greg, I found a small bug in v0.6.7 (running with the 10/22/06 6.5.1
> nightly). Basically the code dies if at server startup time there's no
> client connected to the server. And when it dies it takes the server
> with it...
> 
> It happens at line 952 in gotStations():
> 
> $client->update();
> 
> The error is:
> 
> Can't call method "update" on an undefined value at C:\Program
> Files\SlimServer\server/Plugins/SiriusRadio/Plugin.pm line 952.
> 
> The problem seems to be that $client isn't defined if there's no
> client...
> 
> I changed it to this:
> 
> ref $client && $client->update();
> 
> and it made things work, though I'm not sure it's the best possible
> solution. More a quick and dirty fix. 
> 
> (I noticed this only because I started playing with a separate copy of
> Slimserver on my laptop, connecting to it with Winamp. After setting up
> the Sirius plugin I noticed that the server would start up and then die
> about 10 seconds later with that error. But if I was able to get Winamp
> to connect to the server just a few seconds before, the server would
> stay running.)
> 
> As always, thanks for all the work you've put in on this plugin and on
> the indispensable SuperDateTime.
> 
> SBB
Hey Steve-

Thanks for the post.  Somewhere in the 41 pages of messages in this
thread this has been brought up before.  You're right in your
debugging.  When I designed the plugin I assumed there'd always be a
client connected.  I think if you start up stream.mp3 (and of course
softsqueeze) before accessing the plugin it'll define a client for you
and prevent the crash.  Your hack may work, but there will probably be
a number of other spots that may crap out the server too (think there
may be some in the web interface stuff) and I'm not sure if it'll
confuse some other logic within the plugin that keeps track of client
state.

-Greg


-- 
GoCubs
------------------------------------------------------------------------
GoCubs's Profile: http://forums.slimdevices.com/member.php?userid=312
View this thread: http://forums.slimdevices.com/showthread.php?t=20621

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to