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
- [Linux] Crash on System.Runtime.InteropServices.Marshal:copy_from_unmanaged_fixed when accessing shared memory
- Misaligned text in Preferences window > 2D > Animation, Asperite and Sprite Editor preferences
- Unable to Install ZivaRT Player deprecated package
- Inconsistent Label Popup UI in Package Manager
- All active Audio Sources play their Clips when the "Play On Awake" checkbox is enabled and Scene view Audio is unmuted
Add comment