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

in iOS 14 widgets I have crash with "Terminated due to memory error." #16

Open
Zalarudo opened this issue May 25, 2022 · 5 comments
Open

Comments

@Zalarudo
Copy link
Contributor

When I run my widget in iOS simulator I seems like ok, but when I run it in real device I have crash with "Terminated due to memory error." error in console. When I disable "FAText" its works fine (but without icons). I think this happens because the icons.json file weighs more than 14 megabytes and when lib trying to decode the file into an object it wastes a lot of memory. Do you think there is a way to solve this problem?
in my case I use only solid pro icons

@martyuiop
Copy link
Contributor

You could try editing the icons.json file to only include the icons you actually want to use. Haven't tried to use it (or anything else) with widgets but it does make sense that they wouldn't like such a massive resource in the bundle as they are supposed to be lightweight.

@mattmaddux
Copy link
Owner

My long-term goal has always been to do away with the run-time processing of the JSON file and do a code-generation script instead. That would certainly solve for problems like this.

@mickeyl
Copy link

mickeyl commented Jun 29, 2023

The newly introduced Macros come to mind…

@mattmaddux
Copy link
Owner

Interesting. I hadn't been watching the WWDC stuff very closely, but this looks promising at least. July has opened up for me so I will be exploring this a bit.

@kdo1234
Copy link
Contributor

kdo1234 commented Oct 7, 2023

I think you can address this by removing unused elements from icons.json

cat icons.json | jq 'del(.[] | .changes, .ligatures, .voted, .svg)'

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

No branches or pull requests

5 participants