Closed atoui-zahreddine closed 8 months ago
Does any of the error information presented (either via the RN app, or adb log) give an indication of the amount of memory being used?
Additionally, I see you're on quite an old version (RN 0.64.4), which makes it trickier to investigate issues. Does this issue still occur on current versions?
Sorry I forgot to mention the error message from google play console :
[split_config.arm64_v8a.apk!libhermes.so] facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) SIGABRT
the majority of the crashes happens on Samsung devices .
I couldn't upgrade the project to current versions because It's needs a lot of work on the third party libraries since the project is quite old.
I'm not sure about how I can reproduce the issue, it will very helpful if you guide please.
This error message indicates that you have attempted to allocate more memory than the configured Hermes GC heap size, so it usually indicates a problem in user code not an engine bug. The heap size is configured using RuntimeConfig/GCConfig.
For Hermes 0.7.2: https://github.com/facebook/hermes/blob/22af9a393845089460afc8322f3c40fb28fc0bce/public/hermes/Public/GCConfig.h#L102
As you can see the default is 512MB, which is probably low these days. However React Native is potentially overwriting the value here: https://github.com/facebook/react-native/blob/0645c38014e8310d8e387dabc860c8c5878beb6e/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp#L45
Which seems to be called from here with 1GB size: https://github.com/facebook/react-native/blob/0645c38014e8310d8e387dabc860c8c5878beb6e/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.java#L20
You can try changing these values.
Please, keep in mind that, as our issue template states, we are unable to help debug problems with previous Hermes versions , and we are not experts on React Native, so we can't debug React Native issues at all.
Thanks a lot, this is more then helpful, I'll try to change these values and see if the crash still occurs .
UPDATE : After changing the value to 3gb ( which is unlimited ) the crash is gone
- this(new RuntimeConfig(1024));
+ this(new RuntimeConfig(3072));
Bug Description
gradle clean
and confirmed this bug does not occur with JSCHermes git revision (if applicable): 0.7.2 React Native version: 0.64.4 OS: Android 12 + Platform : arm64-v8a
Steps To Reproduce
code example:
The Expected Behavior
Google Play Console stack trace :
My build.gradle :