Bugzilla – Bug 2821
SVN 5516 & mysql causes crash on scanning
Last modified: 2008-09-15 14:39:24 UTC
When using MySQL, I get the following crash when I start a scan. The crash occurs on the first track in my library: 2006-01-14 22:21:03.0302 directory entry: file:///L:/Music/Charvie/Alanis%20Mor issette/Jagged%20Little%20Pill/01%20All%20I%20Really%20Want.mp3 2006-01-14 22:21:03.3345 DBD::mysql::st execute failed: Incorrect integer value: '' for column 'discc' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/D ataStores/DBI/DataModel.pm line 956. Can't update Jagged Little Pill: DBD::mysql::st execute failed: Incorrect intege r value: '' for column 'discc' at row 1 at C:/Program Files/SlimServer_svn/serve r/Slim/DataStores/DBI/DataModel.pm line 956. at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DBIStore.pm line 1951 2006-01-14 22:21:03.6622 ERROR: Slim::Control::Command::clearExecuteCallback() h as been deprecated! 2006-01-14 22:21:03.6654 ERROR: Please use Slim::Control::Request::unsubscribe() instead! 2006-01-14 22:21:03.7129 Slim::DataStores::DBI::Album Slim::DataStores::DBI::Alb um=HASH(0x5142d5c) destroyed without saving changes to discc, replay_peak, title sort, compilation, titlesearch, replay_gain, musicbrainz_id, disc, year, contrib utor at slimserver.pl line 0 This crash doesn't occur with svn 5515, but does occur with svn 5516 or later.
Chris - are you still seeing this with the latest nightly?
Hi Dan, Using svn r6921, I get the following error: 2006-04-13 17:44:05.7036 DBD::mysql::st execute failed: Incorrect integer value: '' for column 'discc' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DataModel.pm line 984. Can't update 10 CC's Greatest Hits 1972-1978: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'discc' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DataModel.pm line 984. at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DBIStore.pm line 1973 2006-04-13 17:44:05.8939 Slim::DataStores::DBI::Album Slim::DataStores::DBI::Album=HASH(0x32b59bc) destroyed without saving changes to discc, replay_peak, title sort, compilation, titlesearch, replay_gain, musicbrainz_id, disc, year, contributor at slimserver.pl line 0 The crash occurs on the first track in the library. This doesn't seem to affect the split-scanner branch. Cheers Chris
Chris - I just checked in change 6922 which will hopefully fix this problem.
That fixes the discc error, but now I get the following: 2006-04-13 18:35:34.3949 DBD::mysql::st execute failed: Data truncated for column 'replay_peak' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DataModel.pm line 984. Can't update Trouble: DBD::mysql::st execute failed: Data truncated for column 'replay_peak' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/DataStores/ DBI/DataModel.pm line 984. at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DBIStore.pm line 1934 2006-04-13 18:35:34.6730 Slim::DataStores::DBI::Album Slim::DataStores::DBI::Album=HASH(0x32c55f8) destroyed without saving changes to replay_peak, compilation, titlesort, titlesearch, replay_gain, musicbrainz_id, year, contributor at slimserver.pl line 0
Can you run with --d_scan and find out what file is causing this and send it to dan | at | slimdevices.com ? Thanks.
I've sent you the file via email.
Hmm.. I'm not able to reproduce it. I don't see any RG info in that file. Can you add the following above the $albumObj->set(%set); line in Slim/DataStores/DBI/DBIStore.pm line 1934: use Data::Dumper; print Dumper(\%set); Thanks.
2006-04-13 20:12:59.6618 directory entry: file:///L:/Music/Bob/Akon%20-%20Trouble/01%20-%20Locked%20Up.mp3 $VAR1 = { 'replay_peak' => undef, 'compilation' => 0, 'titlesort' => 'TROUBLE', 'titlesearch' => 'TROUBLE', 'replay_gain' => undef, 'musicbrainz_id' => undef, 'year' => '2005', 'contributor' => '2' }; 2006-04-13 20:12:59.8565 DBD::mysql::st execute failed: Data truncated for column 'replay_peak' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DataModel.pm line 984. Can't update Trouble: DBD::mysql::st execute failed: Data truncated for column 'replay_peak' at row 1 at C:/Program Files/SlimServer_svn/server/Slim/DataStores/ DBI/DataModel.pm line 984. at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DBIStore.pm line 1934 2006-04-13 20:13:00.0806 Slim::DataStores::DBI::Album Slim::DataStores::DBI::Album=HASH(0x32b4a34) destroyed without saving changes to replay_peak, compilation, titlesort, titlesearch, replay_gain, musicbrainz_id, year, contributor at slimserver.pl line 0
I *think* its falling over on the first track in my library which doesn't contain the replay_peak field. It looks like the scanning process isn't handling undef values correctly...
Subject: Re: SVN 5516 & mysql causes crash on scanning * Slim Devices Bugzilla shaped the electrons to say... >I *think* its falling over on the first track in my library which doesn't >contain the replay_peak field. It looks like the scanning process isn't >handling undef values correctly... Yeah - there's some logic in there - an undef value should mean to delete the value if there is one. What version of MySQL are you running? Is it in "strict" mode? -D -- <iNoah> all your base class are belong to us
Can you try this patch to DataModel.pm ? --- Slim/DataStores/DBI/DataModel.pm (revision 6917) +++ Slim/DataStores/DBI/DataModel.pm (local) @@ -977,7 +977,7 @@ } else { - push @vals, "$value"; + push @vals, (defined $value ? "$value" : undef); } } Thanks
I'm using MySQL 5.0.19 on Windows XP. As far as I know strict mode isn't enabled. However, your patch seems to have solved the problem - my SlimServer is now happily scanning away!!
Ok - fixed in change 6927