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
- HDRP 6-way VFX Shader is lit incorrectly when World coordinates are used
- 2D Sprite Renderer in front is affected by Sprites in the background when using Sorting Layers and a Shadow Caster 2D with Self Shadow
- Modifying UI Prefab child's Height only confirms the first 1 or 2 digits when the Scene is newly opened or the Prefab is newly created
- ProfilingSampler.Get() returns null and makes the Player only render black when building a Release Build
- Search text field visual controls for the Path binding in an Input Actions Asset is misaligned
Add comment