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
- Unused Particle System Renderer Mesh settings cause performance degradation when calling SetActive
- Project Browser shows the Asset folder empty when Select Dependencies is clicked without any asset selected
- Export as JSON and CSV options missing from the Quick Search save feature
- Crash on IMGUI::GUIWindow::OnGUI when rendering scene view window in play mode in a specific project
- "FileNotFoundException" & "IOException" thrown when adding "User" Index after deleting "Assets" Index in Search Index Manager window
Add comment