azesmway / react-native-unity

MIT License
278 stars 69 forks source link

Unity Crash while passing message to React Native - Android #70

Open psbdgr8 opened 1 year ago

psbdgr8 commented 1 year ago

Hi @azesmway, we're encountering a problem on Android where the app crashes when attempting to send messages from Unity to React Native. Specifically, the crash occurs when there are more than six messages being sent simultaneously. Can you help us troubleshoot this issue?

Here are our environment details: macOS Ventura 13.0 React Native 0.70.5 Unity Editor Version 2020.3.0f1 Android Version 13

Following is the error log:


Version '2020.3.0f1 (c7b5465681fb)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a' Build fingerprint: 'realme/RMX3360/RE54ABL1:13/TP1A.220905.001/R.e9a1c9_63b61_5d8e0:user/release-keys' Revision: '0' ABI: 'arm64' Timestamp: 2023-04-25 15:50:59+0530 pid: 16035, tid: 20617, name: Thread-25 >>> com.example.app <<< signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- x0 0000000000000000 x1 0000000000005089 x2 0000000000000006 x3 00000069b6bf5aa0 x4 fefefefefefefeff x5 fefefefefefefeff x6 fefefefefefefeff x7 7f7f7f7f7f7f7f7f x8 00000000000000f0 x9 000000701123ae60 x10 0000000000000001 x11 00000070112a0a44 x12 00000069b6bf47f0 x13 00000000000000d4 x14 00000069b6bf48a0 x15 ffffffffffffffff x16 000000701130a8f0 x17 00000070112e4890 x18 000000000000006b x19 0000000000003ea3 x20 0000000000005089 x21 00000000ffffffff x22 0000006f7ea15000 x23 0000000000000000 x24 00000069b6bf5c78 x25 00000069b6bfc000 x26 00000069b6bfc000 x27 b400006f69ad4c00 x28 0000000000000055 x29 00000069b6bf5b20 sp 00000069b6bf5a80 lr 0000007011291a08 pc 0000007011291a34

backtrace:

00 pc 000000000007da34 /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 59222d1015276d9a9031ee1ea28c0bcd)

azesmway commented 1 year ago

Hello I'm not sure if the plugin is to blame. most likely problems in the android player unity

psbdgr8 commented 1 year ago

We resolved the crash issue by putting a 3 seconds delay in sending every message from Unity to Reactntive. We believe this workaround is not a 100% correct solution so to avoid any future crashes we would like to troubleshoot and find out the root cause of the crash. Can you please point us in a direction where we can start troubleshooting? like a particular piece of code/function or something like that. We appreciate your help and energy Thanks