ReactNative 환경에서 타사 라이브러리를 붙이려면 NativeModule로 작성해야 합니다.
타사에서 jni .so 라이브러리를 제공해서 load하는데 계속 아래와 같은 오류가 발생했습니다.
A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 28002 (mqt_native_modu), pid 27506 (nativexxx)
이유를 알아본다면 Native Module이 javascript thread에서 실행되는곳이 문제가 되고 있는건데요.
ReactNative 0.55 Version부터 mgt_접두사가 붙인 MessageQueueThread를 사용하는데 0.55 이하버전에서 .so파일을 불러오는것은 문제가 되지 않지만 이상의 버전이라면 hermes를 사용하여야 합니다.
공식 홈페이지를 참고하여 hermes를 활성화 하면 정상적으로 so파일 load가 됩니다.
https://reactnative.dev/docs/hermes
Using Hermes · React Native
Hermes is an open-source JavaScript engine optimized for React Native. For many apps, enabling Hermes will result in improved start-up time, decreased memory usage, and smaller app size. At this time Hermes is an opt-in React Native feature, and this guide
reactnative.dev
React Native하면서 이런 이슈들이 많네요.
Flutter보다 이런 설정문제가 많다보니 유저들이 많이 떠나고 있는것 같습니다..
- 참고 -
What is mqt_native_modules and what to do about its crashes
I'm working with React Native (noob) and I'm getting some crashes like the following on Android: libc: Fatal signal 11 (SIGSEGV), code 1 (mqt_native_modu) What is this module mqt_native_modu? Is ...
stackoverflow.com
https://stackoverflow.com/questions/65418985/react-native-crashedthread-sigsegv-libjsc-so
React Native Crashed:Thread : SIGSEGV libjsc.so
We are getting following crash on various random places in android devices. Although we have changed ndk abifilters to "armeabi-v7a", "arm64-v8a" Crashed: Thread : SIGSEGV
stackoverflow.com
'프로그래밍 > ReactNative' 카테고리의 다른 글
[ReactNative] Code Push #4 ReactNative Plugin사용 (0) | 2022.03.22 |
---|---|
[ReactNative] Android gif 이미지 사용하기 (0) | 2022.03.07 |
[ReactNative] Code Push 다중 배포 #2 iOS (0) | 2022.01.05 |
[ReactNative] Code Push 다중 배포 #1 Android (0) | 2022.01.04 |
[ReactNative] Code Push #3 iOS 설정 (0) | 2021.07.23 |