Search Issue Tracker

In Progress

Fixed in 2022.3.20f1, 2023.2.10f1, 2023.3.0b6

Fix In Review for 2024.1.X

Votes

0

Found in

2022.3.17f1

2023.2.6f1

2023.3.0b3

2024.1.0a1

Issue ID

UUM-60727

Regression

Yes

[Android] Player crash on "UnityEngine.AndroidJNI:NewGlobalRef (intptr)" when creating AndroidJavaObjects on Android

--

-

Reproduction steps:
1. Open the attached project “JNIProject”
2. Build And Run on Android
3. Observe the app’s behaviour

Expected result: The app runs successfully
Actual result: The app crashes

Reproducible with: 2022.2.0a12, 2022.3.17f1, 2023.2.6f1, 2023.3.0b3
Not reproducible with: 2021.3.34f1, 2022.2.0a11

Reproducible with these devices:
VLNQA00518 - Google Pixel 4 (Pixel 4), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 12
VLNQA00414 - Galaxy Note10+ 5G (SM-N976V), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 9
VLNQA00278 - Xiaomi Redmi Note 7 (Redmi Note 7), CPU: Snapdragon 660, GPU: Adreno 512, OS: 9.0.0
VLNQA00139 - Vivo Xplay6 (vivo Xplay6), CPU: Snapdragon 820 MSM8996, GPU: Adreno 530, OS: 7.1.1
VLNQA00132 - Xiaomi Mi 5s (MI 5s), CPU: Snapdragon 820 MSM8996, GPU: Adreno 530, OS: 6.0.1
Motorola Razr 5G (Android 12) (user’s device)

Testing environment: macOS(Intel) 14.2.1

First few lines of backtrace:
{{6808 Error CRASH #00 (wrapper managed-to-native) UnityEngine.AndroidJNI:NewGlobalRef (intptr)}}
{{6808 Error CRASH #01 UnityEngine.GlobalJavaObjectRef:.ctor (intptr) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:33>}}
{{6808 Error CRASH #02 UnityEngine.AndroidJavaObject:_AndroidJavaObject (intptr,object[]) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:581>}}
{{6808 Error CRASH #03 UnityEngine.AndroidJavaObject:_AndroidJavaObject (string,object[]) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:571>}}
{{6808 Error CRASH #04 UnityEngine.AndroidJavaObject:.ctor (string,object[]) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:337>}}

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.