Bug 15575 - When I do a full delete/rescan I can't see all my playlists
: When I do a full delete/rescan I can't see all my playlists
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.5.0
: PC Windows XP
: P2 normal (vote)
: 7.5.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-01 14:54 UTC by Mick
Modified: 2010-04-08 17:24 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Playlist archive (50.14 KB, application/octet-stream)
2010-02-20 05:33 UTC, Mick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mick 2010-02-01 14:54:02 UTC
When I do a full delete/rescan I can see all my playlists.

Doing a scan "new & changed" or just a playlist scan causes half my playlists to dissappear.

I get the following in my logs.

main::main (180) Starting Squeezebox Server scanner (v7.5.0, r29960, Sat Jan 30 01:04:56 PST 2010) perl 5.010000
Slim::Music::Import::runImporter (566) Starting Slim::Music::PlaylistFolderScan scan
main::main (311) Error: Failed when running main scan: [Can't call method "url" on an undefined value at /<C:\PROGRA~1\SQUEEZ~4\server\scanner.exe>Slim/Schema.pm line 826, <DATA> line 164.
]
main::main (312) Error: Skipping post-process & Not updating lastRescanTime!



Strangely, now that I've upped the logging level to Debug, it's worked as expected.
Comment 1 Mick 2010-02-01 14:55:41 UTC
edit - 

Should have read 

When I do a full delete/rescan I can't see all my playlists
Comment 2 Mick 2010-02-02 12:53:14 UTC
I think the fix to bug https://bugs-archive.lyrion.org/show_bug.cgi?id=14648 has
caused a problem with my playlists depending on the scan I run.

Playlist only scans fails with the error below.

A new and changed scan gives me half my playlists.
I have to to a Db clear and full rescan to get all my playlists back.

On Mon, Feb 1, 2010 at 10:55 PM, <bugs@bugs.slimdevices.com> wrote:

> https://bugs-archive.lyrion.org/show_bug.cgi?id=15575
>
>
>
> --- Comment #1 from Mick <oreillymj@gmail.com> 2010-02-01 14:55:41 PST ---
> edit -
>
> Should have read
>
> When I do a full delete/rescan I can't see all my playlists
>
> --
> Configure bugmail: https://bugs-archive.lyrion.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
Comment 3 Michael Herger 2010-02-08 00:04:58 UTC
If it's always the same playlist missing, could you please upload it here?
Comment 4 Michael Herger 2010-02-15 04:41:12 UTC
Mick, any news?
Comment 5 Mick 2010-02-19 10:40:55 UTC
Sorry, I was away for a week. I'll be adding some music to my system tomorrow.

I'll do a full rescan tonight and then a "new & changed" tomorrow to confirm that I still have an issue.

I suspect the scanner craps out on an old URL that isn't working any more. But the place it dies within the playlist varies slightly
Comment 6 Mick 2010-02-19 17:47:36 UTC
ok, when I do a full rescan, I get all of my playlist appearing, but when I do a new and changed I get about half of the playlists to appear. But the break in the playlists is not consistent.

I see this in the scanner log.

Slim::Music::Import::runImporter (566) Starting Slim::Music::PlaylistFolderScan scan
main::main (311) Error: Failed when running main scan: [Can't call method "url" on an undefined value at /<C:\PROGRA~1\SQUEEZ~4\server\scanner.exe>Slim/Schema.pm line 826, <DATA> line 164.
]
main::main (312) Error: Skipping post-process & Not updating lastRescanTime!

I'll zip the contents of the playlist dir and send it on.
Comment 7 Mick 2010-02-20 05:33:20 UTC
Created attachment 6544 [details]
Playlist archive

Attached is my playlist directory. A full rescan works fine. A partial new & chnaged results in all playlists up to around Raging Bull disappearing.

The exact point varies each time I do a rescan, but is always around playlists beginning with O,P,Q,R
Comment 8 Michael Herger 2010-02-22 04:33:08 UTC
Alan - the message in comment #6 happens in some code you added to fix bug 14648. Should we just check the existence of $playlistObj and ignore the remaining code if it's not available?
Comment 9 SVN Bot 2010-02-22 04:57:38 UTC
 == Auto-comment from SVN commit #30223 to the  repo by mherger ==
 == https://svn.slimdevices.com/?view=revision&revision=30223 ==

Bug: 15575
Description: be more defensive reading playlists. Don't crash.
Comment 10 Michael Herger 2010-02-22 04:59:41 UTC
Mick - could you please try again? While I can't reproduce this issue, I've added some more sanity checking in order not to crash the scanner. If this still fails, could you please move Soundtracks folder out of your playlists folder and try again? In there are the only playlists which look a bit suspect to me ("\Music" paths without the drive letter)
Comment 11 Mick 2010-02-22 09:18:18 UTC
I'll test with rev 30223 when it's available in the Windows build tomorrow.

I may get some time tonight to narrow down the root of the problem, but it does seem like the scanner needs to check if url is defined before using it.
Comment 12 Mick 2010-02-22 12:43:58 UTC
I removed the entire Soundtracks directory from my Playlist dir and tried a partial rescan of the of just the playlists.

My list of playlists is now smaller.
I wonder if the "Clearing internal ssp playlists" line is crucial. The scanner seems to be dying while it's clearing down the existing playlists from the database. So when the sanner dies, my playlist count gradually decreases.

main::main (180) Starting Squeezebox Server scanner (v7.5.0, r30216, Sat Feb 20 01:04:47 PST 2010) perl 5.010000
Slim::Music::Import::addImporter (546) Adding Slim::Music::PlaylistFolderScan Scan
Slim::Music::Import::countImporters (615) Found importer: Slim::Music::PlaylistFolderScan
Slim::Music::Import::runImporter (566) Starting Slim::Music::PlaylistFolderScan scan
Slim::Music::PlaylistFolderScan::startScan (82) Starting playlist folder scan
Slim::Music::PlaylistFolderScan::startScan (85) Clearing internal ssp playlists
main::main (311) Error: Failed when running main scan: [Can't call method "url" on an undefined value at /<C:\PROGRA~1\SQUEEZ~4\server\scanner.exe>Slim/Schema.pm line 826, <DATA> line 164.
]
main::main (312) Error: Skipping post-process & Not updating lastRescanTime!
Comment 13 Michael Herger 2010-02-22 13:04:22 UTC
Mick - that crash should be fixed in tomorrow's build. My change does what you supposed to do: check the validity of the playlist object, so the call to url() doesn't fail. Please try again with it. Thanks!
Comment 14 Mick 2010-02-23 10:44:48 UTC
Michael,

I've tested this and the scanner is now working fine.
Thanks for your help.
Comment 15 Michael Herger 2010-02-23 10:49:50 UTC
Great, thanks for the feedback!
Comment 16 Chris Owens 2010-04-08 17:24:21 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!