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

[1.3.0] Crash on Android when start #134

Closed
ngocle2497 opened this issue Sep 6, 2021 · 11 comments
Closed

[1.3.0] Crash on Android when start #134

ngocle2497 opened this issue Sep 6, 2021 · 11 comments

Comments

@ngocle2497
Copy link
Contributor

I get this error when run android:
Fatal signal 6 (SIGABRT), code -6 in tid 6226 (create_react_co)
React Native: 0.64.2
mmkv: 1.3.0

enableHermes: true

@mrousavy
Copy link
Owner

mrousavy commented Sep 6, 2021

There are no logs attached here, no reproduceable sample code, and the code -6 doesn't tell me anything.

Also it seems like this is a duplicate of #88, #122, #111 or #98

@mrousavy mrousavy closed this as completed Sep 6, 2021
@yfunk
Copy link
Contributor

yfunk commented Sep 6, 2021

@mrousavy Same issue for me with 1.3.0 on React Native 0.64.2 Hermes when running the app on Android

[...] 10:13:16.338 [...] I/ReactNativeJNI: Inspector::Inspector transitioning to initial state RunningDetached
[...] 10:13:16.339 [...] I/MMKV: <MMKV.cpp:156::initialize> version v1.2.10, page size 4096, arch x86_64
[...] 10:13:16.339 [...] I/MMKV: <MMKV.cpp:198::initializeMMKV> root dir: /data/user/0/com.myapp/files/mmkv
[...] 10:13:16.339 [...] I/HermesVM: HermesRuntimeImpl::call: Unable to call function: stack overflow
[...] 10:13:16.340 [...] E/libc++abi: terminating with uncaught exception of type facebook::jsi::JSINativeException
[...] 10:13:16.340 [...] A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7013 (create_react_co), pid 6966 (om.myapp)

The error occurs even without importing or calling anything from the library, so most likely it is somehow related to setup (here?). I'm not using any remote debugger and followed the installation instructions (with Reanimated).

I'll create a minimal repro later can you reopen this issue or should I create a new one or post to an existing one? and comment on #122.

@ngocle2497
Copy link
Contributor Author

i get this error

2021-09-06 16:16:02.233 11249-11303/com.app0642 I/ReactNativeJNI: Inspector::Inspector transitioning to initial state RunningDetached
2021-09-06 16:16:02.234 11249-11302/com.app0642 I/MMKV: <MMKV.cpp:156::initialize> version v1.2.10, page size 4096, arch x86
2021-09-06 16:16:02.234 11249-11302/com.app0642 I/MMKV: <MMKV.cpp:198::initializeMMKV> root dir: /data/user/0/com.app0642/files/mmkv
2021-09-06 16:16:02.234 11249-11302/com.app0642 I/HermesVM: HermesRuntimeImpl::call: Unable to call function: stack overflow
    
    --------- beginning of crash
2021-09-06 16:16:02.235 11249-11302/com.app0642 A/libc: /buildbot/src/googleplex-android/ndk-release-r20/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type facebook::jsi::JSINativeException: HermesRuntimeImpl::call: Unable to call function: stack overflow" failed
2021-09-06 16:16:02.236 11249-11302/com.app0642 A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 11302 (create_react_co)

@ngocle2497
Copy link
Contributor Author

Although without hermes and reanimated, it still crash on Android

@mrousavy
Copy link
Owner

mrousavy commented Sep 6, 2021

@hngocl again, there's no reproduceable code here.

@mrousavy
Copy link
Owner

mrousavy commented Sep 6, 2021

I don't know why this error keeps happening, but I know that it's fixed if you upgrade to RN 0.65.1.

If you can't upgrade, I'd gladly accept any PRs that fix this issue. I've tried asking the hermes team here: facebook/hermes#587 but this error also happens on JSC.

@ngocle2497
Copy link
Contributor Author

@mrousavy sorry about this error message, but i only get it on logcat of android studio. here you can see it.
image

I can't upgrade to 0.65.1, some library not working with it. i think i'll wait for new version of other library before upgrade

@ngocle2497
Copy link
Contributor Author

my step to crash:

  • run cmd: npx react-native init App0642 --version 0.64.2
  • cd App0642 && yarn add react-native-mmkv
  • open app with Android Studio then follow installation step (react-native-mmkv)
  • run app

@justblender
Copy link

+1 to this issue. Experiencing same issues after just installing react-native-mmkv and updating my MainApplication to use the overridden JSI module package class.

@mrousavy
Copy link
Owner

mrousavy commented Sep 7, 2021

While I already spent way too much of my free time on this issue to fix the crash for random people on the internet, I spent some more time on this yesterday and finally fixed it. Check out 1.3.1. 🎉🎉🎉🎉

If you appreciate my efforts, please consider buying me a coffee for my next late-night debug session: ❤️ GitHub sponsors

@henrhie
Copy link

henrhie commented Oct 30, 2021

Hey man, I am having a similar issue with a library I'm working on. Could you point out where the issue lies? Would really appreciate it.

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