PDA

View Full Version : Two buglets with uninitialized variables..



Carel Bast
2003-11-23, 07:44
Hi Slim Developers,

I found two little bugs in SlimServer Version 5.0.1:

1) After restarting the slimserver (without touching the SLIMP3's remote), I
get an error message like this approx. every second:

Use of uninitialized value in numeric eq (==) at Slim/Buttons/Playlist.pm
line 190.

Seems that Slim::Player::Source::currentSongIndex($client))) is not
initialized at that time.


2) The first time I start the web interface (usinf FishBone), I the
following error:

Use of uninitialized value in numeric eq (==) at Slim/Player/Source.pm line
135.

Here $client->mp3filehandleIsSocket is not initialized.

The error will return every 30 seconds until I start playing a song via the
webinterface (and stop it again).

Is the correct place to initialize these variables in "sub new" in
Client.pm?

Cheers,

-- Carel

dean
2003-11-23, 09:08
The second one is fixed in the latest nightly build.

The first one, I can't reproduce. Can you do it reliably?

On Nov 23, 2003, at 6:44 AM, Carel Bast wrote:

> Hi Slim Developers,
>
> I found two little bugs in SlimServer Version 5.0.1:
>
> 1) After restarting the slimserver (without touching the SLIMP3's
> remote), I
> get an error message like this approx. every second:
>
> Use of uninitialized value in numeric eq (==) at
> Slim/Buttons/Playlist.pm
> line 190.
>
> Seems that Slim::Player::Source::currentSongIndex($client))) is not
> initialized at that time.
>
>
> 2) The first time I start the web interface (usinf FishBone), I the
> following error:
>
> Use of uninitialized value in numeric eq (==) at Slim/Player/Source.pm
> line
> 135.
>
> Here $client->mp3filehandleIsSocket is not initialized.
>
> The error will return every 30 seconds until I start playing a song
> via the
> webinterface (and stop it again).
>
> Is the correct place to initialize these variables in "sub new" in
> Client.pm?
>
> Cheers,
>
> -- Carel
>
>

Kevin Deane-Freeman
2003-11-23, 13:00
Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:

> The second one is fixed in the latest nightly build.

I still see this with a cvs update.

> The first one, I can't reproduce. Can you do it reliably?

can't reproduce this one either with the latest cvs.

-kdf


> On Nov 23, 2003, at 6:44 AM, Carel Bast wrote:
>
> > Hi Slim Developers,
> >
> > I found two little bugs in SlimServer Version 5.0.1:
> >
> > 1) After restarting the slimserver (without touching the SLIMP3's
> > remote), I
> > get an error message like this approx. every second:
> >
> > Use of uninitialized value in numeric eq (==) at
> > Slim/Buttons/Playlist.pm
> > line 190.
> >
> > Seems that Slim::Player::Source::currentSongIndex($client))) is not
> > initialized at that time.
> >
> >
> > 2) The first time I start the web interface (usinf FishBone), I the
> > following error:
> >
> > Use of uninitialized value in numeric eq (==) at Slim/Player/Source.pm
> > line
> > 135.
> >
> > Here $client->mp3filehandleIsSocket is not initialized.
> >
> > The error will return every 30 seconds until I start playing a song
> > via the
> > webinterface (and stop it again).
> >
> > Is the correct place to initialize these variables in "sub new" in
> > Client.pm?
> >

dean
2003-11-23, 13:12
On Nov 23, 2003, at 12:00 PM, Kevin Deane-Freeman wrote:

> Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:
>
>> The second one is fixed in the latest nightly build.
>
> I still see this with a cvs update.
How?


>> The first one, I can't reproduce. Can you do it reliably?
>
> can't reproduce this one either with the latest cvs.
Ok....


>
> -kdf
>
>
>> On Nov 23, 2003, at 6:44 AM, Carel Bast wrote:
>>
>>> Hi Slim Developers,
>>>
>>> I found two little bugs in SlimServer Version 5.0.1:
>>>
>>> 1) After restarting the slimserver (without touching the SLIMP3's
>>> remote), I
>>> get an error message like this approx. every second:
>>>
>>> Use of uninitialized value in numeric eq (==) at
>>> Slim/Buttons/Playlist.pm
>>> line 190.
>>>
>>> Seems that Slim::Player::Source::currentSongIndex($client))) is not
>>> initialized at that time.
>>>
>>>
>>> 2) The first time I start the web interface (usinf FishBone), I the
>>> following error:
>>>
>>> Use of uninitialized value in numeric eq (==) at
>>> Slim/Player/Source.pm
>>> line
>>> 135.
>>>
>>> Here $client->mp3filehandleIsSocket is not initialized.
>>>
>>> The error will return every 30 seconds until I start playing a song
>>> via the
>>> webinterface (and stop it again).
>>>
>>> Is the correct place to initialize these variables in "sub new" in
>>> Client.pm?
>>>
>
>

Kevin Deane-Freeman
2003-11-23, 13:21
Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:

>
> On Nov 23, 2003, at 12:00 PM, Kevin Deane-Freeman wrote:
>
> > Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:
> >
> >> The second one is fixed in the latest nightly build.
> >
> > I still see this with a cvs update.
> How?
Fishbone skin, 3 players with playlists (one is streams only). Stop server, do
cvs update, start server....wait, or manually refresh the browser. The skins
progress bar makes a call to SongTime.

> >>> 2) The first time I start the web interface (usinf FishBone), I the
> >>> following error:
> >>>
> >>> Use of uninitialized value in numeric eq (==) at
> >>> Slim/Player/Source.pm
> >>> line
> >>> 135.
> >>>
> >>> Here $client->mp3filehandleIsSocket is not initialized.
> >>>
> >>> The error will return every 30 seconds until I start playing a song
> >>> via the
> >>> webinterface (and stop it again).
> >>>
> >>> Is the correct place to initialize these variables in "sub new" in
> >>> Client.pm?
> >>>

Richard Purdie
2003-11-24, 15:28
> 1) After restarting the slimserver (without touching the SLIMP3's remote),
I
> get an error message like this approx. every second:
>
> Use of uninitialized value in numeric eq (==) at Slim/Buttons/Playlist.pm
> line 190.
>
> Seems that Slim::Player::Source::currentSongIndex($client))) is not
> initialized at that time.

I've just updated to SlimServer_v2003-11-24.tar.gz and I'm seeing the above
error. It only occurs when the "Now Playing" screen is shown on the player
(which the player switches to after inactivity but it occurs if I manually
go there as well).

(As an aside, the remote was also dead. It took a few minutes to realise my
firmware was way out of date! A warning on the web interface about out of
date firmware may be a good idea!).

RP

Richard Purdie
2003-11-25, 04:10
> > Use of uninitialized value in numeric eq (==) at
Slim/Buttons/Playlist.pm
> > line 190.
>
> I've just updated to SlimServer_v2003-11-24.tar.gz and I'm seeing the
above
> error. It only occurs when the "Now Playing" screen is shown on the player
> (which the player switches to after inactivity but it occurs if I manually
> go there as well).

I've narrowed this problem down a bit further. It's
browseplaylistindex($client) that is undefined.

It appears that browseplaylistindex in $client->modeParameterStack isn't set
upon player startup after a crash with a saved backup playlist until you
actually browse the playlist.

To replicate, play some playlist for long enough for it to be saved. Kill
the server. Restart the server. The server will have saved a copy of your
playlist and will reload it. It will not set browseplaylistindex.

When the player goes into "screensaver" mode, even if browseplaylistindex
was set, it somehow gets unset and starts causing problems again. I a few
guesses as to what the player modes do to the modeParameterStack but I'm not
familiar enough with the code to go much further (yet).

Initialising browseplaylistindex to Slim::Player::Source::currentSongIndex
upon startup would probably solve this.

Hope that helps you track it down,

RP