Bug 18056 - Bug in .../Slim/Display/Lib/TextVFD.pm
: Bug in .../Slim/Display/Lib/TextVFD.pm
Status: UNCONFIRMED
Product: Logitech Media Server
Classification: Unclassified
Component: Debian
: unspecified
: PC Debian Linux
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-18 08:03 UTC by Jörg Sichermann
Modified: 2013-10-22 07:11 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Sichermann 2013-10-18 08:03:58 UTC
LMS Version 7.7.3 -- (not selectable in field above)

I found out an error in sub vfdUpdate inside ../Slim/Display/Lib/TextVFD.pm

There was an multiple access to an undefined object and because of this there were mutiple log entrys in /var/log/squeezeboxserver/server.log (about 3 log entrys per second!!!)

So I figured out that variable $client inside the sub is sometimes undefined. So checking against this solved the problem. 

My sub looks now like ...vvv... and averrything is working fine. :-)

sub vfdUpdate {
        my $client = shift;
        my $line1  = shift;
        my $line2  = shift;

        my %customUsed;
        my %newCustom;
        my $cur = -1;
        my $pos;

        my $displaywidth = 10;

        if (defined $client) {
                if ( defined $client->display ) {
                        $displaywidth = $client->display->displayWidth;
                }
        }
        my $spaces = ' ' x $displaywidth;

        # convert to the VFD char set
        my $lang;
        if (defined $client) {
                $lang = $client->vfdmodel;
        }
        if (!$lang) {
                $lang = 'katakana';
        } else {
                $lang =~ s/[^-]*-(.*)/$1/;
        }

        main::DEBUGLOG && $log->debug("vfdUpdate $lang\nline1: $line1\nline2: $line2\n");

        my $brightness;
        if ( defined $client ) {
                $brightness = $client->brightness();
        } else {
                $brightness = 10;
        }

        if (!defined($line1)) { $line1 = $spaces };
        if (!defined($line2)) { $line2 = $spaces };

        if (defined($brightness) && ($brightness == 0)) {
                $line1 = $spaces;
                $line2 = $spaces;
        }
[... and so on ...]

I don't know how to commit my changes, but probably you know ...
Comment 1 Michael Herger 2013-10-18 21:16:19 UTC
What kind of player are you using?
Comment 2 Jörg Sichermann 2013-10-21 10:20:18 UTC
I use various types of players:
   # Squeezebox Player (most recent version)
   # Squeezebox Radio
   # connections to server via direct streaming using .../stream.mp3
     # sometimes I encrypt these connections using SSH Version 2 tunnelling
     # So here I cannot tell you anything about the "player"
   # most recent version of squeezeslave, sometimes and experimental
   # various products using DLNA-services

Sorry, but I cannot tell you which "player" cause these errors.
In my opinion none should cause multiple errors filling up the error logs quickly.
Comment 3 Michael Herger 2013-10-22 07:11:48 UTC
Out of your player list I must assume that squeezeslave is causing this. It's the only player using (emulating) a text display. You might consider using squeezelite instead.