Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.2.0f3
Issue ID
960211
Regression
No
[IL2CPP] Android build fails with "cannot initialize return object of type 'RuntimeObject **'" error
To reproduce:
1. Open project attached by the user
2. Build project for Android with "Main" scene attached in build settings
3. Notice that build failed and errors appeared in the console
Expected: Unity should successfully build project
Actual: Build fails with following error:
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: /Users/vaidas/Downloads/case_960211-Net46TestUnity/Temp/StagingArea/Il2Cpp/il2cppOutput/GenericMethods2.cpp:25914:10: error: cannot initialize return object of type 'RuntimeObject **' (aka 'Il2CppObject **') with an lvalue of type 'int32_t *' (aka 'int *')
return L_1;
Reproduced with: 2017.1.2p1, 2017.2.0f3, 2017.3.0b4, 2018.1.0a1
Wasn't able to reproduce on iOS platform, build succeeds without any errors.
WON'T FIX:
Unfortunately, the AsRef method that is not compiling correctly uses ref returns, which are a C# 7 feature. Unity doesn't support C# 7 in 2017.2. We're working on adding support for it in a newer version of Unity, but it is not ready yet. So for the time being, this is not a bug we can correct. Look for C# 7 support coming later though, when this should work.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment