Skip to content

Commit

Permalink
[fix] fixed libfbjni.so crash when Instance is destoryed
Browse files Browse the repository at this point in the history
Abort message: JNI DETECTED ERROR IN APPLICATION: obj == null     in call to CallVoidMethodV     from void com.facebook.react.bridge.queue.NativeRunnable.run()
facebook#6 pc 0000000000018824  /data/app/~~gZ4ren0aUxEEEkOBqBbomw==/ctrip.android.view-PS6Co6JUwWdmsveFJs3YMg==/lib/arm64/libfbjni.so (_ZN7_JNIEnv14CallVoidMethodEP8_jobjectP10_jmethodIDz+116)
  • Loading branch information
whatleo committed Aug 19, 2022
1 parent d3b5cb0 commit 90844d7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,17 @@ public void run() {
public void run() {
// Kill non-UI threads from neutral third party
// potentially expensive, so don't run on UI thread

// fixed libfbjni.so crash when Instance is destroyed
getReactQueueConfiguration().destroy();

// contextHolder is used as a lock to guard against
// other users of the JS VM having the VM destroyed
// underneath them, so notify them before we reset
// Native
// Native
mJavaScriptContextHolder.clear();

mHybridData.resetNative();
getReactQueueConfiguration().destroy();

FLog.d(
ReactConstants.TAG,
"CatalystInstanceImpl.destroy() end");
Expand Down

0 comments on commit 90844d7

Please sign in to comment.