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

App Crash on Android OS 6 Samsung Galaxy S7 SM-G930FD (JSC Crash) 64 bit support A/libc: Fatal signal 11 (SIGSEGV) #24261

Closed
dishantwalia opened this issue Apr 2, 2019 · 187 comments

Comments

@dishantwalia
Copy link

@dishantwalia dishantwalia commented Apr 2, 2019

Bug Report
Crashed on launch
Crashed with only this error log traced on android logcat A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 20217.

To Reproduce
react-native run-android
and navigate to second screen from initial route through stack navigator. I am using React-Navigation 3.6
App crashes as soon as I start going into react-navigation and crashing in Samsung S7 64 bit CPU device, working fine in other android devices which I am using.

Expected Behavior
just to work in a stable manner. like in earlier react-native version 0.58

Environment
React Native Environment Info:
System:
OS: Mac OS mojave 10.14
Binaries:
npm: 6.4.1
Android Studio: Version 3.2.1
Android 6.0.1 (real device: Samsung S7 SM-G930FD)
React Native v0.59.3

Temporary Workaround:
When I removed 64 bit ndk filters "arm64-v8a", "x86_64" from ndk abiFilters in defaultConfig block of buidl.gradle by provide only 32 bit support.
It works fine.

 ndk {
            abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"  -> change to
            abiFilters "armeabi-v7a", "x86"
        }```
@dishantwalia dishantwalia changed the title App Crash on Android 6 (JSC Crash) App Crash on Android 6 (JSC Crash) 64 bit support A/libc: Fatal signal 11 (SIGSEGV) Apr 2, 2019
@dishantwalia dishantwalia changed the title App Crash on Android 6 (JSC Crash) 64 bit support A/libc: Fatal signal 11 (SIGSEGV) App Crash on Android OS 6 Samsung Galaxy S7 SM-G930FD (JSC Crash) 64 bit support A/libc: Fatal signal 11 (SIGSEGV) Apr 2, 2019
@react-native-bot

This comment has been minimized.

Copy link
Collaborator

@react-native-bot react-native-bot commented Apr 2, 2019

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@dishantwalia

This comment has been minimized.

Copy link
Author

@dishantwalia dishantwalia commented Apr 3, 2019

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

Updated

@dishantwalia

This comment has been minimized.

Copy link
Author

@dishantwalia dishantwalia commented Apr 3, 2019

Logcat Error Screenshot for reference Screenshot 2019-04-03 at 5 38 07 PM

@nadavmos

This comment has been minimized.

Copy link

@nadavmos nadavmos commented Apr 7, 2019

publishing 64bit split build I'm also getting this crash on launch on Galaxy S7 & Galaxy S7 Edge with Android 7.0
android vitals showing:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) WTFCrash
backtrace:
#00 pc 00000000007e048c /data/app/com.mosko.bus-1/lib/arm64/libjsc.so (WTFCrash+16)
#1 pc 00000000000be650 /data/app/com.mosko.bus-1/lib/arm64/libjsc.so (_Z16WTFCrashWithInfoiPKcS0_i+24)
#2 pc 0000000000489f2c /data/app/com.mosko.bus-1/lib/arm64/libjsc.so (operationLinkDirectCall+1120)
#3 pc 000000000019e27c

on Crashlytics for those devices I'm getting:
Fatal Exception: com.facebook.react.common.c
Invariant Violation: Resuming work not yet implemented.

the workaround of only providing 32bit build is solving this for now

@nsantacruz

This comment has been minimized.

Copy link

@nsantacruz nsantacruz commented Apr 8, 2019

I'm seeing the exact same errors as @nadavmos on Galaxy S7 running Android 7.0. The app is crashing at startup

@nadavmos

This comment has been minimized.

Copy link

@nadavmos nadavmos commented Apr 8, 2019

I'm seeing the exact same errors as @nadavmos on Galaxy S7 running Android 7.0. The app is crashing at startup

@nsantacruz are you also using react-navigation? seems common to all other reporters

@nsantacruz

This comment has been minimized.

Copy link

@nsantacruz nsantacruz commented Apr 8, 2019

@nadavmos, I'm not using react-navigation. This very well maybe the same issue as #24260 since that issue is also affecting 0.59 with Samsung S7 on Android 7.0

@ishantsagar

This comment has been minimized.

Copy link

@ishantsagar ishantsagar commented Apr 8, 2019

@nadavmos The crash is not related to react-navigation, in-fact the app is crashing on a fresh RN Project created via react-native init.

@ishantsagar

This comment has been minimized.

Copy link

@ishantsagar ishantsagar commented Apr 9, 2019

@hramos @mkonicek As of now we can conclude that this seems to be an issue with latest RN 0.59 release, affecting android builds running on Samsung S7, S7 Edge after we provided support for arm64-v8a, x86_64, removing them from build.gradle does not crash the app, which could potentially affect apps going live after 1 August 2019 as per Google Play 64 bit support policy. We would like you guys to draw some attention to it, please?

@Merikw

This comment has been minimized.

Copy link

@Merikw Merikw commented Apr 11, 2019

Also happening on 0.58.5. Galaxy S7. Android 6.0. Setting it to 32 bit build is also not working.

@wbercx

This comment has been minimized.

Copy link

@wbercx wbercx commented Apr 15, 2019

We're observing the same crashes on 64 bit builds of RN 0.59.4 on a Galaxy S7 running Android 7.0. Sadly we don't have access to that model of device. It works fine on all of ours.

@taschik

This comment has been minimized.

Copy link

@taschik taschik commented Apr 15, 2019

Having the same issue with Huawai P9 device under the following environment:

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
      Memory: 63.57 MB / 32.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 11.3.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 26, 27, 28
        Build Tools: 23.0.1, 25.0.0, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3
        System Images: android-24 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.2/10E125 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.3 => 16.8.3
      react-native: ^0.59.4 => 0.59.4
    npmGlobalPackages:
      eslint-plugin-react-native: 3.5.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

This is the Crashlytics stack trace we get:


# Platform: android
# Issue ID: 5beec130f8b88c29632f185d
# Session ID: 5cb483b90037000127d26eeee3e996f5_DNE_0_v2
# Date: 2019-04-15T13:15:00Z
# OS Version: 7.0
# Device: PRA-LX1
# RAM Free: 1.3%
# Disk Free: 14.3%

#0. Crashed: Thread
0  (Missing)                              0xc00d9b20 (Missing)
1  (Missing)                              0x3ffffffd (Missing)
2  libc.so                                0xeda60d64 (Missing)
3  (Missing)                              0x3fdec95c (Missing)
4  libc.so                                0xeda3223f (Missing)
5  libutils.so                            0xee283df1 (Missing)
6  (Missing)                              0xea6ac55a (Missing)
7  libart.so                              0xebc85331 (Missing)
8  (Missing)                              0x12dfd11e (Missing)
9  (Missing)                              0x12da927e (Missing)
10 system@framework@boot-framework.oat    0x74d6de0d (Missing)
11 (Missing)                              0x3fdec95c (Missing)
12 (Missing)                              0x12f39976 (Missing)
13 (Missing)                              0x12c2064e (Missing)
14 (Missing)                              0x70e43ada (Missing)
15 (Missing)                              0x12f43b8e (Missing)
16 libart.so                              0xebc85331 (Missing)
17 (Missing)                              0x70d268be (Missing)
18 system@framework@boot.oat              0x716279db (Missing)
19 (Missing)                              0x70837262 (Missing)
20 (Missing)                              0x70190306 (Missing)
21 (Missing)                              0x2cb6ab0c (Missing)
22 (Missing)                              0x70d58d82 (Missing)
23 (Missing)                              0x2cb6ab0c (Missing)
24 (Missing)                              0x2cb6ab0c (Missing)
25 (Missing)                              0x70c63cee (Missing)
26 (Missing)                              0x12c2064e (Missing)
27 (Missing)                              0x70e43ada (Missing)
28 (Missing)                              0x12f43c1e (Missing)
29 libart.so                              0xebca3526 (Missing)
30 (Missing)                              0x3fdec95c (Missing)
31 (Missing)                              0x70e43ada (Missing)
32 (Missing)                              0x70e43ada (Missing)
33 (Missing)                              0x12f39976 (Missing)
34 (Missing)                              0x12f43b8e (Missing)
35 libart.so                              0xebc85331 (Missing)
36 (Missing)                              0x70d268e2 (Missing)
37 (Missing)                              0x3fdec95c (Missing)
38 libutils.so                            0xee283ced (Missing)
39 (Missing)                              0x70abe4f6 (Missing)
40 (Missing)                              0x70aadb2e (Missing)
41 libandroid_runtime.so                  0xecdb23ff (Missing)
42 (Missing)                              0x70abe4f6 (Missing)
43 (Missing)                              0x12c2fa8e (Missing)
44 system@framework@boot-framework.oat    0x749d1865 (Missing)
45 (Missing)                              0x12c2fa8e (Missing)
46 system@framework@boot-framework.oat    0x741f0347 (Missing)
47 (Missing)                              0x70d3b9ca (Missing)
48 (Missing)                              0x12c2fa8e (Missing)
49 (Missing)                              0x12c2fa8e (Missing)
50 (Missing)                              0x70abe4f6 (Missing)
51 (Missing)                              0x70aadb2e (Missing)

--

#0. Crashed: Thread
0  (Missing)                              0xc00d9b20 (Missing)
1  (Missing)                              0x3ffffffd (Missing)
2  libc.so                                0xeda60d64 (Missing)
3  (Missing)                              0x3fdec95c (Missing)
4  libc.so                                0xeda3223f (Missing)
5  libutils.so                            0xee283df1 (Missing)
6  (Missing)                              0xea6ac55a (Missing)
7  libart.so                              0xebc85331 (Missing)
8  (Missing)                              0x12dfd11e (Missing)
9  (Missing)                              0x12da927e (Missing)
10 system@framework@boot-framework.oat    0x74d6de0d (Missing)
11 (Missing)                              0x3fdec95c (Missing)
12 (Missing)                              0x12f39976 (Missing)
13 (Missing)                              0x12c2064e (Missing)
14 (Missing)                              0x70e43ada (Missing)
15 (Missing)                              0x12f43b8e (Missing)
16 libart.so                              0xebc85331 (Missing)
17 (Missing)                              0x70d268be (Missing)
18 system@framework@boot.oat              0x716279db (Missing)
19 (Missing)                              0x70837262 (Missing)
20 (Missing)                              0x70190306 (Missing)
21 (Missing)                              0x2cb6ab0c (Missing)
22 (Missing)                              0x70d58d82 (Missing)
23 (Missing)                              0x2cb6ab0c (Missing)
24 (Missing)                              0x2cb6ab0c (Missing)
25 (Missing)                              0x70c63cee (Missing)
26 (Missing)                              0x12c2064e (Missing)
27 (Missing)                              0x70e43ada (Missing)
28 (Missing)                              0x12f43c1e (Missing)
29 libart.so                              0xebca3526 (Missing)
30 (Missing)                              0x3fdec95c (Missing)
31 (Missing)                              0x70e43ada (Missing)
32 (Missing)                              0x70e43ada (Missing)
33 (Missing)                              0x12f39976 (Missing)
34 (Missing)                              0x12f43b8e (Missing)
35 libart.so                              0xebc85331 (Missing)
36 (Missing)                              0x70d268e2 (Missing)
37 (Missing)                              0x3fdec95c (Missing)
38 libutils.so                            0xee283ced (Missing)
39 (Missing)                              0x70abe4f6 (Missing)
40 (Missing)                              0x70aadb2e (Missing)
41 libandroid_runtime.so                  0xecdb23ff (Missing)
42 (Missing)                              0x70abe4f6 (Missing)
43 (Missing)                              0x12c2fa8e (Missing)
44 system@framework@boot-framework.oat    0x749d1865 (Missing)
45 (Missing)                              0x12c2fa8e (Missing)
46 system@framework@boot-framework.oat    0x741f0347 (Missing)
47 (Missing)                              0x70d3b9ca (Missing)
48 (Missing)                              0x12c2fa8e (Missing)
49 (Missing)                              0x12c2fa8e (Missing)
50 (Missing)                              0x70abe4f6 (Missing)
51 (Missing)                              0x70aadb2e (Missing)
@gpetrosyan

This comment has been minimized.

Copy link

@gpetrosyan gpetrosyan commented Apr 16, 2019

Having the same issue with Samsung Galaxy S7, on Android 7

ASSERT|04-17 00:30:16.272|18763|18813||libc|Fatal signal 11 (SIGSEGV), code 1, fault addr 0xbbadbeef in tid 18813 (mqt_js)
ASSERT|04-17 00:30:16.402|18920|18920||DEBUG|Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS1DQHF:user/release-keys'
ASSERT|04-17 00:30:16.402|18920|18920||DEBUG|*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
ASSERT|04-17 00:30:16.405|18920|18920||DEBUG|ABI: 'arm64'
ASSERT|04-17 00:30:16.405|18920|18920||DEBUG|Revision: '8'
ASSERT|04-17 00:30:16.406|18920|18920||DEBUG|pid: 18763, tid: 18813, name: mqt_js  >>> com.profibackoffice.reactnative <<<
ASSERT|04-17 00:30:16.406|18920|18920||DEBUG|signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbbadbeef
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x16  00000070110b1acc  x17  000000700bc121a8  x18  0000000021ecfc88  x19  000000700fed7e80
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x20  00000070108cf560  x21  0000006ffd4c8070  x22  000000700bc00000  x23  0000006ff9616ca0
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x28  ffff000000000002  x29  00000070108cf560  x30  0000007011408484
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x24  0000000000000007  x25  0000000000000000  x26  0000000000000000  x27  ffff000000000000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x8   00000000bbadbeef  x9   00000070114b19d0  x10  0000000000000000  x11  0000006ffc4f0000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x0   00000070108cf3c8  x1   00000070108cf3c8  x2   0000000000000000  x3   00000000000000a8
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    sp   00000070108cf400  pc   000000701140848c  pstate 00000000a0000000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x4   000000700bfaee80  x5   0000006ff62a4980  x6   0000006ffa6a6820  x7   0000000000000000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG|    x12  0000000000000000  x13  000000700b617c00  x14  0000000000000002  x15  00000000bd36143d
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG|backtrace:
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG|    #03 pc 00000000001afe80  <anonymous:000000700bdff000>
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG|    #02 pc 0000000000489f2c  /data/app/com.profibackoffice.reactnative-1/lib/arm64/libjsc.so (operationLinkDirectCall+1120)
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG|    #01 pc 00000000000be650  /data/app/com.profibackoffice.reactnative-1/lib/arm64/libjsc.so (_Z16WTFCrashWithInfoiPKcS0_i+24)
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG|    #00 pc 00000000007e048c  /data/app/com.profibackoffice.reactnative-1/lib/arm64/libjsc.so (WTFCrash+16)
@AndrewJack

This comment has been minimized.

Copy link
Contributor

@AndrewJack AndrewJack commented Apr 16, 2019

Adding this to your android/app/build.gradle may fix it (It didn't):

packagingOptions {
      pickFirst '**/libjsc.so'
      pickFirst '**/libc++_shared.so'
}

See react-native-community/jsc-android-buildscripts#95

@gpetrosyan

This comment has been minimized.

Copy link

@gpetrosyan gpetrosyan commented Apr 16, 2019

@taschik

This comment has been minimized.

Copy link

@taschik taschik commented Apr 16, 2019

Adding this to your android/app/build.gradle may fix it:

packagingOptions {
      pickFirst '**/libjsc.so'
      pickFirst '**/libc++_shared.so'
}

See react-native-community/jsc-android-buildscripts#95

I'm testing this now.

@AndrewJack was it working for you?

@wbercx

This comment has been minimized.

Copy link

@wbercx wbercx commented Apr 17, 2019

Adding this to your android/app/build.gradle may fix it:

packagingOptions {
      pickFirst '**/libjsc.so'
      pickFirst '**/libc++_shared.so'
}

See react-native-community/jsc-android-buildscripts#95

I'm testing this now.

Sadly we already had those in there.

We have pulled our 64-bit builds from the Play Store. This may not be related at all to the crash in the 64bit build, but Galaxy S7 devices running the armeabi-v7a build are now crashing a lot as per the below. Immediately upon startup.

Really wondering what is so different about the S7 compared to other devices.

Version Code: 10000036
Version Name: 2.3.4
Android: 8.0.0
Android Build: R16NW
Manufacturer: samsung
Model: SM-G930F
Date: undefined

com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type `double', but had type `null'
  at com.facebook.react.bridge.ReadableNativeMap.getIntNative
  at com.facebook.react.bridge.ReadableNativeMap.getInt
  at com.facebook.react.g.a.a
  at com.facebook.react.modules.core.ExceptionsManagerModule.reportSoftException
  at java.lang.reflect.Method.invoke(Method.java:-2)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke
  at com.facebook.react.bridge.JavaModuleWrapper.invoke
  at com.facebook.react.bridge.queue.NativeRunnable.run
  at android.os.Handler.handleCallback(Handler.java:789)
  at android.os.Handler.dispatchMessage(Handler.java:98)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
  at android.os.Looper.loop(Looper.java:164)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run
  at java.lang.Thread.run(Thread.java:764)

@AndrewJack

This comment has been minimized.

Copy link
Contributor

@AndrewJack AndrewJack commented Apr 17, 2019

@taschik It didn't work, I thought correcting the jsc-android-buildscripts config might work.

@SpertsyanKM

This comment has been minimized.

Copy link

@SpertsyanKM SpertsyanKM commented Apr 18, 2019

I'm getting the same exception and it can't be caught by uncaught exception handler. In my Android app I've tried this code:

Thread.setDefaultUncaughtExceptionHandler(...);

with handler, which only writes exception name to console and then returns control to default handler, but that code hadn't been executed before the app crash.

I was trying to investigate, why Crashlytics doesn't log this exceptions. Maybe that is the reason... I remember, that once or twice I've seen native crashes in my fabric console, so crashlytics is able to log native crashes, but somehow not in this case.

@AndrewJack

This comment has been minimized.

Copy link
Contributor

@AndrewJack AndrewJack commented Apr 18, 2019

@SpertsyanKM The crash occurs at the ndk level. You won't see the crash in the firebase console, unless you add the Crashlytics NDK library. https://docs.fabric.io/android/crashlytics/ndk.html

As you've found the Thread.setDefaultUncaughtExceptionHandler will only catch Java exceptions.

@taschik

This comment has been minimized.

Copy link

@taschik taschik commented Apr 19, 2019

I upgraded to RN 0.59.5 today and the crash still happens. This issue is not yet fixed.

@HelloJack0

This comment has been minimized.

Copy link

@HelloJack0 HelloJack0 commented Aug 20, 2019

@harryt2 @rogerkerse Thanks.
My situation is even worse. The released version has bugs, so I have to upgrade the 64 application. I can't solve this problem at the moment. I am also trying flutter, but not so fast complete replacement.

@YoranRoels

This comment has been minimized.

Copy link

@YoranRoels YoranRoels commented Aug 23, 2019

I actually went through the trouble of bumping React-Native to 0.60.5 and enabling Hermes + 64-bit (which was a pain, as upgrading react-native always is) and I'm still having these issues on several Android phones (including HUAWEI MYA-L41).

I've tried just about everything I've found in other threads without much luck, so I can tell you bumping react-native and using Hermes doesn't fix all of these issues.

The updated react-native + Hermes and 64-bit is amazing on other Android devices I've ran it on and our app has never felt smoother.

However, whenever I test on the specific device I mentioned (Huawei) it crashes instantly or after the app is open for 1-2 seconds without a specific crash message, I don't have any other devices besides that one and a newer Huawei (which works perfectly) so I can't give you more info on other phones.

If anyone has made any progress with this issue or has any ideas for more specifically logging my issues, advice is always welcome and I'm willing to share any information regarding this issue.
Thanks to the people in this thread for offering solutions, but no luck so far. 🙂

@armenbadalyan

This comment has been minimized.

Copy link

@armenbadalyan armenbadalyan commented Aug 23, 2019

@YoranRoels Have you tried running a clean app created by react-native init? I wonder whether the crash is caused by RN itself or some library or code you've written.

@YoranRoels

This comment has been minimized.

Copy link

@YoranRoels YoranRoels commented Aug 23, 2019

@armenbadalyan Thanks for the swift response.

I just set up a new project and tried running it on the device and everything seems well, so in the end it does seem like something with my setup. Is there an efficient way to debug this since my logcat doesn't spew out anything useful besides com.<our_app_id> has been killed?

@GreanBeetle

This comment has been minimized.

Copy link

@GreanBeetle GreanBeetle commented Aug 26, 2019

React Native 59.10 does not solve it for us either. App still crashes on first launch.

@j-wang

This comment has been minimized.

Copy link

@j-wang j-wang commented Aug 27, 2019

@GreanBeetle See #25494. 0.59.10, unfortunately, is known at this point to not fix this problem in all cases.

The most up-to-date path is to use (as in this thread), 0.60+ and Hermes.

@YoranRoels Get the tombstone from the device. See: #24261 (comment)

@manuhook

This comment has been minimized.

Copy link

@manuhook manuhook commented Aug 27, 2019

@GreanBeetle You can use V8 engine on 0.59.10 to get rid of this problem
https://github.com/Kudo/react-native-v8

@GreanBeetle

This comment has been minimized.

Copy link

@GreanBeetle GreanBeetle commented Aug 27, 2019

Thanks @j-wang. @manuhook going to give your solution a shot.

@tanx

This comment has been minimized.

Copy link

@tanx tanx commented Aug 27, 2019

@GreanBeetle You can use V8 engine on 0.59.10 to get rid of this problem
https://github.com/Kudo/react-native-v8

Can confirm that this solved the issue for us. 64 bit builds with react-native-v8 on 0.59.10 are not crashing anymore and we can finally push updates again on Google Play. Thank you!

@YoranRoels

This comment has been minimized.

Copy link

@YoranRoels YoranRoels commented Aug 27, 2019

I tried the tombstone logging @j-wang mentioned but I've never really used that and it was an immense file which was hard to read, after searching for a while I didn't really seem to find a readable root cause.

After taking the advice of @armenbadalyan, I started wondering if it just wasn't something silly in the start of our app and sure enough when removing the first component's UI, I noticed that the app was running again, stable. So after more digging I noticed that a specific component was given issues where an Image was rendered.

In that component there is a chance that we pass null as the source variable on a react-native Image. Took me a while to look for this an no real clear errors but this finally fixed everything for me and it's running on all our test devices. Still no clue why it didn't fail on our other test device...

Might help other people to simplify the first component of their app to make sure it's not crashing on that code.

TL;DR: This is probably completely off-topic by now, but to whom it concerns: DON'T USE null AS THE source VARIABLE OF Image, it doesn't work on all devices. 😅

bemaverick added a commit to bemaverick/react-native-phone-input that referenced this issue Aug 29, 2019
@nguyen95

This comment has been minimized.

Copy link

@nguyen95 nguyen95 commented Sep 12, 2019

@harryt2 yes, me too. I got a huge spike in ANRs after upgraded to RN 0.60.+

@ivanfranchi

This comment has been minimized.

Copy link

@ivanfranchi ivanfranchi commented Sep 16, 2019

A little help to the ones still trying to address the startup crash:

  1. run adb logcat in a console
  2. wait for the console spam to stop
  3. open the crashing app on your device
  4. stop the adb logcat with a Ctrl+c
  5. scroll up and find the crash

It doesn't solve the problem but let you find out something more. I've 2 apps, one is working well with the 64 bit, still struggling on the other one even if they've the same configuration. My crashing device is a One Plus 5t (64 bit)

@msspshaw

This comment has been minimized.

Copy link

@msspshaw msspshaw commented Sep 20, 2019

I've just seen this on a new release of our App, building with RN 59.10, specifically on a Samsung Galaxy Note9 on Android 9. Anyone else seeing a similar issue?

@j-wang

This comment has been minimized.

Copy link

@j-wang j-wang commented Sep 20, 2019

@msspshaw As mentioned above and in the other issue, yes. The new JSC freezes/crashes randomly on certain Android devices because it gets non-deterministically garbage collected—then the entire app crashes.

The solution is to upgrade to 0.60+ and use Hermes, or switch out JSC for v8.

@moneymc

This comment has been minimized.

Copy link

@moneymc moneymc commented Sep 30, 2019

I tried the tombstone logging @j-wang mentioned but I've never really used that and it was an immense file which was hard to read, after searching for a while I didn't really seem to find a readable root cause.

After taking the advice of @armenbadalyan, I started wondering if it just wasn't something silly in the start of our app and sure enough when removing the first component's UI, I noticed that the app was running again, stable. So after more digging I noticed that a specific component was given issues where an Image was rendered.

In that component there is a chance that we pass null as the source variable on a react-native Image. Took me a while to look for this an no real clear errors but this finally fixed everything for me and it's running on all our test devices. Still no clue why it didn't fail on our other test device...

Might help other people to simplify the first component of their app to make sure it's not crashing on that code.

TL;DR: This is probably completely off-topic by now, but to whom it concerns: DON'T USE null AS THE source VARIABLE OF Image, it doesn't work on all devices. 😅

+1 Works for me. I had same problems. Thank you!

@BracketMan

This comment has been minimized.

Copy link

@BracketMan BracketMan commented Oct 7, 2019

Also see it happening on a Samsung Galaxy S7 IO-IL 086 on Android 7.0 RN 0.59.10

@EmilScherdin

This comment has been minimized.

Copy link

@EmilScherdin EmilScherdin commented Oct 7, 2019

@BracketMan Are you using V8 instead of JSC?

@BracketMan

This comment has been minimized.

Copy link

@BracketMan BracketMan commented Oct 7, 2019

@EmilScherdin ahhh no, I am not. Will give it a shot and report back thanks.

@BracketMan

This comment has been minimized.

Copy link

@BracketMan BracketMan commented Oct 8, 2019

@EmilScherdin I can confirm that running on V8 on RN 0.59.10 is working for me, no more crashes.

Thanks!

@mmamoyco

This comment has been minimized.

Copy link

@mmamoyco mmamoyco commented Oct 11, 2019

We experience the same issue on RN 0.59.10 with v8. I see that JIT is not disabled for arm64-v8a and on devices with this architecture we have crashes.

@Kudo

This comment has been minimized.

Copy link
Contributor

@Kudo Kudo commented Oct 15, 2019

@mmamoyco Do you have the stacktrace of the crash from V8?

@AmandeepSingh06

This comment has been minimized.

Copy link

@AmandeepSingh06 AmandeepSingh06 commented Oct 25, 2019

@Kudo Yeah I do have the crash log. We have shifted to v8 from jsc because we were experiencing a lot of crashes. But the same is happening using v8. below is the log

#00 pc 0000000000c31dd8 /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so
#1 pc 0000000000c3437c /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so
#2 pc 0000000000c30554 /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so
#3 pc 0000000000c33070 /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so
#4 pc 0000000000bf2e94 /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so (v8::internal::ItemParallelJob::Task::RunInternal()+24)
#5 pc 0000000000a4d660 /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so (v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()+56)
#6 pc 0000000000a4a074 /data/app/my.app.id-a42vFQTz2lrEJMUnXdYsYA==/lib/arm64/libv8.so
#7 pc 0000000000067ec4 /system/lib64/libc.so (__pthread_start(void*)+36)
#8 pc 000000000001f2f4 /system/lib64/libc.so (__start_thread+68)

@sotownsend

This comment has been minimized.

Copy link

@sotownsend sotownsend commented Oct 30, 2019

We had this exact issue on 0.59.1 and were able to fix it by doing the following:

⛄️ These directions are not the same as on the jsc-android README. We've modified version numbers and some signifiers. The canary version of jsc does not fix the issue. It's the version after jsc-android@canary that's needed, see: This Patch for the original fix that was merged into the react-native repo. Thanks to @ravali121 for helping solve this.

  1. Add jsc-android to the "dependencies" section in your package.json:
dependencies {
   ...
+  "jsc-android": "^245459.0.0",
   ...
}

then run npm install or yarn (depending on which npm client you use) in order for the new dependency to be installed in node_modules

  1. Modify android/build.gradle file to add the new local maven repository packaged in the jsc-android package to the search path:
allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
+       maven {
+           // Local Maven repo containing AARs with JSC library built for Android
+           url "$rootDir/../node_modules/jsc-android/dist"
+       }
    }
}
  1. Update your app's build.gradle file located in android/app/build.gradle to add the JSC dependency. Please make sure the dependency is before the React Native dependency.
dependencies {
+   // Make sure to put android-jsc at the top
+   implementation 'org.webkit:android-jsc:+'
    compile fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
}
  1. Update your app's build.gradle file located in android/app/build.gradle to use first matched JSC library.
android {
    // ...
+   packagingOptions {
+       pickFirst '**/armeabi-v7a/libc++_shared.so'
+       pickFirst '**/x86/libc++_shared.so'
+       pickFirst '**/x86_64/libc++_shared.so'
+       pickFirst '**/arm64-v8a/libc++_shared.so'
+       pickFirst '**/libjsc.so'
+    }
}
@pengcao1

This comment has been minimized.

Copy link

@pengcao1 pengcao1 commented Nov 11, 2019

could anybody help to answer this question?
react-native-community/jsc-android-buildscripts#127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.