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

OutOfMemory // App crashes on IOS when the filterComponent is rendered #134

Open
yannisdev opened this issue Dec 23, 2022 · 4 comments
Open

Comments

@yannisdev
Copy link

I am using expo EAS.

While the filters works flawlessly for the Android version of the app, when i tried to load an image with its filters on iOS 16.1, i get the following crash:

OutOfMemory
The OS most likely terminated your app because it overused RAM.

When comment out the FilterComponent the app does not crash.

The implementation i followed is the one described here

@Irfanwani
Copy link

Followed the same implementation and it works fine in development mode, but when building with eas, build fails.

Execution failed for task ':react-native-image-filter-kit:compileReleaseRenderscript'.

@yannisdev
Copy link
Author

yannisdev commented Jan 11, 2023

Followed the same implementation and it works fine in development mode, but when building with eas, build fails.

Execution failed for task ':react-native-image-filter-kit:compileReleaseRenderscript'.

@Irfanwani I am not sure if this is exactly the same case, but i had similar issues during the app building. They way to overcome these problems is by executing a pre-install script.

Inside package.json:

"scripts": {
    "eas-build-pre-install": "./pre-install"
}

Pre-install script:

#!/bin/bash

# This is a file called "pre-install" in the root of the project

if [[ "$EAS_BUILD_PLATFORM" == "android" ]]; then
  sudo apt install -y libncurses5
elif [[ "$EAS_BUILD_PLATFORM" == "ios" ]]; then
  brew install ncurses
fi

However, in my case, the app crashes on ios when i select an image and the filters are created. It works fine on android.

@Irfanwani
Copy link

Irfanwani commented Jan 11, 2023

@yannisdev I actually found the answer from the expo forums, and the answer is same as you said, but a small change,

"eas-build-pre-install": "sudo apt-get install --yes libncurses5"

As the error shows libncurses5 is missing. For now i am using for android only so maybe I will need this answer later.
BTW thanks for the reply

@pratikgehlott
Copy link

how can we fix this in react native project without expo?

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

3 participants