Bug 9970 - Scanner crashes when handling FLAC with embedded cue and external cue
: Scanner crashes when handling FLAC with embedded cue and external cue
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.2.1
: PC Windows Vista
: P1 major with 1 vote (vote)
: 7.x
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-11 14:59 UTC by Anoop Mehta
Modified: 2009-07-31 10:31 UTC (History)
7 users (show)

See Also:
Category: ---


Attachments
Scanner log (149.36 MB, application/octet-stream)
2008-11-11 15:15 UTC, James Richardson
Details
cue and flac with ebedded cue that causes issues (deleted)
2008-12-18 17:15 UTC, Spies Steven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anoop Mehta 2008-11-11 14:59:59 UTC
I have a customer who's scanner crashed when he is trying to scan large FLAC files. 

I have asked James about this issue and he was able to reproduce it via 7.2.1 and 7.3

RN ticket # 081025-001915
Comment 1 James Richardson 2008-11-11 15:15:23 UTC
Created attachment 4236 [details]
Scanner log

Here is a log of the scanner.  Notice it will some time give an error, and sometimes just fail with no error
Comment 2 Ken 2008-11-12 19:07:59 UTC
The same behavior exists if I attempt to add an errant FLAC file to a playlist when browsing the music folder directory. SqueezeCenter churns for a while, uses up a huge amount of memory, and then eventually dies in the same manner as scanner.exe. I'm presuming that the same logic for parsing the FLAC file/CUE sheet exists in both programs.
Comment 3 James Richardson 2008-11-13 07:19:10 UTC
Alan: would this be yours to look at?
Comment 4 Alan Young 2008-11-13 09:44:22 UTC
No, I don't really have any experience with the scanner.
Comment 5 Ken 2008-11-15 11:22:46 UTC
It might be useful to note that this problem did not exist until version 7.2. These FLAC files have been around for some time and all versions of SqueezeCenter and SlimServer from version 7.1 back were able to digest them without problems. The issue seems to have started with version 7.2 and continues in version 7.2.1.
Comment 6 Chris Owens 2008-11-17 09:27:41 UTC
Comment on attachment 4236 [details]
Scanner log

James to keep looking at this.
Comment 7 James Richardson 2008-11-17 09:33:34 UTC
James to work on getting a 'smaller' reproducible set of files
Comment 8 Chris Owens 2008-11-24 09:57:47 UTC
James to continue looking at this issue.  Andy is happy to look at this once we get a good reproducible case.
Comment 9 Ken 2008-12-02 09:09:41 UTC
If it's any help, I have FLAC files on my end that fail every time. I'll be happy to provide them.
Comment 10 James Richardson 2008-12-02 11:15:22 UTC
Ken: that would be great if you could point us to a location.  They would be too big to attach to this bug however.
Comment 11 Ken 2008-12-03 23:53:22 UTC
Try this file - http://misc.lemmingstothesea.com/MTV_Unplugged.zip

The unzipped directory, when scanned as the only item in the SC music directory, will cause scanner.exe to go haywire once it hits the file singlefile_2006_8_13_21h19m09s. Once the web UI indicates that it's scanning this file, the working set memory for the scanner.exe task jumps to over a GB, and eventually dies on its own. This seems to be completely reproducible on my computer using the released version of 7.2.1.

The upload speed of the connection is about 1 Mbps and the zip file is about 400 MB, so the download may take a little while. Let me know if you have any trouble getting a hold of the file.
Comment 12 James Richardson 2008-12-04 09:33:58 UTC
Thanks Ken, I'll test it out today
Comment 13 James Richardson 2008-12-09 09:03:32 UTC
*** Bug 10255 has been marked as a duplicate of this bug. ***
Comment 14 James Richardson 2008-12-15 10:41:40 UTC
*** Bug 10304 has been marked as a duplicate of this bug. ***
Comment 15 Spies Steven 2008-12-17 15:52:36 UTC
I'm gonna take a look at this one as well.  I will also investigate bug 4717 and bug 4691.
Comment 16 Spies Steven 2008-12-23 14:48:41 UTC
This issue is easily produced with the cue/flac that is provided in comment 11, thanks Ken.

The odd thing is I have not been able to figure out what is special about this cue/flac combination other then the flac has "type: 5 (CUESHEET)" metadata at block #3.  When I create a new cue/flac that has this same information the scanner does not have an issue with it.  I must be missing something.
Comment 17 Andy Grundman 2009-01-05 07:22:18 UTC
Fixed in change 24506.

QA should add all of the following to the standard test plan:

* FLAC with external cuesheet only.
* FLAC with embedded cuesheet only.
* FLAC with both external cuesheet and embedded cuesheet, with the external cuesheet alphabetically sorted before the FLAC file.
*FLAC with both external cuesheet and embedded cuesheet, with the external cuesheet alphabetically sorted after the FLAC file.

This bug occurred because the cue sheet was scanned before the FLAC, causing the FLAC file to be added to the database by the cue sheet code instead of the scanner code, and later scanned as a playlist instead of as a file.

The original customer with the 10,000 Maniacs album should fix or remove the embedded cuesheet.  Since it contains no artist/title information, the scanner ends up adding a No Artist entry.  I'd suggest removing the embedded cuesheet, as you should not have both external and embedded cuesheets for the same file.
Comment 18 Ross Levine 2009-01-16 16:47:04 UTC
Verified to be fixed in 7.3.3 - 24684.
Comment 19 James Richardson 2009-01-22 09:58:20 UTC
Fixed - Closed Message (SC)

This bug has been fixed in the 7.3.3 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.
Comment 20 James Richardson 2009-01-22 13:53:40 UTC
Correction: SqueezeCenter version is 7.3.2
Comment 21 Chris Owens 2009-07-31 10:31:47 UTC
Reduce number of active targets for SC