nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

PHP Fatal error: gd-webp cannot allocate temporary buffer in /var/www/html/lib/private/legacy/OC_Image.php on line 620 #256

Closed meonkeys closed 2 years ago

meonkeys commented 2 years ago

preview:generate-all and preview:generate both crash with this error:

PHP Fatal error:  gd-webp cannot allocate temporary buffer in /var/www/html/lib/private/legacy/OC_Image.php on line 620

I assumed it was some kind of webp parsing bug, but it happens when it is trying to generate previews for a directory with GIF files.

meonkeys commented 2 years ago

Aha! The issue was a file with RIFF (little-endian) data, Web/P image data, but the filename ended in .gif. Fixed by renaming it from example.gif to example.webp.

heinhuiz commented 2 months ago

I'm getting this same error sometimes (on line 751), maybe once per day after (during) a preview:pre-generate cron job. The script is called every 10 minutes, meaning that the error occurs roughly once every 150 runs.