Posts: 3
Threads: 2
Joined: Jul 2024
Reputation:
0
After adding my mp3 library and getting it indexed I noticed that as good as all cover images were broken in the album view. There are links to cached thumbs but they all gave a 404. I checked the cache dir and it only contained a few images.
I investigated a bit and it seemed the regenerate process crashed on a folder because the "view status" always stopped on the same folder, a folder with various mp3s (not an album). I moved that folder away and did a complete library reindex and thumb regen. This time the regen process crashed on another folder, with an album. After moving that one away too and repeating the process, it finally succeeded and now all my albums have working cover thumbs. But it would be nice if it also worked with the two folders.
I tried to find out why the process failed on those two folders but I couldn't spot anything weird. All songs look/play fine and the two folders only contain mp3s, no cover images. Some files have embedded cover images but they seem ok to me. I also couldn't find any helpful logs. Haven't done any further digging.
I can provide share links for the two problematic folders if anyone wants to have a look.
Posts: 14
Threads: 3
Joined: Jul 2024
Reputation:
1
I would suggest looking at the tags on the files and see if there is something off.
I had issues about a year ago with some corrupt tags that caused me issues.
As I recall the issue I had was corrupt dates in the files (it shows two different years)
Once I corrected that the issue went away.
Posts: 14,653
Threads: 337
Joined: Mar 2018
Reputation:
601
(07-27-2024, 10:29 AM)Farenji Wrote: After adding my mp3 library and getting it indexed I noticed that as good as all cover images were broken in the album view. There are links to cached thumbs but they all gave a 404. I checked the cache dir and it only contained a few images.
I investigated a bit and it seemed the regenerate process crashed on a folder because the "view status" always stopped on the same folder, a folder with various mp3s (not an album). I moved that folder away and did a complete library reindex and thumb regen. This time the regen process crashed on another folder, with an album. After moving that one away too and repeating the process, it finally succeeded and now all my albums have working cover thumbs. But it would be nice if it also worked with the two folders.
I tried to find out why the process failed on those two folders but I couldn't spot anything weird. All songs look/play fine and the two folders only contain mp3s, no cover images. Some files have embedded cover images but they seem ok to me. I also couldn't find any helpful logs. Haven't done any further digging.
I can provide share links for the two problematic folders if anyone wants to have a look.
Zip up the two folders and PM a download link to myself, @ TheOldPresbyope and @ Nutul. One of us will analyze the files and try to repro the issue.
Posts: 6,445
Threads: 188
Joined: Apr 2018
Reputation:
262
I got your files. Oh my, their metadata is messy. Among other things, I see the fingerprints of iTunes all over them, ugh, but there's other issues too. Trouble is, there's so many tracks and enough different issues, including with coverart, that it's hard for me to express a simple "do this" rule.
But, oh my goodness, the funk tracks throw me back to my salad days living on the south side of Chicago 50+ years ago! Good times, Saturday nights (well, some of them, anyway).
I'll have to cogitate a bit on what's a good path forward.
Regards,
Kent
Posts: 1,516
Threads: 25
Joined: Jun 2022
Reputation:
53
(07-27-2024, 03:36 PM)TheOldPresbyope Wrote: I got your files. Oh my, their metadata is messy. Among other things, I see the fingerprints of iTunes all over them, ugh, but there's other issues too. (...)
Yup, I had the exact same reaction. The "Oh my" thing...
I would like iTunes to be declared dangerous - UAYOR - for both tagging schemes, and headaches...
Posts: 14,653
Threads: 337
Joined: Mar 2018
Reputation:
601
07-27-2024, 10:39 PM
(This post was last modified: 07-27-2024, 10:40 PM by Tim Curtis.)
Looks like there is binary 00 data at the end of Frame ID "TCP" in the file being scanned by thumb-gen.php. In the debug below, 54435000 is the hex representation of the string "TCP ".
Code: 220240727 165157 debug1 (TPE1)
20240727 165157 debug1 (54504531)
20240727 165157 debug1 Zend/Media/Id3/Frame/Tpe1.php
20240727 165157 debug1 end
.
.
20240727 165157 debug1 start
20240727 165157 debug1 340
20240727 165157 debug1 (TCP )
20240727 165157 debug1 (54435000)
20240727 165157 debug1 Zend/Media/Id3/Frame/Tcp .php
20240727 165157 debug1 end
In the section of Zend code being debugged the formed file "Zend/Media/Id3/Frame/Tcp .php" is used in an fopen() followed by a require_once() include statement.
Code: /var/www/inc/Zend/Media/Id3v2.php
$this->_reader->setOffset($offset);
if (@fopen($file = 'Zend/Media/Id3/Frame/' .
ucfirst(strtolower($identifier)) . '.php', 'r',
true) !== false) {
require_once($file);
}
I don't know how the binary 00 got in that frame id but we certainly don't want the script to crash because of it. I'll look into a fix, prolly something like checking for file_exists() first.
Posts: 14,653
Threads: 337
Joined: Mar 2018
Reputation:
601
Here's a run on my test_mixed collection with some error checking code added. No script crash :-)
Code: 20240727 184653 thumb-gen: Start
20240727 184653 thumb-gen: Scan opt: Default
20240727 184653 thumb-gen: Priority: Embedded cover
20240727 184653 thumb-gen: Res,Qual: 600px,60
20240727 184653 thumb-gen: Px ratio: 1
20240727 184653 thumb-gen: Th width: 600
20240727 184653 thumb-gen: Thm qual: 60
20240727 184653 thumb-gen: Scanning: NAS, NVME, SDCARD, VFAT64
20240727 184653 thumb-gen: Error: imagecreatefromstring() failed: USB/VFAT64/Test_mixed/Alain/The Rolling Stones - 1-11 (I Can't Get No) Satisfaction.mp3
20240727 184654 thumb-gen: Error: Zend bad Frame ID (RGAD) in file: USB/VFAT64/Test_mixed/Atair/The_Enja_Birthday_Compilation/9 - Rabih Abou-Khalil - Dog River.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TCP ) in file: USB/VFAT64/Test_mixed/Farenji/keb darge - legendary deep funk vol. 2/Keb Darge's Legendary Deep Funk Volume 2 - 20. Sons Of The Kingdom - Modernization.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TCO ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TP1 ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TT2 ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240727 184655 thumb-gen: Error: Not a valid FLAC bitstream: USB/VFAT64/Test_mixed/Frans Meerhoff/Test2/Mary Wells - My Guy.flac
20240727 184656 thumb-gen: Error: Zend bad Frame ID (UFI?) in file: USB/VFAT64/Test_mixed/Genre Issue Files Except Track 10/1-11-High Score Screen.mp3
20240727 184656 thumb-gen: Error: Zend bad Frame ID (RGAD) in file: USB/VFAT64/Test_mixed/Genre Issue Files Except Track 10/1-11-High Score Screen.mp3
20240727 184658 thumb-gen: Error: Not a valid FLAC bitstream: USB/VFAT64/Test_mixed/Runaljod - Gap Var Ginnunga/12 - Dagr.flac
20240727 184658 thumb-gen: Done: 142 folders scanned, 142 thumbs created, 0 already in cache.
The OP files are below showing Frame ID's with binary 00 (printed as space) on the end of the string.
Code: 20240727 184655 thumb-gen: Error: Zend bad Frame ID (TCP ) in file: USB/VFAT64/Test_mixed/Farenji/keb darge - legendary deep funk vol. 2/Keb Darge's Legendary Deep Funk Volume 2 - 20. Sons Of The Kingdom - Modernization.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TCO ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TP1 ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240727 184655 thumb-gen: Error: Zend bad Frame ID (TT2 ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
Posts: 6,445
Threads: 188
Joined: Apr 2018
Reputation:
262
Yeah, the files in the OP's "Salsa de hoy" directory have a frankensteinian mashup of metadata. Three-character Frame ids are defined for id3v2.2; id3v2.3 moved to 4-character ids. There's also iTunes-like stuff and even some WMA. This all generates interesting messages in the various tools at my disposal. The files definitely need to be cleaned.
Defensive coding is good; as you say, the script shouldn't crash out. The question is, what messages should be passed back to the end user? I'm thinking just a razzberry:-)
Regards,
Kent
Posts: 14,653
Threads: 337
Joined: Mar 2018
Reputation:
601
07-28-2024, 11:42 AM
(This post was last modified: 07-28-2024, 11:44 AM by Tim Curtis.
Edit Reason: eta
)
(07-28-2024, 02:06 AM)TheOldPresbyope Wrote: Yeah, the files in the OP's "Salsa de hoy" directory have a frankensteinian mashup of metadata. Three-character Frame ids are defined for id3v2.2; id3v2.3 moved to 4-character ids. There's also iTunes-like stuff and even some WMA. This all generates interesting messages in the various tools at my disposal. The files definitely need to be cleaned.
Defensive coding is good; as you say, the script shouldn't crash out. The question is, what messages should be passed back to the end user? I'm thinking just a razzberry:-)
Regards,
Kent
lol, here's what gets logged after the fix that prevents the script crash :-)
Code: 20240728 073924 worker: Job regen_thmcache
20240728 073924 thumb-gen: Start
20240728 073924 thumb-gen: Scan opt: Default
20240728 073924 thumb-gen: Priority: Embedded cover
20240728 073924 thumb-gen: Res,Qual: 600px,60
20240728 073924 thumb-gen: Px ratio: 1
20240728 073924 thumb-gen: Th width: 600
20240728 073924 thumb-gen: Thm qual: 60
20240728 073924 thumb-gen: Scanning: NAS, NVME, SDCARD, VFAT64
20240728 073927 thumb-gen: Error: imagecreatefromstring() failed: USB/VFAT64/Test_mixed/Alain/The Rolling Stones - 1-11 (I Can't Get No) Satisfaction.mp3
20240728 073928 thumb-gen: Error: Zend bad Frame ID (RGAD) in file: USB/VFAT64/Test_mixed/Atair/The_Enja_Birthday_Compilation/9 - Rabih Abou-Khalil - Dog River.mp3
20240728 073930 thumb-gen: Error: Zend bad Frame ID (TCP ) in file: USB/VFAT64/Test_mixed/Farenji/keb darge - legendary deep funk vol. 2/Keb Darge's Legendary Deep Funk Volume 2 - 20. Sons Of The Kingdom - Modernization.mp3
20240728 073930 thumb-gen: Error: Zend bad Frame ID (TCO ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240728 073930 thumb-gen: Error: Zend bad Frame ID (TP1 ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240728 073930 thumb-gen: Error: Zend bad Frame ID (TT2 ) in file: USB/VFAT64/Test_mixed/Farenji/Salsa de hoy/Yo no soy guapo - La Sonora Matancera & Vicentico Valdes.mp3
20240728 073930 thumb-gen: Error: Not a valid FLAC bitstream: USB/VFAT64/Test_mixed/Frans Meerhoff/Test2/Mary Wells - My Guy.flac
20240728 073931 thumb-gen: Error: Zend bad Frame ID (UFI?) in file: USB/VFAT64/Test_mixed/Genre Issue Files Except Track 10/1-11-High Score Screen.mp3
20240728 073931 thumb-gen: Error: Zend bad Frame ID (RGAD) in file: USB/VFAT64/Test_mixed/Genre Issue Files Except Track 10/1-11-High Score Screen.mp3
20240728 073934 thumb-gen: Error: Not a valid FLAC bitstream: USB/VFAT64/Test_mixed/Runaljod - Gap Var Ginnunga/12 - Dagr.flac
20240728 073935 thumb-gen: Done: 142 folders scanned, 142 thumbs created, 0 already in cache.
ETA: Anytime I need to go into the Zend code, extra coffee is required ;-)
Posts: 3
Threads: 2
Joined: Jul 2024
Reputation:
0
Thanks for all the effort guys. I got these files from all kinds of sources and I did not bother to clean/process the tags of all files. I cleaned the tags now and that solves the issues, there are no crashes anymore. But of course there will be many more other files around in the wild with invalid/broken/corrupted/messy data, I agree that the script should never crash on that.
|