Search Issue Tracker
Fixed in 2018.3.X
Fixed in 2017.4.X, 2019.1.X
Votes
28
Found in
2018.3.0b4
2018.3.2f1
Issue ID
1126040
Regression
Yes
[Android] App crashes when invoking Java Proxy while the app is in the background
Repro steps:
1. Open QA attached project "repro_1126040""
2. Open scene "Sample Scene"
3. Build and Run on Android
4. Press the left button
5. Press the right button "Quit"
Actual: After some time the app crashes
Reproducible with: 2018.3.0b4, 2018.3.8f1, 2019.1.0b7, 2019.2.0a8
Not reproducible with: 2017.4.23f1, 2018.3.0b3
Tested and reproduced on these devices:
VLNQA00027, Xiaomi MI MAX (MI MAX), Android 7.0, CPU: Snapdragon 617 MSM8952, GPU: Adreno (TM) 510
VLNQA00150, Samsung Galaxy S9 (SM-G960U), Android 8.0.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00078, Motorola Nexus 6 (Nexus 6), Android 7.1.1, CPU: Snapdragon 805 APQ8084AB, GPU: Adreno (TM) 420
Didn't reproduce on this device:
VLNQA00034, Lge Nexus 4 (Nexus 4), Android 5.1.1, CPU: Snapdragon S4 Pro APQ8064, GPU: Adreno (TM) 320
Fixed in: 2019.2.0a11
Backported to: 2017.4.26f1, 2018.3.13f1, 2019.1.0b11
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [WebGL] ExposedReference<Transform>.Resolve() is not generated correctly in WebGL
- Resizing Profiler Module Details panel and releasing mouse button outside Unity doesn't cancel resize
- "Auto-hide gizmos" preference is not saved when reopening the project
- Sampling a custom depth texture on a machine with a GTX 1080 makes object's textures display the wrong color when in Play mode or Player
- Terrain is missing the Hidden/TerrainEngine/Details/WavingDoublePass shader when AssetBundles are built in older Unity Versions
mayasarii876
Mar 08, 2022 05:54
http://103.56.148.201/
http://103.56.148.201/newmpo
http://103.56.148.201/mpo17
http://103.56.148.201/mpomm
http://103.56.148.201/mpotower
http://103.56.148.201/parisklub
http://103.56.148.201/juraganslot
http://103.56.148.201/mpo500
http://103.56.148.201/mpokick
http://103.56.148.201/mpoyes
http://103.56.148.201/xyzklub
http://103.56.148.201/betmpo
http://103.56.148.201/ogslot88
http://103.56.148.201/hoki777
http://103.56.148.201/mpojuta
http://103.56.148.201/299slot
http://103.56.148.201/mpo188
http://103.56.148.201/mpogacor
http://103.56.148.201/mpo300
http://103.56.148.201/rgo365
http://103.56.148.201/kingdom288
http://103.56.148.201/wigompo
http://103.56.148.201/mpo8899
http://103.56.148.201/mpopelangi
http://103.56.148.201/mpo555
http://103.56.148.201/dutampo
http://103.56.148.201/klik368
http://103.56.148.201/388hero
http://103.56.148.201/19dewa
http://103.56.148.201/mpoxl
http://103.56.148.201/mpoas
http://103.56.148.201/mposun
http://103.56.148.201/qqslot
http://103.56.148.201/mposport
http://103.56.148.201/dewa234
http://103.56.148.201/mesinmpo
jamieghosal
Jan 06, 2022 09:51
Steps:
create dynamic proxy instance
call native method and pass the proxy instance as a parameter
use jni to invoke some method on proxy instance
App code:
val target = object : ProxyTest {
override fun testVoid() {
Log.e(TAG, "testVoid: ")
}
override fun testString(): String {
Log.e(TAG, "testString: ")
return "hello"
}
}
val proxy = Proxy.newProxyInstance(
classLoader, arrayOf(ProxyTest::class.java)
) { proxy, method, args ->
// if open code below, it will crash on all device
// if not open, it will crash only on android 6.0, mostly on Vivo Y67
//val myargs = args ?: emptyArray()
//method.invoke(target, *myargs)
} as ProxyTest
invokeProxyMethod(proxy)
interface ProxyTest {
fun testVoid()
fun testString(): String
}
Native code:
extern "C"
JNIEXPORT void JNICALL
Java_com_aprz_mytestdemo_jni_JNIInvokeProxyMethodActivity_invokeProxyMethod(JNIEnv *env,
__unused jobject thiz,
jobject proxy) {
jclass proxy_class = env->GetObjectClass(proxy);
// jmethodID test_void_method_id = env->GetMethodID(proxy_class, "testString", "()Ljava/lang/String;");
jmethodID test_void_method_id = env->GetMethodID(proxy_class, "testVoid", "()V");
LOGD("jmethodId = %d", test_void_method_id == nullptr);
jvalue *args = {};
jobject obj = env->NewLocalRef(proxy);
env->CallVoidMethodA(obj, test_void_method_id, args);
Nomibuilder
Apr 10, 2019 05:25
Couldn't find a fixture in Unity 2018.3.12
When can we expect the newer version pleasE?
pertz
Apr 08, 2019 18:19
2018.3.12f1 was just released and I cant find this issue on the release notes, so I guess the fix didnt make on this version
pertz
Apr 04, 2019 23:09
Related thread: https://forum.unity.com/threads/crashes-on-android-after-migrating-to-unity-2018-3-when-use-androidjavaproxy-class.627637/page-3#post-4393006
Fixed, expected to be released on 2018.3.12f1
toberr
Mar 14, 2019 14:04
"Not reproducible with: 2017.4.23f1, 2018.3.0b3"
This is not entirely true. With 2018.3.0b3 we have in 5 times less crashes, but still have.
$Proxy9.onAdLoaded
LeMobile Le X829 and Xiaomi Mi A2
$Proxy8.onAdFailedToLoad
samsung SM-G361H
$Proxy10.OnProductsRetrieved
Sony G3313
$Proxy9.onAdFailedToLoad
samsung SM-J200GU
$Proxy9.onAdLoaded
OPPO CPH1803