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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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.