PDA

View Full Version : Shortcut loops - No means to disable scanning in V7?



Richard Boyce
2008-04-27, 14:34
My music folders have lots of shortcuts, created for manual use. These have triggered CPU-bound scanning loops when I was using V6 on my SB3, but I managed to disable the scanning with V6. I can't remember exactly what I did to achieve that; I may have just renamed the scanner exe.

I recently upgraded to V7 and hoped this problem was solved, but now it seems to be the main exe that's looping. There still seems to be no ability to disable scanning. There is an option to scan playlists only, but that option doesn't stick for some reason.

I just want to be able to follow the Music Folder menu entry in my SB to my music folders; to browse through folder shortcuts, and select what I want to play. That's all I require. No indexing and cataloguing or other automation needed.

If SqueezeCenter detects changes since I last browsed (which seems to be daily), it will go into a CPU-bound loop with no HDD activity. I have to terminate SC in Windows Task Manager, and then restart SC. Then I can browse with no problem until SC next decides it needs to scan.

I'm surprised that the server software has reach V7 without some means to disable this troublesome scanning in the software. I don't require it to be smart enough to avoid shortcut loops, though that would be very useful; I just want an option to turn the scanning off, allowing me to browse my music folders in my Squeezebox and play the music.

Is there some hack of a configuration file, or a command line option that I can use to achieve this?

Thanks in advance.

JJZolx
2008-04-27, 18:09
My music folders have lots of shortcuts, created for manual use. These have triggered CPU-bound scanning loops when I was using V6 on my SB3, but I managed to disable the scanning with V6. I can't remember exactly what I did to achieve that; I may have just renamed the scanner exe.

I suppose you could always try that again.


I recently upgraded to V7 and hoped this problem was solved, but now it seems to be the main exe that's looping. There still seems to be no ability to disable scanning. There is an option to scan playlists only, but that option doesn't stick for some reason.

Scanning isn't a continuous or automatic function - it must be initiated by the user. The 'Only rescan playlists' setting that you're trying to make stick is not a setting. It's an action. You select one of the rescan actions and click the 'Rescan' button.

The exception to this is the first time you start the server, if the database is empty then a scan will be initiated.


I just want to be able to follow the Music Folder menu entry in my SB to my music folders; to browse through folder shortcuts, and select what I want to play. That's all I require. No indexing and cataloguing or other automation needed.

I'm afraid SqueezeCenter doesn't work like this. Anything you play from your library must first be scanned and catalogued in the database. When you browse through your music folders the music files are scanned as you browse.


If SqueezeCenter detects changes since I last browsed (which seems to be daily), it will go into a CPU-bound loop with no HDD activity. I have to terminate SC in Windows Task Manager, and then restart SC. Then I can browse with no problem until SC next decides it needs to scan.

The browsing is obviously tripping it and starting a scan of some new/changed content. Apparently it's getting caught up by your circular shortcuts.

The only thing I can think of is to hack the code and get the server not to follow shortcuts. I don't think this can be done through the configuration, although it might make an interesting enhancement request.

JJZolx
2008-04-27, 18:43
Another question that comes to mind... Are you sure the scanner is "stuck" in a loop? Scanning a complete library isn't a fast process, particulary on a slow system. People have reported some systems taking many hours, even days, to scan a moderately sized library.

mherger
2008-04-27, 23:28
> My music folders have lots of shortcuts, created for manual use. These
> have triggered CPU-bound scanning loops when I was using V6 on my SB3,

This issue should be solved for long. Can you tell us more about your installation, your OS, version, folder structure and where these shortcuts are pointing? A scanner.log (with scan.* logging options set to debug) might be helpful, too.

--

Michael

Richard Boyce
2008-04-27, 23:47
Yes, I'm sure there's no physical drive activity, and I've allowed plenty of time for any real progress.


I'm afraid SqueezeCenter doesn't work like this. Anything you play from your library must first be scanned and catalogued in the database. When you browse through your music folders the music files are scanned as you browse.

If it only scanned the folders that I chose to play, there would be no problem. I usually don't have shortcuts within the album folders that I play; the shortcuts are between folders at a higher level.

The system is perfectly happy to let me browse through folder shortcuts and play whatever I wish, but only once its own change-triggered loop has been forced to a halt and SC has been restarted.

Fortunately, whatever parameters are being checked for change (folder size?) are being stored before the looping gets under way. This means the system works happily without looping after the restart, until such time as I change the contents of my music folders again, such as by adding another album folder.

Clearly all we need is a means to tell SC not to start this looping process in the first place. Provide an option to leave the browsing through the high level folders to the user.

Of course, if the system were programmed with possible loops in mind, they could be avoided, couldn't they?

I'll provide more info later today.

[Edit]

My system runs XP Home SP2, firmware 86, V7 17793 , using an SB3.

I point the server to a folder containing 3 folder shortcuts: ape, mp3 and BitTorrent. Browsing any of those three can trigger a loop, so I'll describe the simplest.

A file in my ape folders may have the path like K:/Music/Ape/B/The Beatles/Help!/13 - Yesterday.ape, ie the ape folders have subfolders for each level of the alphabet, then the artist, then the album. My files are spread over two drives, so some of the letter folders are actually shortcuts to a folder for that letter on the other drive. So that's one level of shortcut loop that I have.

I also have shortcuts between artists, so The Beatles folder will have a shortcut to the Paul McCartney folder which will have a shortcut back to the Beatles folder. That's another level of shortcut loop.

Here's an extract from my server.log showing the server going round in circles:


[08-04-28 08:50:37.3013] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Radio/ape
[08-04-28 08:50:37.3355] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///O:/Music/ape
[08-04-28 08:50:37.4037] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/A
[08-04-28 08:50:37.4640] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/B
[08-04-28 08:50:37.5316] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/C
[08-04-28 08:50:37.7502] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Check%20Discs
[08-04-28 08:50:37.7879] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Compilations
[08-04-28 08:50:37.9096] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Films%20&%20Musicals
[08-04-28 08:50:37.9445] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Radio/ape
[08-04-28 08:50:37.9720] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///O:/Music/ape
[08-04-28 08:50:38.0291] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/A
[08-04-28 08:50:38.0882] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/B

Shortcuts are great, but obviously potentially fatal to any software that's not prepared for them. If the system kept track of where it's been, it could detect a loop. Alternatively, a setting saying "Don't scan through shortcuts" would suffice, if it still allowed manual browsing though the shortcuts.

Richard Boyce
2008-05-05, 19:42
I've decided to go back to version 6 and I need to download that. I can't find a link to older versions on the site. Can you provide one, please?

radish
2008-05-05, 19:56
http://www.slimdevices.com/downloads/

But version 6 scans through shortcuts too...


Shortcuts are great, but obviously potentially fatal to any software that's not prepared for them.
But SC is prepared for them, otherwise it wouldn't know how to follow them. Shortcuts are not like softlinks, if you don't know otherwise they just look like files. Of course loop detection would be useful as you're not the first to fall foul of similar problems.


If the system kept track of where it's been, it could detect a loop.
Interesting, I actually ask this as an interview question for hiring candidates...there are some interesting solutions to the general problem of detecting loops in data structures.

mherger
2008-05-05, 21:55
>> If the system kept track of where it's been, it could detect a loop.

It should (and usually does). That's why I've been asking for the logs at
the first place (see my previous posting)? Please provide us with an
unfiltered log file so we can see what's going wrong here. Thanks!

Michael

Richard Boyce
2008-05-14, 23:36
I was able to find a workaround with v6 when I had that installed. I think I disabled the scanner.

The following log posting includes everything in the log (starting with an empty log) before the loop, plus almost two full iterations of the loop:


[08-05-15 07:20:37.3065] Slim::Utils::Misc::findAndScanDirectoryTree (1019) findAndScanDirectoryTree( D:\Squeezebox ): fsMTime: 1206982863, dbMTime: 1206982863
[08-05-15 07:20:38.6446] Slim::Utils::Misc::findAndScanDirectoryTree (1019) findAndScanDirectoryTree( O:\Music\ape ): fsMTime: 1210830383, dbMTime: 1210830119
[08-05-15 07:20:38.6455] Slim::Utils::Misc::findAndScanDirectoryTree (1024) mtime db: 1210830119 : Thu May 15 06:41:59 2008
[08-05-15 07:20:38.6461] Slim::Utils::Misc::findAndScanDirectoryTree (1025) mtime fs: 1210830383 : Thu May 15 06:46:23 2008
[08-05-15 07:20:38.6656] Slim::Utils::Scanner::scanDirectory (260) About to look for files in O:\Music\ape
[08-05-15 07:20:38.6691] Slim::Utils::Scanner::scanDirectory (261) For files with extensions in: (?i-xsm:\.(?:ape|wma|asf|wax|asx|lnk|wpl|wv|wav|wave|m p3|mp2|m3u|pls|xspf|flc|flac|fla|m4a|mov|m4b|mp4|c ue|mp+|mpc|ogg|aif|aiff|lnk)$)
[08-05-15 07:20:38.7422] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/A
[08-05-15 07:20:38.7702] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/B
[08-05-15 07:20:38.8010] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/C
[08-05-15 07:20:38.8287] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Check%20Discs
[08-05-15 07:20:38.8459] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Compilations
[08-05-15 07:20:38.8876] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Films%20&%20Musicals
[08-05-15 07:20:38.9068] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Radio/ape
[08-05-15 07:20:38.9192] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///O:/Music/ape
[08-05-15 07:20:38.9435] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/A
[08-05-15 07:20:38.9803] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/B
[08-05-15 07:20:39.0094] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/C
[08-05-15 07:20:39.0351] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Check%20Discs
[08-05-15 07:20:39.0494] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Compilations
[08-05-15 07:20:39.0901] Slim::Utils::Scanner::findFilesMatching (162) Following Windows Shortcut to: file:///K:/Music/ape/Films%20&%20Musicals
[08-05-

This loop involve two drives. Could that be why the current loop checks are being defeated?