Search Issue Tracker

Not Reproducible

Votes

0

Found in

2022.3.19f1

Issue ID

UUM-90764

Regression

Yes

[Android][Mobile Notifications] The Player freezes or crashes when calling "AndroidNotificationCenter.GetNotificationChannel" every frame

--

-

Steps to reproduce:
1. Open the “IN-86851_NotificationLeakBug” project
2. Build And Run the project on the device

Expected result: The Player doesn’t crash or freeze
Actual result: The Player crashes or freezes

Reproducible with: 2022.3.0f1 (2.1.1, 2.2.0), 2022.3.19f1 (2.4.0)
Not reproducible with: 2021.3.45f1, 2022.2.20f1 (2.0.0, 2.1.1), 2022.3.54f1 (2.3.0, 2.3.2, 2.4.0), 6000.0.30f1, 6000.1.0a6 (2.3.2)
Fixed in: 2022.3.20f1 (2.2.0, 2.4.0)

Testing environment: macOS 15.1.1 (Intel), Windows 10 (by user)
Not reproducible on: No other environment tested

Reproducible with these devices:
VLNQA00409 - Galaxy Z Fold3 5G (SM-F926B), CPU: Snapdragon 888, GPU: Adreno 660, OS: 11
VLNQA00472 - samsung Galaxy A52 (SM-A525F), CPU: Snapdragon 720G (SM7125), GPU: Adreno 618, OS: 12
Google Pixel 8, OS: 14 (by user)

Workaround: Implement a custom method to get the notification channel that disposes of the AndroidJavaObject

Notes:
- The issue is in the Editor versions and not the “Mobile Notifications” package versions
- Could not test with iOS

First few lines of the crash stacktrace:
{{#00 (wrapper managed-to-native) UnityEngine.AndroidJNI:NewGlobalRef (intptr)}}
{{#01 UnityEngine.GlobalJavaObjectRef:.ctor (intptr) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:33>}}
{{#02 UnityEngine.AndroidJavaObject:.ctor (intptr) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:348>}}
{{#03 UnityEngine._AndroidJNIHelper:ConvertFromJNIArray<ArrayType_REF> (intptr) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:1579>}}
{{#04 UnityEngine.AndroidJNIHelper:ConvertFromJNIArray<ArrayType_REF> (intptr) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJNI.bindings.cs:186>}}
{{#05 UnityEngine.AndroidJavaObject:FromJavaArrayDeleteLocalRef<ReturnType_REF> (intptr) </home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:1026>}}

  1. Resolution Note:

    This has been fixed on the 2022.3 stream since 2022.3.20f1, and subsequently on all other supported versions of Unity.

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.