Bugzilla – Bug 9434
Scanner fails to add any tracks to database
Last modified: 2009-07-31 10:29:36 UTC
Created attachment 3953 [details] Log file from scanner showing the error On the 7.2 trunk, the scanner crashes with database errors whenever it runs, with the end result that it fails to add any tracks to the database. See attachment for details - line 129 first shows the null id value. The problem is when a new track is created via Slim::Schema->resultset, the resultant Row object does not get the id column value filled in. All subsequent scanner operations that operate on the track and require the id therefore fail. See Slim/Schema.pm:931 and onwards. This problem does not occur in the 7.2 release, but does in the latest 7.2 trunk. The problem appears to be within the bundled CPAN modules, as switching just the CPAN directory back to the 7.2 tag fixes it. I haven't been able to work out which module is responsible.
Only updates in 7.2 CPAN recently appear to be Log4Perl (change 22935) and Class::C3 (change 22991)
Are you able to reproduce this every time, or only some of the time? The only thing that changed recently related to this was Class::C3 and Class::C3::XS. Try renaming the CPAN/Class/C3/XS.pm file so it won't be able to load, and see if you can still reproduce.
It happens every time. Removing just CPAN/Class/C3/XS.pm has no effect. As the changes since the 7.2 tag added the whole CPAN/Class/C3 directory and modified CPAN/Class/C3.pm, I removed the new C3 directory and restored C3.pm to its 7.2 tag state. This cures the problem. Why is this bug's version now 7.2-new-streaming, by the way?
*** Bug 9442 has been marked as a duplicate of this bug. ***
bug 9442 was marked a dupe of this, but it seems from the log that bug 9424 is almost exactly like bug 9442 (content_type reference at Schema.pm line 1155). This bug is something different. If the specific CPAN changes noted don't directly match up, it could have been coincidence that the whole CPAN copy seemed to fix it. Perhaps revert through svn and see if you can narrow down a block of changes that may be at fault.
It's just the changes that were made to C3 since 7.2 was released.
Andy suggests that you're the right person to look at this, Brandon.
*** Bug 9424 has been marked as a duplicate of this bug. ***
*** Bug 9504 has been marked as a duplicate of this bug. ***
Is this a problem that C3 is having with Perl 5.10? I'm not seeing this with Perl 5.8.8.
I am reasonably sure, but not certain, that I have also hit this with perl 5.8.8. The only place that I can reproduce it consistently, however, is with perl 5.10.
I'm running 5.10.
I'm running Perl 5.8.8 and could reproduce the bug 9424 (which was merged to this bug) consistently. However, now that I removed all playlist files and reorganised the music files, the bug does not occur anymore.
With my systems with the latest svn: Perl 5.10 : can't scan ever, no matter what content is in the music library. Even with no playlists and only a couple of super-easy-to-digest flac files, nothing gets scanned at all. Perl 5.8.8 : never has a problem scanning. The C3 code isn't a problem. Is this because the offending section of code is 5.10 only and so doesn't get called?
I'm running squeezecenter 7.2.1~23223 and seem to be getting similar errors in /var/log/squeezecenter/scanner.log: [08-09-20 15:36:03.7645] Slim::Schema::newTrack (939) Warning: Use of uninitialized value in sprintf at /usr/share/perl5/Slim/Schema.pm line 940. [08-09-20 15:36:03.7930] Slim::Schema::Storage::throw_exception (70) Error: Error executing 'INSERT INTO genre_track (genre, track) VALUES (?, ?)': DBD::mysql::st execute failed: Column 'track' cannot be null at /usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 771. [08-09-20 15:36:03.7939] Slim::Schema::Storage::throw_exception (70) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/usr/share/perl5/Slim/Schema/Storage.pm line 70) frame 1: Slim::Schema::Storage::throw_exception (/usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 773) frame 2: DBIx::Class::Storage::DBI::_execute (/usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 788) frame 3: DBIx::Class::Storage::DBI::insert (/usr/share/squeezecenter/CPAN/DBIx/Class/Row.pm line 75) frame 4: DBIx::Class::Row::insert (/usr/share/squeezecenter/CPAN/DBIx/Class/ResultSet.pm line 1335) <SNIP? -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (400, 'testing'), (300, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages squeezecenter depends on: ii adduser 3.110 add and remove users and groups ii flac 1.2.1-1.2 Free Lossless Audio Codec - comman ii libmysqlclient15-dev 5.0.51a-12 MySQL database development files ii mysql-client-5.0 5.0.51a-12 MySQL database client binaries ii mysql-server-5.0 5.0.51a-12 MySQL database server binaries ii perl 5.10.0-13 Larry Wall's Practical Extraction ii sox 14.0.1-2+b1 Swiss army knife of sound processi
Created attachment 4077 [details] Scanner log with error results while trying to do a rescan
This is also a bug in the 7.3 trunk. Occurs during rescans or Browse Music Folder (which makes that process unpredictable as well.)
I can confirm getting rid of Class/C3/ and reverting Class/C3.pm to the one from r22982 fixes it for me. Not sure if it helps though...
For anyone else experiencing this and wants a quick fix to get working, installing squeezecenter in an etch chroot with debootstrap worked for me.
Thomas: which version of perl do you have there?
The main system is running Debian lenny, so is perl 5.10.0-14 and does not work. The working chroot is running Debian etch, so is perl 5.8.8-7etch3.
Andy to revert the change
Fixed in 7.2.1 change 23442, reverted Class::C3 to previous version.
Is this being reverted on the 7.3 trunk as well?
Yes, it was already merged.
*** Bug 9658 has been marked as a duplicate of this bug. ***
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC