andygrundman / Audio-Scan

Audio::Scan - Fast Perl XS metadata and tag reader for all common audio file formats
GNU General Public License v2.0
3 stars 13 forks source link

Corrupt jpeg error after not being able to read at least 10 bytes of file #4

Closed HighHub closed 6 years ago

HighHub commented 6 years ago

OS X, High Sierra, using Audio-Scan as part of Logitech Media Server v7.9 (latest nightly build), Audio-Scan is v0.95

While scanning music files the process gets stuck on the same files, error messages from scanner.log copied below, the files involved open OK in several programs and the error doesn't show up in previous versions of LMS. Offending files coped below in case you want to reproduce the error. I've already posted this error in the LMS's forums and the recommendation there was to post a bug report here.

AudioScan error example files.zip

[18-02-06 16:23:58.3337] Slim::Music::Artwork::__ANON__ (697) Pre-caching artwork for Discovery from /Users/XXXX/Music/iTunes/iTunes Media/Music/Daft Punk/Discovery/01 One More Time.m4a [18-02-06 16:23:58.3344] Audio::Scan::scan (75) Warning: Error: Unable to read at least 16 bytes from file (only read 10). [18-02-06 16:23:58.3433] Slim::Music::Artwork::__ANON__ (697) Pre-caching artwork for Back in Black from /Users/XXXX/My Music/A-L/Back In Black/10 - Rock And Roll Ain't Noise Pollution.mp3 [18-02-06 16:23:58.3442] Image::Scale::new (44) Warning: Image::Scale libjpeg error: Corrupt JPEG data: 45 extraneous bytes before marker 0xe1((data))`

andygrundman commented 6 years ago

Hi I believe you ran into a bug or bugs that were recently fixed. Please retest with Audio-Scan 0.99 and Image-Scale 0.14. If LMS nightly doesn't have these versions, please ask someone to update to the latest versions.

michaelherger commented 6 years ago

I can confirm that Image::Scan 0.14 would not crash/hang the scanner.

[18-02-16 06:12:22.2517] Image::Scale::new (44) Warning: Image::Scale libjpeg error: Corrupt JPEG data: 45 extraneous bytes before marker 0xe1 ((data)) [18-02-16 06:12:22.2528] Image::Scale::new (44) Warning: Image::Scale libjpeg error: JPEG datastream contains no image ((data)) [18-02-16 06:12:22.2531] Slim::Utils::ImageResizer::sync_resize (141) Error resizing /Users/mh/Dropbox/Dateianfragen/Stuff/Sounder Oscar - 10 - Rock And Roll Ain't Noise Pollution.mp3: Can't call method "width" on an undefined value at /Users/mh/Dropbox/Squeezebox/git/server/Slim/Utils/GDResizer.pm line 121.

Previously it would hang at trying to get the image data out of that mp3 file.

andygrundman commented 6 years ago

Thanks Michael!