Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2020.3.X, 2021.2.X, 2022.1.X
Votes
7
Found in
2020.3
2020.3.12f1
2021.2
2022.1
2022.2
Issue ID
1399978
Regression
No
[IL2CPP][Android] MarshalDirectiveException error when using Microsoft onnxruntime and building on Android with IL2CPP
Reproduction steps:
1. Open the attached project "ONNXRuntimeBug.zip"
2. Go to Player Settings and set the "Scripting Backend" to "IL2CPP"
3. Make sure that the Target Architecture is set to ARM64
4. Build and Run the project on an Android device
5. Inspect the Android Logcat after the build is successfully finished
Expected result: No errors in the Android Logcat
Actual result: "MarshalDirectiveException: Cannot marshal P/Invoke call through delegate of type '.DOrtGetApi'" error in the Android Logcat
Reproducible with: 2020.3.27f1, 2021.2.11f1, 2022.1.0b6, 2022.2.0a3
Could not test with: 2019.4.35f1 (Multiple project errors when downgraded)
Reproducible with these devices:
----------, Huawei - (ELS-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00264, Samsung Galaxy S10+ (SM-G975F), Android 10, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00078, Motorola Nexus 6 (Nexus 6), Android 7.1.1, CPU: Snapdragon 805 APQ8084AB, GPU: Adreno (TM) 420
VLNQA00176, Xiaomi Redmi 4 (Redmi 4), Android 6.0.1, CPU: Snapdragon 430 MSM8937, GPU: Adreno (TM) 505
Notes:
-Setting the Target Architecture to ARM64 and ARM7 then following the same steps results in the same issue
-When the "Scripting Backened" is set to "Mono" and following the same steps results in no issues
Comments (1)
-
grykrzysztof
Feb 14, 2022 12:31
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
- Economy package throws a CS0619 error in the Console when installed together with Deployment package
- “Screen position out of view frustum” errors are thrown when zooming out in the Scene view with Rect Tool selected
- Only one [UnityOneTimeSetUp] method runs when there are 2 of them in different classes
- Crash with multiple stack traces when Sprites with a high resolution get Sliced to a Grid with a small cell size in the Sprite Editor
- The UI Builder's Data Source Object picker cannot be navigated after triggering a circular dependency dialog box
Resolution Note (fix version 2022.2):
Fixed in 2021.2.17f1
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0b14
Resolution Note (fix version 2021.2):
Fixed in 2021.2.17f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.32f1