Search Issue Tracker
By Design
Votes
0
Found in
2017.1.0p4
Issue ID
952361
Regression
No
[Android][.NET 4.6] Traceless crash on devices with Qualcomm Krait CPUs when instantiating AndroidJavaObject or AndroidJavaProxy
Using Android Java objects on certain Qualcomm CPUs causes a crash when using .NET 4.6.
Steps to reproduce:
1) Open the attached project.
2) Build & Run on a device.
3) Wait for 20-40 seconds.
The app crashes without a trace. The crash only seems to occur on Qualcomm Krait CPUs. Switching API compatibility to .NET 3.5/2.0 disables the crash. Reproducible with Mono and IL2CPP.
Reproduced on:
2018.1.0a1 (1442398fd94a - trunk as of 12/10/2017), 2017.1.0a6
Devices that reproduced the issue:
LG G3 Android 5.0 w/ 4x Qualcomm Krait 400 @ 2500MHz
Motorola Moto X Android 5.1 w/ 4x Qualcomm Krait 400 @ 2500 MHz
Devices that didn't reproduce the issue:
Samsung Galaxy S6 Android 7.0 w/ 2x Qualcomm Kryo @ 1593 MHz + 2x Qualcomm Kryo @ 2150 MHz
Google Pixel Android 8.0 w/ 4x Qualcomm Kryo 100 @ 2150 MHz
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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Resolution Note:
This is user error: low level AndroidJNI functions are not used correctly.
Users code calls AndroidJNI.AttachCurrentThread(), but doesn't call AndroidJNI.DetachCurrentThread(). This results in issues when Garbage Collector runs for C# side.
The code that does JNI calls from non-main thread should be wrapped with attach/detach.