Bug 2656 - Initial scan can delete entries from genre_track
: Initial scan can delete entries from genre_track
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.2.1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-29 13:13 UTC by malcolmwotton
Modified: 2008-09-15 14:38 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 malcolmwotton 2005-11-29 13:13:15 UTC
I have now identified a very weird repeatable bug in the slimserver scanning process for 6.2.1

Process is as follows:

1) stop server
2) delete database
3) restart server - it begins scanning database
4) during rescan process use web interface to browse to 'Browse Genre/GenreX'
5) perform refresh

During this process I can see artists being added to the list as I expect.

6) wait for end of scan
7) refresh again


Observation:
Many of the tracks that were correctly identified in the GenreX are missing - ie tracks that were identified during the scan process were added and REMOVED/DELETED/CORRUPTED

This is entirely repeatable on my collection, and I have screenshots to show the process if it helps.

It only seems to affect the genre based information (all tracks seem ok when accessed other ways).

Finally I use multiple genres in one tag using a ';' to separate them.

LATER . . . . .

I have narrowed down the bug, but I don't know the root cause.

The bug is because $genreObj->delete; is called in _postCheckAttributes in DBIStore.pm (line 1544 in my version)

To prove this I put in a logging line as follows:
	$::d_import && msg("MALCOLM: deleting a genre $genreObj->name()\n"); #MALCOLM

When slimserver does an initial scan of the database it logs that it is deleting genres (but I don't know why), here's a short extract from the log

2005-11-29 20:53:08.9335 
2005-11-29 20:53:11.9701 Import: Scanning with 2 import plugins
2005-11-29 20:53:11.9704 	Playlist scan started at: Tue Nov 29 20:50:14 2005
2005-11-29 20:53:11.9706 	Folder scan started at: Tue Nov 29 20:50:15 2005
2005-11-29 20:53:11.9707 
2005-11-29 20:53:13.4017 MALCOLM: deleting a genre ChilledVocal->name()
2005-11-29 20:53:13.8109 MALCOLM: deleting a genre QualityPop->name()
2005-11-29 20:53:14.7144 MALCOLM: deleting a genre BruceSpringsteen->name()
2005-11-29 20:53:16.9955 Import: Scanning with 2 import plugins
2005-11-29 20:53:16.9958 	Playlist scan started at: Tue Nov 29 20:50:14 2005
2005-11-29 20:53:16.9959 	Folder scan started at: Tue Nov 29 20:50:15 2005
2005-11-29 20:53:16.9959 

That's about as far as I can take it I think . . . .
Comment 1 KDF 2005-11-29 13:16:00 UTC
have you tried the latest 6.2.2 nightly build?
Comment 2 malcolmwotton 2005-11-29 13:23:41 UTC
Nope not tried the nightly - I don't really consider myself a developer and I like to keep my squeezeboxes working so I don't generally mess around with nightlies.

However I will see if I can get the nightly and retry, I expect that to take a day or so as I need to work out how to get it and how I can preserve my functional 6.2.1 release so I don't screw anything up.

Malcolm
Comment 3 malcolmwotton 2005-11-29 14:56:20 UTC
Well checking the nightly was easier than I thought. This bug seems to have been fixed in the nightly build.
Comment 4 Dan Sully 2005-11-29 17:15:24 UTC
Ok - thanks. Closing.