Bug 14476 - Scanner fails when files contain very large artwork
: Scanner fails when files contain very large artwork
Status: VERIFIED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.4.0
: Macintosh MacOS X 10.5
: P1 major (vote)
: 7.4.1
Assigned To: Andy Grundman
: Audio::Scan
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-01 07:02 UTC by Michael Herger
Modified: 2009-10-14 12:13 UTC (History)
1 user (show)

See Also:
Category: Bug


Attachments
file bombing out the scanner (15.68 MB, application/octet-stream)
2009-10-01 07:09 UTC, Michael Herger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-10-01 07:02:47 UTC
Andy - got a file which would break the scanner:

[09-10-01 15:59:35.7247] Slim::Formats::readTags (180) Error: While trying to ->getTag(/Users/mh/Music/tests/SlimNAS ALAC/2-04_Way_Down_Yonder_In_New_Orleans.m4a) : buffer_append_space: len 8862950 too large (max 5242880) at /Users/mh/Documents/workspace/7.4/server/Slim/Formats/Movie.pm line 49.
[09-10-01 15:59:35.7252] Slim::Formats::readTags (180) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/Users/mh/Documents/workspace/7.4/server/Slim/Formats.pm line 180)
   frame 1: Slim::Formats::readTags (/Users/mh/Documents/workspace/7.4/server/Slim/Schema.pm line 917)
   frame 2: Slim::Schema::newTrack (/Users/mh/Documents/workspace/7.4/server/Slim/Utils/Scanner.pm line 342)
   frame 3: Slim::Utils::Scanner::scanDirectory (/Users/mh/Documents/workspace/7.4/server/Slim/Music/MusicFolderScan.pm line 79)
   frame 4: Slim::Music::MusicFolderScan::startScan (/Users/mh/Documents/workspace/7.4/server/Slim/Music/Import.pm line 564)
   frame 5: Slim::Music::Import::runImporter (/Users/mh/Documents/workspace/7.4/server/Slim/Music/Import.pm line 374)
   frame 6: Slim::Music::Import::runScan (/Users/mh/Documents/workspace/7.4/server/scanner.pl line 294)
   frame 7: (eval) (/Users/mh/Documents/workspace/7.4/server/scanner.pl line 288)
   frame 8: main::main (/Users/mh/Documents/workspace/7.4/server/scanner.pl line 439)

[09-10-01 15:59:35.7257] Slim::Utils::Scanner::scanDirectory (352) ERROR SCANNING /Users/mh/Music/tests/SlimNAS ALAC/2-04_Way_Down_Yonder_In_New_Orleans.m4a: Unable to read tags from file


The user reported it on FreeNAS too, where the message was slightly different:

[09-10-01 13:30:37.7249] Slim::Formats::readTags (180) Error: While trying to ->getTag(/mnt/music/music/iTunes Music/Duke Ellington/Fargo, North Dakota - November 7, 1940/2-04 Way Down Yonder In New Orleans.m4a) : Out of memory during "large" request for 16781312 bytes, total sbrk() is 529303552 bytes at /mnt/music/slimnas/squeezebox/Slim/Formats/Movie.pm line 49.
[09-10-01 13:30:37.7260] Slim::Formats::readTags (180) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (/mnt/music/slimnas/squeezebox/Slim/Formats.pm line 180)
frame 1: Slim::Formats::readTags (/mnt/music/slimnas/squeezebox/Slim/Schema.pm line 917)
frame 2: Slim::Schema::newTrack (/mnt/music/slimnas/squeezebox/Slim/Schema.pm line 1228)
frame 3: Slim::Schema::updateOrCreate (/mnt/music/slimnas/squeezebox/Slim/Utils/Scanner.pm line 342)
frame 4: Slim::Utils::Scanner::scanDirectory (/mnt/music/slimnas/squeezebox/Slim/Music/MusicFolderScan.pm line 79)
frame 5: Slim::Music::MusicFolderScan::startScan (/mnt/music/slimnas/squeezebox/Slim/Music/Import.pm line 564)
frame 6: Slim::Music::Import::runImporter (/mnt/music/slimnas/squeezebox/Slim/Music/Import.pm line 374)
frame 7: Slim::Music::Import::runScan (/mnt/music/slimnas/squeezebox/scanner.pl line 294)
frame 8: (eval) (/mnt/music/slimnas/squeezebox/scanner.pl line 288)
frame 9: main::main (/mnt/music/slimnas/squeezebox/scanner.pl line 439)

[09-10-01 13:30:37.7267] Slim::Utils::Scanner::scanDirectory (352) ERROR SCANNING /mnt/music/music/iTunes Music/Duke Ellington/Fargo, North Dakota - November 7, 1940/2-04 Way Down Yonder In New Orleans.m4a: Unable to read tags from file
Comment 1 Michael Herger 2009-10-01 07:09:16 UTC
Created attachment 5963 [details]
file bombing out the scanner

Feel free to adjust priorities et al. Thanks!
Comment 2 Andy Grundman 2009-10-01 11:54:20 UTC
Holy cow, this file contains 2 pieces of cover art, 5M and 3M for a total of 8M of artwork! This exceeds the max buffer size allowed in the scanner.  I guess I need to increase it again.  Very large artwork like this will result in high memory usage of the scanner.
Comment 3 SVN Bot 2009-10-01 12:48:26 UTC
 == Auto-comment from SVN commit #439 to the opensource repo by andy ==
 == https://svn.slimdevices.com/opensource?view=revision&revision=439 ==

Fixed bug 14476, increase buffer size to 10M, fixed handling of MP4 files with multiple cover images
Comment 4 James Richardson 2009-10-14 12:13:06 UTC
Verified fixed in SBS r2888