Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG Images in sitemaps exhausting memory and crashing #817

Closed
digitaldan opened this issue Sep 14, 2024 · 1 comment · Fixed by #818
Closed

SVG Images in sitemaps exhausting memory and crashing #817

digitaldan opened this issue Sep 14, 2024 · 1 comment · Fixed by #818

Comments

@digitaldan
Copy link
Contributor

So in recent V2 builds, when i load a sitemap up with SVG images, many don't render and quickly cause the app to crash with a memory error. Looking at a profiler it seems like SVGKExporterUIImage is allocating GBs worth of memory for what are very tiny XML files. I'm not sure whats going on, i don't think we have touched this in a while. One thought i have is if its trying to scale the SVG up to some huge size due to something reporting a different / huge size of the bounding View ? PNG images work fine. I believe this is also fine in our V1 app, so a change to our code or maybe the SVGKit version is to blame. I also think this may have been there before the SwiftUI refactor.

I'll try poking around, but would appreciate help here too as i'm baffled.

digitaldan added a commit to digitaldan/openhab.ios that referenced this issue Sep 14, 2024
Fixes openhab#817

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
@digitaldan
Copy link
Contributor Author

So i'm not sure why its now starting to happen, but i think one of my old sitemap svg images is triggering this, but used to work ok on the older app. In any case i have a quick fix to at least prevent memory issue by not loading SVG that would render over a certain size.

digitaldan added a commit to digitaldan/openhab.ios that referenced this issue Sep 15, 2024
Fixes openhab#817

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant