[Android] Native crash on React Native 0.65-rc3 / reanimated 2.3 alpha 2
See original GitHub issueDescription
The application ends up crashing after a few seconds of use with an issue seemingly originated in libreanimated.so:
react-native-reanimated@^2.3.0-alpha.2:
react-native@^0.65.0-rc.3
The logs are from a simulator but it also happens on device. Please do let me know if I can provide you with any more debug info.
The crash:
tombstoned: received crash request for pid 16158
crash_dump64: performing dump of process 15998 (target tid = 16158)
DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
DEBUG : Build fingerprint: 'google/sdk_gphone_x86_64/generic_x86_64_arm64:11/RSR1.201211.001/7027799:user/release-keys'
DEBUG : Revision: '0'
DEBUG : ABI: 'x86_64'
DEBUG : Timestamp: 2021-08-04 16:45:05+0100
DEBUG : pid: 15998, tid: 16158, name: hades >>> com.getpaired.app <<<
DEBUG : uid: 10160
DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
DEBUG : Abort message: 'terminating with uncaught exception of type std::runtime_error: Unable to retrieve jni environment. Is the thread attached?'
DEBUG : rax 0000000000000000 rbx 0000000000003e7e rcx 000077e3ffd1d2a8 rdx 0000000000000006
DEBUG : r8 0000000000000000 r9 0000000000000000 r10 000077e10f8f9fd0 r11 0000000000000246
DEBUG : r12 000077e10f8fa1c0 r13 0000003000000008 r14 000077e10f8f9fc8 r15 0000000000003f1e
DEBUG : rdi 0000000000003e7e rsi 0000000000003f1e
DEBUG : rbp 000077e10f8fa660 rsp 000077e10f8f9fb8 rip 000077e3ffd1d2a8
DEBUG : backtrace:
DEBUG : #00 pc 000000000005a2a8 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+24) (BuildId: 3707c39fc397eeaa328142d90b50a973)
DEBUG : #01 pc 000000000005d212 /apex/com.android.runtime/lib64/bionic/libc.so (abort+194) (BuildId: 3707c39fc397eeaa328142d90b50a973)
DEBUG : #02 pc 00000000000a729b /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64/libc++_shared.so (BuildId: 013d16f5e2afb684dc5c7ebda3499fd97205ac47)
DEBUG : #03 pc 00000000000a745d /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64/libc++_shared.so (BuildId: 013d16f5e2afb684dc5c7ebda3499fd97205ac47)
DEBUG : #04 pc 00000000000bd4d2 /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64/libc++_shared.so (BuildId: 013d16f5e2afb684dc5c7ebda3499fd97205ac47)
DEBUG : #05 pc 00000000000bd468 /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64/libc++_shared.so (std::terminate()+40) (BuildId: 013d16f5e2afb684dc5c7ebda3499fd97205ac47)
DEBUG : #06 pc 00000000000d1b5e /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64/libreanimated.so (BuildId: 62098f20cee9b154bcc6f0be2e58717a622f9f32)
Previous logs from application launch:
15998 15998 W m.getpaired.ap: Unexpected CPU variant for X86 using defaults: x86_64
D SoLoader: init start
D SoLoader: adding system library source: /vendor/lib64
D SoLoader: adding system library source: /system/lib64
D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64 flags = 0]
D SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.getpaired.app/lib-main flags = 1]
D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/~~lmq3je1BbxNWbJtPz5Bjig==/com.getpaired.app-inlOIcjHWLG8qEZZwKEhfg==/lib/x86_64 flags = 0]
D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.getpaired.app/lib-main flags = 1]
V fb-UnpackingSoSource: locked dso store /data/user/0/com.getpaired.app/lib-main
V fb-UnpackingSoSource: deps mismatch on deps store: regenerating
V fb-UnpackingSoSource: so store dirty: regenerating
08-04 16:42:14.620 15998 15998 D ApkSoSource: not allowing consideration of lib/x86_64/libreanimated.so: deferring to libdir
Expected behavior
Actual behavior & steps to reproduce
Can’t reproduce it deterministically, it always happens after a few seconds.
Snack or minimal code example
I hope the above stack traces can help narrow down the issue, we have a very complex app with heavy use of reanimated.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:31
- Comments:30 (19 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am also running into this issue on android with the react-native-reanimated@2.3.0-alpha.2 release.
Description
The application crashes immediately when running on android in the simplest use case.
Expected behavior
The application does not crash.
Actual behavior & steps to reproduce
Create a bare react native project. Install react-native-reanimated@2.3.0-alpha.2, follow the instructions for the android setup and then build the app. The app builds successfully on android studio but crashes immediately when trying to run it.
If I downgrade the version of react-native-reanimated to 2.2.0 in the same project it starts working again.
This problem ONLY exists on android. On iOS version 2.3.0-alpha.2 works fine.
Snack or minimal code example
https://github.com/hmust92/AwesomeProject
Package versions
Affected platforms
It seems that
2.3.0-alpha.3
has just been released, but I’m getting the same crash on Android.There does seem to be a difference, it crashes a bit later. With alpha.2 it was crashing instantly. But with alpha.3 I can interact with the app a bit before it crashes.