In order to always keep the references to gApp.jni.jEnv and gApp.jni.jThis updated, the variables FjEnv and FjThis have been eliminated to avoid an error that is occurring a lot in Google Play: Pure null pointer dereference. A variable that is assigned a value and eventually disappears is reused and native dereference fails.
In order to always keep the references to gApp.jni.jEnv and gApp.jni.jThis updated, the variables FjEnv and FjThis have been eliminated to avoid an error that is occurring a lot in Google Play: Pure null pointer dereference. A variable that is assigned a value and eventually disappears is reused and native dereference fails.
https://source.android.com/devices/tech/debug/native-crash
These are the affected functions:
Init(gApp); to Init; Reinit(gApp); to Reinit; Show(gApp); to InitShowing; InitShowing(gApp); to InitShowing; ResetShowing(gApp); to ReinitShowing;
UpdateJNI disappears.
This way the code is also simplified and it is more efficient by not having to call UpdateJNI.