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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Add comment