Bug 11630 - SC v7.3.3 r25766 use of uninitialized in scanner
: SC v7.3.3 r25766 use of uninitialized in scanner
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.3.3
: PC Other
: -- normal (vote)
: 7.4.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-03 09:24 UTC by Jan Pfeifer
Modified: 2009-07-06 05:40 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pfeifer 2009-04-03 09:24:49 UTC
My server is a Ubuntu 8.04 .

There are several occurrences. The most common (repeated thousands of times) is:

"
Use of uninitialized value $disc in string eq at /usr/share/perl5/Slim/Schema.pm line 2336.
"

I also see many of these:

"
substr outside of string at /usr/share/squeezecenter/lib/MP3/Info.pm line 2244, <$fh> line 1.
Use of uninitialized value in string eq at /usr/share/squeezecenter/lib/MP3/Info.pm line 2244, <$fh> line 1.
"

thx
- jan
Comment 1 Michael Herger 2009-04-06 02:28:58 UTC
You could give this simple patch a try to fix issue 1:

Index: Schema.pm
===================================================================
--- Schema.pm	(revision 25820)
+++ Schema.pm	(working copy)
@@ -2338,7 +2338,7 @@
 			$t->get('album') &&
 			blessed($a = $t->album) eq 'Slim::Schema::Album' &&
 			$a->get_column('title') eq $album &&
-			(!$checkDisc || ($disc eq ($a->disc || 0)))
+			(!$checkDisc || (defined $disc && $disc eq ($a->disc || 0)))
 
 			) {
 


I'm not sure whether an undefined $disc should be handled the same as $disc==0 or not though.
Comment 2 Jan Pfeifer 2009-04-06 08:10:22 UTC
exactly ... patching is easy, if one knows the intent for the case of $disc undefined.

thanks!
Comment 3 James Richardson 2009-04-06 09:39:51 UTC
Jan: did the patch work for you?  

Please attach 2 sample files that exhibit this issue so we can also verify the fix.
Comment 4 Jan Pfeifer 2009-04-06 11:38:06 UTC
oh, sorry. I updated to r25823, patched, and ran:

# sudo -u squeezecenter squeezecenter-scanner --wipe --rescan --progress
[09-04-06 11:36:00.5858] main::main (122) Starting SqueezeCenter scanner (v7.3.3, r25823, Mon Apr  6 03:07:13 PDT 2009)

and now I'm getting different errors/warnings:

substr outside of string at /usr/share/squeezecenter/lib/MP3/Info.pm line 2183, <$fh> line 1.
substr outside of string at /usr/share/squeezecenter/lib/MP3/Info.pm line 2184, <$fh> line 1.
Use of uninitialized value $lyrics3_end in string eq at /usr/share/squeezecenter/lib/MP3/Info.pm line 2189, <$fh> line 1.
Use of uninitialized value $lyrics3_end in string eq at /usr/share/squeezecenter/lib/MP3/Info.pm line 2189, <$fh> line 1.
substr outside of string at /usr/share/squeezecenter/lib/MP3/Info.pm line 2244, <$fh> line 1.
Use of uninitialized value in string eq at /usr/share/squeezecenter/lib/MP3/Info.pm line 2244, <$fh> line 1.
substr outside of string at /usr/share/squeezecenter/lib/MP3/Info.pm line 2244, <$fh> line 1.
Use of uninitialized value in string eq at /usr/share/squeezecenter/lib/MP3/Info.pm line 2244, <$fh> line 1.

...
Comment 5 Michael Herger 2009-04-08 04:40:00 UTC
Jan - would you mind attaching a sample file? We can't reproduce this here.
Comment 6 Michael Herger 2009-04-08 04:41:11 UTC
One more thing: how did you tag your files? What application have you been
using?
Comment 7 Jan Pfeifer 2009-04-08 09:30:51 UTC
hi Michael, I'm kind of new to squeezebox/center. Which sample file do you suggest that i attach ?

I suppose you want one of the music files that cause the warnings/errors. If that is the case, how can i turn on the logging facilities to list each of the files it is indexing so I can associate the error to some specific file.

I have music files from many different sources -- I started converting to mp3 in the 90's. But as of late mostly I've been using OGG, FLAC -- extracted from CDs and labeled using gnome's SoundJuicer -- and Amazon's MP3 files (don't know what tags them).

When I retag old stuff i use id3v2, usually using the v2 tagging.
Comment 8 Michael Herger 2009-04-08 12:07:58 UTC
Could you please upload a file which causes those messages. Enable debugging all scan* options (Settings/Advanced/Logging) to find out which ones these are.
Comment 9 Michael Herger 2009-06-08 11:19:05 UTC
(In reply to comment #8)
> Could you please upload a file which causes those messages. Enable debugging
> all scan* options (Settings/Advanced/Logging) to find out which ones these are.

Jan?
Comment 10 Michael Herger 2009-07-06 05:40:49 UTC
Feel free to re-open this issue and attach a sample file if you still see this issue with the latest 7.4 builds. Thanks.