Unity Issue Tracker - Unity fails to build when using faulty function with an element being called from null array
Fixed
UUM-597
Unity fails to build when using faulty function with an element being called from null array
Unity: IL2CPP
IL2CPP
Fixed
2023.2.X
2023.1.X
2022.2.X
2021.3.X
Won't Fix
2022.1.X
2021.2.X
2020.3.X
2019.4.X
Fixed in: 2022.2.7f1
We're not shipping changes to 2019.4 any longer.
How to reproduce:
1. Download the attached project '1413712.zip'
2. Make sure the Scripting Backend is set to IL2CPP
3. Build the project
4. Observe the Console
Expected result: The build does not fail or fails and provides a meaningful error message
Actual result: The build fails with errors:
error: member reference type 'long' is not a pointer
int32_t L_1 = (int32_t)(NULL)->GetAt(static_cast<il2cpp_array_size_t>(L_0));
error: member reference type 'int' is not a pointer
int32_t L_1 = (int32_t)(NULL)->GetAt(static_cast<il2cpp_array_size_t>(L_0));