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
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Default state” name in Inspector is not truncated when given longer name for “New State” in Animator window
- Upgrading HDRP Project causes the Cloud Layer to warp when using the Global Volume with the Visual Environment enabled
- The Inspector does not shown SkinnedMeshRenderer Bounds when they are overriden by script
- Confusing validation message in Scoped Registries
- Compute shader is dispatched with unsupported workgroup size on multiple browsers when building the project for Web with WebGPU Graphics API
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.