Bugzilla – Bug 3560
Clear and rescan broken
Last modified: 2008-09-15 14:39:24 UTC
Latest nightly (2006-06-15) installed from apt respository Clear library and rescan everything results in the following entry in slimserver.log: 2006-06-15 09:48:24.8371 About to look for files in /usr/sbin/scanner.pl Use of uninitialized value in subroutine entry at /usr/share/perl5/Slim/Utils/Scanner.pm line 104. 2006-06-15 09:48:24.8430 ERROR: scanner - while running txn_commit: [Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/share/perl5/Slim/Utils/Scanner.pm line 104. Web interface then reports "0 albums with 0 songs by 0 artists."
Running the scanner manually with sudo /usr/sbin/scanner --wipe seems to work ok. The problem occurs when rescanning from the web interface.
same error line as in 3494, probably exact same underlying issue.
Not quite the same message: for some reason the debian version isn't finding the library path, but is scanning scanner.pl... which doesn't have any files of course. It should be: About to look for files in /path/to/music not scanner.pl. Oddly, slimserver-scanner is finding the prefs just fine by itself, since it does work from the command line, so without looking, I suspect the invocation of the scanner changed and broke it.
I'm referring to the lines given in the last line of the logs. The number is different, but they are the same line of code, having moved over a few days of changes. I see this too on some startups, restarting then seems to go ok. Running the scanner manually seems to work so it's hard to track down at my end. Debug is a bit hard when running the launched process as there seems to be no way to get those messages to come back to the console. Maybe a logfile option for splitscanner that copies the logfile pref for the main server as it does for prefsfile.
Fixed in change 8046
Thanks Dan, but the problem still persists. The log now reads: 2006-06-19 11:21:36.0903 scanPathOrURL: Finding valid files in: /usr/sbin/scanner.pl 7 Query SELECT me.name, me.value FROM metainformation me WHERE ( name = 'lastRescanTime' ) 2006-06-19 11:21:36.2611 About to look for files in /usr/sbin/scanner.pl 7 Query SELECT me.name, me.value FROM metainformation me WHERE ( ( name = 'lastRescanTime' ) ) It still seems to be looking for music in /usr/sbin/scanner.pl rather than the music directory. Running the scanner manually still works fine.
Here is a correction to Import.pm to make scanning work again. It works for me on ubuntu dapper : sub launchScan { my ($class, $args) = @_; # Pass along the prefs file - might need to do this for other flags, # such as logfile as well. if (defined $::prefsfile && -r $::prefsfile) { $args->{"prefsfile=$::prefsfile"} = 1; } # Add in the various importer flags for my $importer (qw(itunes musicmagic moodlogic)) { if (Slim::Utils::Prefs::get($importer)) { $args->{$importer} = 1; } } my @scanArgs = map { "--$_" } keys %{$args}; my $command = "$Bin/scanner.pl"; # Check for different scanner types. if (Slim::Utils::OSDetect::OS() eq 'win' && -x "$Bin/scanner.exe") { $command = "$Bin/scanner.exe"; } elsif (Slim::Utils::OSDetect::isDebian() && -x '/usr/sbin/slimserver-scanner') { $command = '/usr/sbin/slimserver-scanner'; } # Bug: 3530 - use the same version of perl we were started with. if ($Config{'perlpath'} && -x $Config{'perlpath'}) { unshift @scanArgs, $command; $command = $Config{'perlpath'}; } $class->scanningProcess( Proc::Background->new($command, @scanArgs) ); return 1; }
Thanks Oliver - commited as change 8151