Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X
Votes
3
Found in
2018.4
2019.4
2019.4.23f1
2020.3
2021.1
2021.2
Issue ID
1335306
Regression
No
[Android][IL2CPP] App Crashes when using MonoPInvokeCallback attribute in a project with an IL2CPP Scripting Backend
How to reproduce it:
1. Open the attached project "EmptyProject.zip"
2. Build and Run it on Android
3. Observe the app that runs on Android
Expected result: App doesn't crash
Actual result: App crashes
Reproducible with: 2018.4.35f1, 2019.4.28f1, 2020.3.10f1, 2021.1.10f1, 2021.2.0a19
Reproducible devices:
VLNQA00122, Samsung Galaxy S9 (SM-G960F), Android 10, CPU: NOT FOUND, GPU: Mali-G72
VLNQA00331, Huawei P20 lite (ANE-LX1), Android 9, CPU: HiSilicon Kirin 659, GPU: Mali-T830
VLNQA00321, Xiaomi MI 9 (MI 9), Android 10, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00038, Htc Desire 510 (HTC Desire 510), Android 4.4.3, CPU: Snapdragon 410 MSM8916, GPU: Adreno (TM) 306
VLNQA00285, Samsung Galaxy J4 Core (SM-J410F), Android 8.1.0, CPU: Snapdragon 425 MSM8917, GPU: Adreno (TM) 308
Notes:
- Doesn't reproduce with Mono Scripting Backend
- Not reproducible after building and running on macOS
- Not reproducible when "[MonoPInvokeCallback(typeof(MainDelegateFunction))]" is commented in the "DebugMarshalPointers.cs" file
Code that causes the crash:
[Preserve]
[MonoPInvokeCallback(typeof(MainDelegateFunction))]
public static void OnRequestComplete(int status)
{
Debug.LogError("OnRequestComplete " + status);
}
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
- Buttons in the Overlay Menu in the Scene View are all gray even if they're activated when Game View is maximized and minimized
- NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
- Editor crashes on PrepareSpriteTilingData when exiting Play mode
Resolution Note (fix version 2021.2):
Fixed in 2022.1.0a3
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.0b7
Resolution Note (fix version 2021.1):
Fixed in 2021.1.15f1
Resolution Note (fix version 2020.3):
Fixed in: 2020.3.17f1