PDA

View Full Version : More Plugin problems



Daniel Cohen
2004-11-23, 13:02
More about issues with 5.4 (Mac OS 10.3.5)

(1) I'm not sure if this is intentional or a bug. But I am surprised
to find that both Internet Radio and Screensavers appear in two
places in the menu, once at the top-level menu and once inside the
Plugins menu.

(2) The problems with the Song Scanner plugin, and the two modified
versions I made, persist but are not the same as they were. All
worked well under 5.3. After (because of the earlier problems)
removing them from my Plugins folder and then putting them back, they
now appear under their filename, rather than under the name defined
in the file, and they no longer work.
--
Daniel Cohen

kdf
2004-11-23, 13:41
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:

> More about issues with 5.4 (Mac OS 10.3.5)
>
> (1) I'm not sure if this is intentional or a bug. But I am surprised
> to find that both Internet Radio and Screensavers appear in two
> places in the menu, once at the top-level menu and once inside the
> Plugins menu.

Internet Radio, being teh focus of the release of 5.4 does have the internet
radio at teh top level by default. Screensavers shouldn't be unless you've
selected to move them there. The Plugins menu is intended to contain ALL
plugins, which means the submenus will be there as well in order to keep them
organised (for those ppl like me who have upwards of 40 now installed).

>
> (2) The problems with the Song Scanner plugin, and the two modified
> versions I made, persist but are not the same as they were. All
> worked well under 5.3. After (because of the earlier problems)
> removing them from my Plugins folder and then putting them back, they
> now appear under their filename, rather than under the name defined
> in the file, and they no longer work.

--d_plugins, and you will need to do that from the command line so you can see
the startup messages.

-kdf

Daniel Cohen
2004-11-23, 14:37
On 23/11/04 at 12:41 pm -0800, kdf wrote
>
> > (2) The problems with the Song Scanner plugin, and the two modified
>> versions I made, persist but are not the same as they were. All
>> worked well under 5.3. After (because of the earlier problems)
>> removing them from my Plugins folder and then putting them back, they
>> now appear under their filename, rather than under the name defined
>> in the file, and they no longer work.
>
>--d_plugins, and you will need to do that from the command line so you can see
>the startup messages.

This is getting *really* weird. I stopped and restarted SlimServer,
and this time I got two plugins (the third I had disabled), both with
the same name (which they shouldn't have, and did not have under
5.3), and they are working as they are supposed to. There hasn't been
any consistency of behaviour, it seems, just misbehaving in various
ways.

What's the exact syntax for the command line? I take it that the
--d_plugins is a switch.
I am using OS 10.3.5.

I did, for simplicity, and because I need the syntax, switch on the
plugins item in the debugger via the Web interface, and the log showed

2004-11-23 21:13:37.0921 SlimServer setting language...
2004-11-23 21:13:37.0924 SlimServer IR init...
2004-11-23 21:13:37.1937 SlimServer Buttons init...
2004-11-23 21:13:42.1156 SlimServer Graphics init...
2004-11-23 21:14:02.1145 SlimServer starting up...
2004-11-23 21:14:02.1149 SlimServer daemonizing...
2004-11-23 21:14:02.1671 Old SLIMP3 Protocol init...
2004-11-23 21:14:02.2766 Slimproto Init...
2004-11-23 21:14:02.2926 SlimServer Info init...
2004-11-23 21:14:02.4011 SlimServer HTTP init...
2004-11-23 21:14:03.0570 SlimServer CLI init...
2004-11-23 21:14:03.1482 Source conversion init..
2004-11-23 21:14:03.2017 SlimServer Plugins init...
2004-11-23 21:14:03.2739 SlimServer persist playlists...
2004-11-23 21:14:03.2744 SlimServer History load...
2004-11-23 21:14:15.9526 SlimServer Inital Scan init...
2004-11-23 21:14:16.1800 SlimServer done start...

I realise that this may not have shown the problem, since I was not
following your exact instructions.

I tried the telnet localhost 9090 command, as mentioned in the manual, and got

telnet localhost 9090
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.


which leaves me unclear as to whether I was connected on that port or not.

--
Daniel Cohen

kdf
2004-11-23, 14:50
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:

> On 23/11/04 at 12:41 pm -0800, kdf wrote
> >
> > > (2) The problems with the Song Scanner plugin, and the two modified
> >> versions I made, persist but are not the same as they were. All
> >> worked well under 5.3. After (because of the earlier problems)
> >> removing them from my Plugins folder and then putting them back, they
> >> now appear under their filename, rather than under the name defined
> >> in the file, and they no longer work.
> >
> >--d_plugins, and you will need to do that from the command line so you can
> see
> >the startup messages.
>
> This is getting *really* weird. I stopped and restarted SlimServer,
> and this time I got two plugins (the third I had disabled), both with
> the same name (which they shouldn't have, and did not have under
> 5.3), and they are working as they are supposed to. There hasn't been
> any consistency of behaviour, it seems, just misbehaving in various
> ways.
>
> What's the exact syntax for the command line? I take it that the
> --d_plugins is a switch.
> I am using OS 10.3.5.
>
> I did, for simplicity, and because I need the syntax, switch on the
> plugins item in the debugger via the Web interface, and the log showed
>
that log looked like the same output you get on startup with d_server. however,
what you need to do is close the service from teh preferences pane. then you
need to start from a command line, use the terminal (in Utilities)

the command line would be something like:
/Library/SlimDevices/slimserver.pl --d_plugins

sadly, while I do now have a lovely new ibook, I haven't yet ever found the
exact location of the slimserver.pl file. It woudl be nice to have some way of
pre-setting debug options for those certain ones that NEED to be on when the
server starts. That way, they'd be in the log already without having to keep
explaining (and remembering) how command-line works :)

-kdf

Daniel Cohen
2004-11-23, 16:26
On 23/11/04 at 1:50 pm -0800, kdf wrote
>
>sadly, while I do now have a lovely new ibook, I haven't yet ever found the
>exact location of the slimserver.pl file. It woudl be nice to have
>some way of
>pre-setting debug options for those certain ones that NEED to be on when the
>server starts. That way, they'd be in the log already without having to keep
>explaining (and remembering) how command-line works :)

That one I can answer. It's at

~/Library/PreferencePanes/SlimServer.prefPane/Contents/server/slimserver.pl

as I've installed just for the one user.
--
Daniel Cohen

Daniel Cohen
2004-11-24, 00:03
On 23/11/04 at 1:50 pm -0800, kdf wrote
>Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:
>
> > What's the exact syntax for the command line? I take it that the
>> --d_plugins is a switch.
>> I am using OS 10.3.5.
>>
>> I did, for simplicity, and because I need the syntax, switch on the
>> plugins item in the debugger via the Web interface, and the log showed
>>
>that log looked like the same output you get on startup with
>d_server. however,
>what you need to do is close the service from teh preferences pane. then you
>need to start from a command line, use the terminal (in Utilities)
>
>the command line would be something like:
>/Library/SlimDevices/slimserver.pl --d_plugins

Hmm, I think there is something odd with SlimServer 5.4.

Run Slimserver from the System Preferences and I get seven items in
the main menu, the seventh showing no text and not doing anything.

Run Slimserver from the command line and I get seven items in the
main menu, the seventh being AlienBBC with all its submenus (it
doesn't play the BBC, but that's a different matter).

The response to the command line is

Subroutine HTML::Entities::decode_entities redefined at
/System/Library/Perl/5.8.1/darwin-thread-multi-2level/DynaLoader.pm
line 249.


--
Daniel Cohen

kdf
2004-11-24, 00:59
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:


> The response to the command line is
>
> Subroutine HTML::Entities::decode_entities redefined at
> /System/Library/Perl/5.8.1/darwin-thread-multi-2level/DynaLoader.pm
> line 249.

that part is normal, but their should be much more if you use slimserver.pl
--d_plugins. it should show messages for every plugin that its loading.

-kdf

Daniel Cohen
2004-11-26, 08:32
On 23/11/04 at 11:59 pm -0800, kdf wrote
>Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:
>
>
>> The response to the command line is
>>
>> Subroutine HTML::Entities::decode_entities redefined at
>> /System/Library/Perl/5.8.1/darwin-thread-multi-2level/DynaLoader.pm
>> line 249.
>
>that part is normal, but their should be much more if you use slimserver.pl
>--d_plugins. it should show messages for every plugin that its loading.

I'll check further, but I'm virtually certain that it did not show
messages for anything except AlienBBC, and that only appeared when I
actually accessed it, not when it loaded.
--
Daniel Cohen

kdf
2004-11-26, 10:20
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:

> On 23/11/04 at 11:59 pm -0800, kdf wrote
> >Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:
> >
> >
> >> The response to the command line is
> >>
> >> Subroutine HTML::Entities::decode_entities redefined at
> >> /System/Library/Perl/5.8.1/darwin-thread-multi-2level/DynaLoader.pm
> >> line 249.
> >
> >that part is normal, but their should be much more if you use slimserver.pl
> >--d_plugins. it should show messages for every plugin that its loading.
>
> I'll check further, but I'm virtually certain that it did not show
> messages for anything except AlienBBC, and that only appeared when I
> actually accessed it, not when it loaded.

it should look something like this:

D:\slim\server>slimserver.pl --d_plugins
2004-11-26 09:19:04.3906 Requiring Plugins::Sleep plugin.
2004-11-26 09:19:04.4375 Requiring Plugins::Snow plugin.
2004-11-26 09:19:04.5156 Requiring Plugins::Scrobbler plugin.
2004-11-26 09:19:04.7343 hookScrobbler() engaged, SlimScrobbler V0.269
activated.
2004-11-26 09:19:04.7656 Requiring Plugins::DateTime::Plugin plugin.
2004-11-26 09:19:04.7968 Requiring Plugins::Pacman plugin.
2004-11-26 09:19:04.8437 Requiring Plugins::TopHits plugin.
2004-11-26 09:19:04.9062 Requiring Plugins::SysInfo2 plugin.
2004-11-26 09:19:04.9687 Requiring Plugins::PublicRadioFanBrowser plugin.
Subroutine HTML::Entities::decode_entities redefined at
D:/Perl/lib/DynaLoader.pm line 253, <DATA> line 1.
2004-11-26 09:19:05.3437 Requiring Plugins::Calculator plugin.
2004-11-26 09:19:05.6250 Requiring Plugins::Alien::Plugin plugin.


etc etc
-kdf

Daniel Cohen
2004-11-26, 11:03
On 26/11/04 at 9:20 am -0800, kdf wrote
>Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:
>
>> On 23/11/04 at 11:59 pm -0800, kdf wrote
>> >Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:
>> >
>> >
>> >> The response to the command line is
>> >>
>> >> Subroutine HTML::Entities::decode_entities redefined at
>> >> /System/Library/Perl/5.8.1/darwin-thread-multi-2level/DynaLoader.pm
>> >> line 249.
>> >
>> >that part is normal, but their should be much more if you use slimserver.pl
>> >--d_plugins. it should show messages for every plugin that its loading.
>>
>> I'll check further, but I'm virtually certain that it did not show
>> messages for anything except AlienBBC, and that only appeared when I
>> actually accessed it, not when it loaded.
>
>it should look something like this:
>
>D:\slim\server>slimserver.pl --d_plugins
>2004-11-26 09:19:04.3906 Requiring Plugins::Sleep plugin.
>2004-11-26 09:19:04.4375 Requiring Plugins::Snow plugin.


Yes, you're right. I got

2004-11-26 17:52:57.3683 Requiring Plugins::Snow plugin.
2004-11-26 17:52:57.4209 Requiring Plugins::SavePlaylist plugin.
2004-11-26 17:52:57.4357 Requiring Plugins::Alien::Plugin plugin.
Subroutine HTML::Entities::decode_entities redefined at
/System/Library/Perl/5.8.1/darwin-thread-multi-2level/DynaLoader.pm
line 249.
2004-11-26 17:52:57.9296 Requiring Plugins::SlimTris plugin.
2004-11-26 17:52:57.9791 Requiring Plugins::RssNews plugin.
2004-11-26 17:52:58.1503 Requiring Plugins::LineX plugin.
2004-11-26 17:52:58.2007 Requiring Plugins::Scanner plugin.
2004-11-26 17:52:58.2196 Requiring Plugins::Shooter plugin.
2004-11-26 17:52:58.2401 Requiring Plugins::RadioIO plugin.
2004-11-26 17:52:58.3205 Requiring Plugins::ShoutcastBrowser plugin.
2004-11-26 17:52:58.4633 Requiring Plugins::XSync plugin.
2004-11-26 17:52:58.5126 Requiring Plugins::DateTime::Plugin plugin.
2004-11-26 17:52:58.7604 Requiring Plugins::Rescan plugin.
2004-11-26 17:52:58.8432 Requiring Plugins::Scannerfast plugin.
2004-11-26 17:52:58.8691 Requiring Plugins::Picks plugin.
2004-11-26 17:52:58.8939 Requiring Plugins::Live365 plugin.
2004-11-26 17:52:58.9845 Registering screensaver Snow Screensaver
2004-11-26 17:52:58.9886 Registering screensaver RSS News Ticker
2004-11-26 17:52:58.9907 Registering screensaver LineX Screensaver
2004-11-26 17:52:58.9926 Registering screensaver Datetime Screensaver
2004-11-26 17:52:59.0946 Adding SlimTris to menu: GAMES
2004-11-26 17:52:59.0965 Adding RssNews to menu: PLUGINS
2004-11-26 17:52:59.0982 Adding Shooter to menu: GAMES
2004-11-26 17:52:59.1000 Adding RadioIO to menu: RADIO
2004-11-26 17:52:59.1017 Adding ShoutcastBrowser to menu: RADIO
2004-11-26 17:52:59.1034 Adding Picks to menu: RADIO
2004-11-26 17:52:59.1053 Adding Live365 to menu: RADIO
2004-11-26 17:52:59.1077 Registering screensaver Now Playing (Jump
back on wake.)
2004-11-26 17:53:03.1096 RSS Feed Info:
2004-11-26 17:53:03.1116 BBC News World Edition,
http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml
2004-11-26 17:53:03.1131 CNET News.com, http://news.com.com/2547-1_3-0-5.xml
2004-11-26 17:53:03.1145 New York Times Home Page,
http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml
2004-11-26 17:53:03.1161 RollingStone.com Music News,
http://www.rollingstone.com/rssxml/music_news.xml
2004-11-26 17:53:03.1184 Slashdot, http://slashdot.org/index.rss
2004-11-26 17:53:03.1200 Yahoo! News: Business,
http://rss.news.yahoo.com/rss/business
2004-11-26 17:53:03.1215

when I ran slimserver.pl.

But despite the two plugins of Scanner and Scannerfast, when it came
to the Squeezebox's display, though the two related plugins worked as
they should, they both turned up with the same name (which was Song
Scanner Fast, this time).

When I tried to use these plugins, I got

Use of uninitialized value in int at
/Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
Use of uninitialized value in int at
/Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
Use of uninitialized value in int at
/Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
Use of uninitialized value in int at
/Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
(etc)

I noticed here that the time sown was 00:20/0:0, or somethings
similar. definitely the zero time after the / This was on an MP3 file
so its length would be known.

--
Daniel Cohen

kdf
2004-11-26, 11:47
> 2004-11-26 17:53:03.1184 Slashdot, http://slashdot.org/index.rss
> 2004-11-26 17:53:03.1200 Yahoo! News: Business,
> http://rss.news.yahoo.com/rss/business
> 2004-11-26 17:53:03.1215

looks good.

> when I ran slimserver.pl.
>
> But despite the two plugins of Scanner and Scannerfast, when it came
> to the Squeezebox's display, though the two related plugins worked as
> they should, they both turned up with the same name (which was Song
> Scanner Fast, this time).


for your altered plugins...do they use the same unlocalised string values?
tha could lead to plugins of the same displayed name, depending on which was
loaded most recently.

> When I tried to use these plugins, I got
>
> Use of uninitialized value in int at
> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
> Use of uninitialized value in int at
> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
> Use of uninitialized value in int at
> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
> Use of uninitialized value in int at
> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
> (etc)
>
> I noticed here that the time sown was 00:20/0:0, or somethings
> similar. definitely the zero time after the / This was on an MP3 file
> so its length would be known.

maybe, maybe not. you'll have to track back to make sure that the info is
actually making it to the right plugin. also, how are you accessign the
plugin? Do you have a currently playing song? do you have a playlist loaded
that you've been browsing or have you just powered on?

-kdf

Daniel Cohen
2004-11-26, 13:14
On 26/11/04 at 10:47 am -0800, kdf wrote
>
>
>
>for your altered plugins...do they use the same unlocalised string values?


Sorry, I don't know what you mean. Here is the first part of one plugin.

package Plugins::Scanner;

# $Id: Scanner.pm,v 1.3 2004/08/28 00:01:35 fishbone Exp $
# by Kevin Deane-Freeman August 2004

# This code is derived from code with the following copyright message:
#
# SliMP3 Server Copyright (C) 2001 Sean Adams, Slim Devices Inc.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
use strict;

###########################################
### Section 1. Change these as required ###
###########################################

use Slim::Control::Command;
use Slim::Utils::Strings qw (string);
use File::Spec::Functions qw(:ALL);

use vars qw($VERSION);
$VERSION = substr(q$Revision: 1.3 $,10);

my $offset=0;

sub getDisplayName() {return string('PLUGIN_SCANNER');}

sub strings() { return '
PLUGIN_SCANNER
EN Song Scanner


while here is the first part of the other

package Plugins::Scannerfast;

# $Id: Scanner.pm,v 1.3 2004/08/28 00:01:35 fishbone Exp $
# by Kevin Deane-Freeman August 2004

# This code is derived from code with the following copyright message:
#
# SliMP3 Server Copyright (C) 2001 Sean Adams, Slim Devices Inc.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
use strict;

###########################################
### Section 1. Change these as required ###
###########################################

use Slim::Control::Command;
use Slim::Utils::Strings qw (string);
use File::Spec::Functions qw(:ALL);

use vars qw($VERSION);
$VERSION = substr(q$Revision: 1.3 $,10);

my $offset=0;

sub getDisplayName() {return string('PLUGIN_SCANNER');}

sub strings() { return '
PLUGIN_SCANNER
EN Song Scanner fast





>tha could lead to plugins of the same displayed name, depending on which was
>loaded most recently.


As noted, this problem did not occur with 5.3, which should help in
tracking it down.

>
>> When I tried to use these plugins, I got
>>
>> Use of uninitialized value in int at
>> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
>> Use of uninitialized value in int at
>> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
>> Use of uninitialized value in int at
>> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
>> Use of uninitialized value in int at
>> /Users/danco/Library/SlimDevices/Plugins/Scannerfast.pm line 50.
>> (etc)
>>
>> I noticed here that the time sown was 00:20/0:0, or somethings
>> similar. definitely the zero time after the / This was on an MP3 file
>> so its length would be known.
>
>maybe, maybe not. you'll have to track back to make sure that the info is
>actually making it to the right plugin. also, how are you accessign the
>plugin? Do you have a currently playing song? do you have a playlist loaded
>that you've been browsing or have you just powered on?

This was with a currently playing song, I thought. Though, come to
consider it further, I may only have selected the song and not
started playing it.
--
Daniel Cohen

kdf
2004-11-26, 15:55
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:


> sub strings() { return '
> PLUGIN_SCANNER
> EN Song Scanner

This bit. In order to have the display name properly change accoding to the
language selection, it has to be a live function. This means that the
PLUGIN_SCANNER part has to be unique, or other versions will override previous
ones.


>
> package Plugins::Scannerfast;
>

> sub strings() { return '
> PLUGIN_SCANNER
> EN Song Scanner fast

so when this second one gets loaded, this string is replaced.

>
> >tha could lead to plugins of the same displayed name, depending on which was
> >loaded most recently.
>
>
> As noted, this problem did not occur with 5.3, which should help in
> tracking it down.

That's right, it didn't. It was all part of tehmenu rework that is new to 5.4.
It was also a bug report that was easily fixed as I tried to make the menuing
compliant with language changes.


> >maybe, maybe not. you'll have to track back to make sure that the info is
> >actually making it to the right plugin. also, how are you accessign the
> >plugin? Do you have a currently playing song? do you have a playlist loaded
> >that you've been browsing or have you just powered on?
>
> This was with a currently playing song, I thought. Though, come to
> consider it further, I may only have selected the song and not
> started playing it.

ok, if I can find some time, I'll play around with the original one and see if I
can find a case wehre this fails. I thought I had done enough checks to
prevent entering the mode with undefined values. Any chance you've modified
from an older version?

-kdf

Daniel Cohen
2004-11-27, 02:01
On 26/11/04 at 2:55 pm -0800, kdf wrote
>Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:
>
>
>> sub strings() { return '
>> PLUGIN_SCANNER
>> EN Song Scanner
>
>This bit. In order to have the display name properly change accoding to the
>language selection, it has to be a live function. This means that the
>PLUGIN_SCANNER part has to be unique, or other versions will override previous
>ones.
>
>
>>
>> package Plugins::Scannerfast;
> >
>
>> sub strings() { return '
>> PLUGIN_SCANNER
>> EN Song Scanner fast
>
>so when this second one gets loaded, this string is replaced.
>
>>
>> >tha could lead to plugins of the same displayed name, depending
>>on which was
>> >loaded most recently.
>>
>>
>> As noted, this problem did not occur with 5.3, which should help in
>> tracking it down.
>
>That's right, it didn't. It was all part of tehmenu rework that is
>new to 5.4.
>It was also a bug report that was easily fixed as I tried to make the menuing
>compliant with language changes.

Thanks. That explains it. I took one of the two files, and changed
all the mentions (three of them, I think) of SONG_SCANNER into
mentions of SONG_SCANNER2, and on a quick check it now seems to be
working as I want it.

As for the other problem of the time showing as 0:0, this was
probably a silly error on my part. I'll check further.
--
Daniel Cohen