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

React Native App crashes after splash screen when Hermes is enabled #69

Closed
tarasvakulka opened this issue Jul 29, 2019 · 13 comments
Closed
Labels
bug Something isn't working

Comments

@tarasvakulka
Copy link

React Native version:
0.60.4
Enabled Hermes

Crash on release android build after splash screen

07-29 14:06:59.334 21833 21833 F DEBUG : #00 pc 000000000001a170 /data/app/app.theMovieExpert-wKzSD-OkiRBPXzh7GD8Acw==/lib/arm64/libhermes.so (facebook::hermes::detail::hermesFatalErrorHandler(void*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, bool)+28)
07-29 14:07:00.136 749 749 I Zygote : Process 21790 exited due to signal (9)

@dulinriley dulinriley added the bug Something isn't working label Jul 29, 2019
@dulinriley
Copy link
Contributor

The hermesFatalErrorHandler should log the message it received into Logcat. Are there any more lines in the log before the process was killed with SIGKILL?

@tarasvakulka
Copy link
Author

07-30 09:43:42.911 13712 13712 I crash_dump64: performing dump of process 13463 (target tid = 13604)
07-30 09:43:42.929 13712 13712 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-30 09:43:42.929 13712 13712 F DEBUG : Build fingerprint: 'Sony/H4113'
07-30 09:43:42.929 13712 13712 F DEBUG : Revision: '0'
07-30 09:43:42.929 13712 13712 F DEBUG : ABI: 'arm64'
07-30 09:43:42.929 13712 13712 F DEBUG : pid: 13463, tid: 13604, name: mqt_js >>> app.theTest <<<
07-30 09:43:42.930 13712 13712 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
07-30 09:43:42.930 13712 13712 F DEBUG : Cause: null pointer dereference
07-30 09:43:42.930 13712 13712 F DEBUG : x0 0000000000000000 x1 000000738ad80160 x2 0000000000000000 x3 000000739d66cb80
07-30 09:43:42.930 13712 13712 F DEBUG : x4 000000739d66cb71 x5 000000739d66cbe1 x6 726f67657461635f x7 617373656d202c79
07-30 09:43:42.930 13712 13712 F DEBUG : x8 0000000000000000 x9 000000000000002a x10 652073617720657a x11 2964656465656378
07-30 09:43:42.930 13712 13712 F DEBUG : x12 614d203d20656761 x13 7320706165682078 x14 000000738a000000 x15 ffffffffffffffff
07-30 09:43:42.930 13712 13712 F DEBUG : x16 000000738b475718 x17 000000743c4bdeb0 x18 0000000000000010 x19 000000738ad801f8
07-30 09:43:42.930 13712 13712 F DEBUG : x20 0000000000000001 x21 0000000000000000 x22 000000738b478c28 x23 000000738b2e0154
07-30 09:43:42.930 13712 13712 F DEBUG : x24 0000000000000028 x25 000000738ad83588 x26 000000738ad803a8 x27 000000738ad803b8
07-30 09:43:42.930 13712 13712 F DEBUG : x28 000000738ad80690 x29 000000738ad801e0
07-30 09:43:42.930 13712 13712 F DEBUG : sp 000000738ad80130 lr 000000738b3e21d0 pc 000000738b2e0170
07-30 09:43:43.038 25414 13715 E a : process name :com.cleanmaster.mguard:service , process importance : 125
07-30 09:43:43.042 13712 13712 F DEBUG :
07-30 09:43:43.042 13712 13712 F DEBUG : backtrace:
07-30 09:43:43.042 13712 13712 F DEBUG : #00 pc 000000000001a170 /data/app/app.theMovieExpert-yZdXfZiuMSKr5e0mIUWYuw==/lib/arm64/libhermes.so (facebook::hermes::detail::hermesFatalErrorHandler(void*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, bool)+28)
07-30 09:43:43.042 13712 13712 F DEBUG : #01 pc 000000000011c1cc /data/app/app.theMovieExpert-yZdXfZiuMSKr5e0mIUWYuw==/lib/arm64/libhermes.so
07-30 09:43:43.042 13712 13712 F DEBUG : #2 pc 000000000011c0c4 /data/app/app.theMovieExpert-yZdXfZiuMSKr5e0mIUWYuw==/lib/arm64/libhermes.so
07-30 09:43:43.042 13712 13712 F DEBUG : #3 pc 00000000000f4fcc /data/app/app.theMovieExpert-yZdXfZiuMSKr5e0mIUWYuw==/lib/arm64/libhermes.so

@eliaslecomte
Copy link

Having the same issue, but only on non-debug builds.

@dulinriley
Copy link
Contributor

@tarasvakulka can you explain why you closed the issue?
Is the problem gone?

If you can, please provide some context here about how it was resolved so that anyone in the future with this issue will know what they should do.

@tarasvakulka
Copy link
Author

tarasvakulka commented Aug 16, 2019

@dulinriley, problem was not in hermes, my method array sort worked incorrect and hermesvm throw error, I refactor my code and now my problem solved

@Awaisqr
Copy link

Awaisqr commented Aug 16, 2019

I am facing this same issue, if hermes is disabled in android/build.gradle then my app works fine but if hermes is enabled then I get error after splash screen "maximum call stack reached, js engines hermes". Note: I have also run gradle clean

@jasonalmaturner
Copy link

It should be noted that there is a bug with the array sort function in Hermes. #95

I had an issue where my comparator callback function in an array sort was incorrect. JavaScript engines usually fallback to the default implementation in that case, but Hermes doesn't and gets stuck in an infinite loop. Pretty understandable bug on Hermes' part, especially considering how new it is. Fixing my comparator function solved the issue for me.

@tarasvakulka
Copy link
Author

@jasonalmaturner You are right, this is bug of Hermes, I hope Hermes team fix this in future, because I spent a lot of time to find this problem in infinity loop if Hermes is on

@tmikov
Copy link
Contributor

tmikov commented Oct 10, 2019

@tarasvakulka we realize that this is a problem and we are working on fixing it. Unfortunately it isn't a simple fix, but we will address it. Thank you for your understanding!

@davidcort
Copy link

I build my app bundle for Play Store with Helmet and only shows the splash, after crash.

@noway
Copy link

noway commented Dec 6, 2021

Should this issue be reopened? Fixing js is a workaround - it should just work.

@tmikov is there are version with a fix?

@neildhar
Copy link
Contributor

neildhar commented Dec 6, 2021

@noway Are you seeing infinite loops with inconsistent comparators in new versions of Hermes? The bug was fixed in 14685c8, which has been in Hermes since version 0.7.0

@noway
Copy link

noway commented Dec 6, 2021

@neildhar I'm on version 0.4.3

  "name": "hermes-engine",
  "version": "0.4.3",

Using react-native 0.62.3. I guess I just need to upgrade. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants