GithubHelp home page GithubHelp logo

Comments (4)

tmikov avatar tmikov commented on May 3, 2024 1

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:

F(constexpr, gcheapsize_t, MaxHeapSize, 512 << 20) \

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.

from hermes.

mattbfb avatar mattbfb commented on May 3, 2024

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?

from hermes.

atoui-zahreddine avatar atoui-zahreddine commented on May 3, 2024

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
image

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.

from hermes.

atoui-zahreddine avatar atoui-zahreddine commented on May 3, 2024

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));

https://github.com/facebook/react-native/blob/0645c38014e8310d8e387dabc860c8c5878beb6e/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.java#L20

from hermes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.