Search Issue Tracker

Won't Fix

Votes

0

Found in

2018.3.0b2

2018.3.1f1

2019.1.0a1

2019.2.0a1

Issue ID

1117637

Regression

Yes

InvalidProgramException is thrown when calling methods with ref variables referencing an array inside a jagged array

Mono

-

Reproduction steps:
1. Open the attached project "1117637.zip"
2. Open and play "SampleScene"

Expected: Console logs "2" and "10"
Actual: Console logs "2" and throws InvalidProgramException

Reproduced on: 2018.3.0b2, 2018.3.6f1, 2019.1.0b3, 2019.2.0a5
Does not reproduce on: 2018.3.0b1
Could not test on 2017.4 due to C# 6th version Unity restriction

Note:
- Stack trace
InvalidProgramException: Invalid IL code in InvalidILCodeIssue:ResizeUsingRefLocals_CausesException (int): IL_000d: stloc.0
InvalidILCodeIssue.Start () (at Assets/InvalidILCodeIssue.cs:18)

  1. Resolution Note:

    Issue tracked in Mono: https://github.com/mono/mono/issues/10101

    A workaround is to compile your code with "/unsafe". For regular scripts you can enable this in the player settings of your project. The causes mono to avoid the incorrect check.

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.