-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Description
When uploading a super-high-res HEIF photo, it causes an unhandled error during an attempt to generate a thumbnail, and the upload to stall at 0% permanently until reload.
I think the most likely cause is the vips libheif implementation hitting a memory security limit when vips tries to handle the large HEIF file to generate a thumbnail. The Windows Ente Photos desktop app doesn't appear to catch the exception and therefore stalls upon upload, instead of normally skipping thumbnail generation and moving on.
In my case, one of my photos throws this error whilst generating a thumbnail: heif: Memory allocation error: Security limit exceeded: Allocating 599270415 exceeds the security limit of 536870912 bytes (6.1000)
Truncated log:
[2025-10-09T19:23:42+00:00] [rndr] [info] Upload 20240423_083739.heic | start
[2025-10-09T19:23:45+00:00] [rndr] [info] Indexed 1 files
[2025-10-09T19:23:48+00:00] [rndr] [error] Native thumbnail generation failed: Error: Error invoking remote method 'generateImageThumbnail': Error: Command failed: "C:\Users\Tinh1\AppData\Local\Programs\ente\resources\vips.exe" thumbnail "D:/Google Photos/Takeout/Google Photos/Photos from 2024/20240423_083739.heic" "C:\Users\Tinh1\AppData\Local\Temp\ente\9XV5rvGMOC.jpeg[Q=70]" 720
(vips.exe:19516): VIPS-WARNING **: 19:23:48.213: error in tile 0 x 0
(vips.exe:19516): VIPS-WARNING **: 19:23:48.214: error in tile 0 x 1
(vips.exe:19516): VIPS-WARNING **: 19:23:48.214: error in tile 0 x 2
(vips.exe:19516): VIPS-WARNING **: 19:23:48.214: error in tile 0 x 3
(vips.exe:19516): VIPS-WARNING **: 19:23:48.214: error in tile 0 x 4
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 5
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 6
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 7
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 8
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 9
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 10
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 0
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 10
(vips.exe:19516): VIPS-WARNING **: 19:23:48.215: error in tile 0 x 20
(vips.exe:19516): VIPS-WARNING **: 19:23:48.216: error in tile 0 x 0
(vips.exe:19516): VIPS-WARNING **: 19:23:48.216: error in tile 0 x 10
heif: Memory allocation error: Security limit exceeded: Allocating 599270415 exceeds the security limit of 536870912 bytes (6.1000)
[2025-10-09T19:23:49+00:00] [rndr] [error] Unhandled error: RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
at m (ente://app/_next/static/chunks/2b3091fd.ad743b079e8fb98d.js:1:3366)
at F (ente://app/_next/static/chunks/2b3091fd.ad743b079e8fb98d.js:4:2129)
at wasm://wasm/00358752:wasm-function[1681]:0xb8848
at wasm://wasm/00358752:wasm-function[107]:0x744e
at wasm://wasm/00358752:wasm-function[137]:0x8865
at wasm://wasm/00358752:wasm-function[43]:0x2161
at wasm://wasm/00358752:wasm-function[55]:0x2c2b
at wasm://wasm/00358752:wasm-function[255]:0x1ab51
at wasm://wasm/00358752:wasm-function[377]:0x33ea7
at wasm://wasm/00358752:wasm-function[1067]:0x99a81
[2025-10-09T19:23:49+00:00] [rndr] [error] Got error event from worker: {"event":{"isTrusted":true},"name":"heic-convert-worker"}
[2025-10-09T19:23:49+00:00] [rndr] [error] Unhandled error: Uncaught RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
Link to the photo sample: https://drive.proton.me/urls/8EPZPR7A0C#aB5UEcwZ2ZHX
As a note worth looking into, I read through libvips/libvips#2677 and https://github.com/libvips/libvips/blob/064c36503d698dbece00b87d314d44ec978af859/libvips/foreign/heifload.c#L144 — there is an unlimited option for libheif to bypass security limits.
Version
v1.7.14
What product are you using?
Ente Photos
What platform are you using?
Desktop - Windows