Search Issue Tracker

Fixed in 2019.3

Fixed in 2018.3, 2018.4, 2019.1, 2019.2

Votes

0

Found in

2018.3.0a1

2018.3.0f2

2019.1.0a1

2019.2.0a1

2019.3.0a1

Issue ID

1143749

Regression

No

[IL2CPP] Passing 'this' to a method as an 'in' parameter causes IndexOutOfRangeException when building Player

IL2CPP

-

Steps to reproduce:
1. Download attached project
2. Build project for Standalone with IL2CPP backend

Results: Build fails with when passing 'this' to a method as an 'in' parameter

Reproduced with: 2019.3.0a1, 2019.2.0a12, 2019.1.0f2, 2018.3.13f1

stdout:
IL2CPP error for method 'System.Single Repro::GetNextRotation(System.Single)' in C:\Users\USER_NAME\Downloads\case_1143749-il2cpp-repro\Assets\Repro.cs:19
Additional information: Index was outside the bounds of the array.
il2cpp.exe didn't catch exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
<...>

Example code:
void Update()
{
Test(this);
}

void Test(in ClassName script) { }

Note:
- Not reproducible in 2017.4 as this feature is not supported in C# 6.

  1. Response avatar

    Resolution Note (fix version 2019.3):

    Fixed in: 2019.3.0a5, 2019.2.0b6, 2019.1.6f1, 2018.4.2f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.