Allusion
Allusion copied to clipboard
Crashing to blank screen upon scanning Panoramas
Hey all, so I've been adding libraries to Allusion and come across a roadblock with larger resolution images being scanned in. Panoramas in a folder get partially loaded upon opening and then the software locks up and the UI disapears leaving just the blank background box. I can't open the dev console, and upon closing and reopening the same thing happens as its re-loading that same folder.
I am able to quickly get the dev tools open before it crashes and that box remains open, but it simply says
"Debugging connection was closed. Reason: Render process gone. Reconnect when ready by reopening DevTools."
I can see the latest files written are the temp thumbnail .webp files for 3 of the panoramas but then no more.
Running 1.0.0-rc7.2 on Win 10 (Latest updates)
hello! Sounds like it's getting overloaded while trying to generate the thumbnails, but it's hard to say exactly why without logs. Those must be pretty large images then, or maybe just a large amount of them. I just tried it out with a few high resolution images (6K to 8K) and it handles it fine, besides being a little slow with zooming in and out
We'll try again in the weekend, could you leave some more info in the mean time, like the resolution and image types in the folder?
I'm also running into this with decently sized images - given a folder with a hefty enough amount of 5K-8K jpegs I can reliably crash the renderer process if I get them all generating thumbnails at once (though several parallel generations don't seem to be a requirement, I still get a crash eventually even after modifying the app to only run one thumbnail generation worker that only generates one thumbnail at a time.)
Turning on all logging options doesn't really clear up much, the crash itself is somewhere in Chromium/Electron - somewhere along the way the OffscreenCanvas approach likes to occasionally barf on large images, I believe it actually barfs in createImageBitmap
from adding a bunch of extra console.debug
s, but I can't really debug further without building Electron from source which is a bit of an ordeal. I did however try rewriting the thumbnail generation to use sharp
, which not only alleviated the crashes but made it noticeably faster.
I then quickly ran into what you seem to have found before in https://github.com/allusion-app/Allusion/pull/365 - sharp
works fine in dev mode, but I ran into problems getting it working in a packaged build (at least on Windows.) This seems to be a known problem https://github.com/lovell/sharp/issues/2764 - I found a possible partial workaround, now included in a PR, but there may still be a better approach here.