05-28-2024, 07:06 PM
(This post was last modified: 05-28-2024, 08:02 PM by Tim Curtis.
Edit Reason: fix code box
)
(05-28-2024, 06:40 PM)Tim Curtis Wrote:(05-28-2024, 06:23 PM)ftw64 Wrote: Hi Tim,
It seems that this statement in thumb-gen.php (line 318) does not return:
$id3v2 = new Zend_Media_Id3v2($path, array('hash_only' => false)); // r44a
Code:case 'mp3':
require_once __DIR__ . '/../inc/Zend/Media/Id3v2.php';
try {
workerLog('thumb-gen: getImage(): 4 (path = ' . $path . ')');
$id3v2 = new Zend_Media_Id3v2($path, array('hash_only' => false)); // r44a
workerLog('thumb-gen: getImage(): 5');
if (isset($id3v2->apic)) {
The log prints:
Code:20240528 201917 thumb-gen: getImage(): 4 (path = /var/lib/mpd/music/NAS/NFS/2/stevie wonder - (2001) vocals and instrumentals pt2 (lg100)/11 - for once in my life.mp3)
and then the thumbnail generator stops and I do not get debug output 'thumb-gen: getImage(): 5' anymore...
Now investigating Zend_Media_Id3v2 ...
-Frank
Back at the start of the Bookworm port I had to fixup some implode() statements in the id3 and iso14496 Zend classes that failed due to not being PHP8 compliant.
Here's the commit
https://github.com/moode-player/moode/co...88c13af3a1
It' possible other non-php8-compliant code exists in Zend. Just a thought.
I'm absolutely unsure if what I'm doing is correct (have almost no knowledge of PHP). But when I change the implode code in /var/www/inc/Zend/Media/Id3/LinkFrame.php to the below, the thumbnail generator no longer crashes on the offending MP3 file:
Code:
public function __construct($reader = null, &$options = array())
{
parent::__construct($reader, $options);
workerLog('Zend_Media_Id3_LinkFrame: 1');
if ($this->_reader !== null) {
workerLog('Zend_Media_Id3_LinkFrame: 2');
$this->_link = implode
('', $this->_explodeString8
($this->_reader->read($this->_reader->getSize()), 1));
workerLog('Zend_Media_Id3_LinkFrame: 3');
}
}
However, now it fails on some FLAC other MP3 file... Perhaps there are other incorrect calls to implode in the Zend Framework...
I'll continue debugging...
-Frank