Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.8.2

Issue ID

BUR-2172

Regression

Yes

Uninformative error message when a job that accesses an out of range variable is executed with Burst

Package: Burst

-

How to reproduce:
1. Open the attached user project “Bug Test.zip“
2. Open Scene “test“ (Assets)
3. Enter Play Mode

Expected result: Error with informative key is thrown in the Console
Actual result: “System.ArgumentException: Key: {0} is not present in the NativeParallelHashMap.“ error in the Console

Reproducible with: 1.8.2 (2020.3.42f1, 2021.3.15f1, 2022.2.1f1, 2023.1.0a23)
Not reproducible with: 1.8.1 (2020.3.42f1, 2023.1.0a23)
Can’t test with: 1.8.1 (2021.3.15f1, 2022.2.1f1) (Editor crashes when trying to open project)

Reproduced on: macOS 13.0.1 (Intel)

  1. Resolution Note:

    This is a known and documented limitation of Burst. Burst only supports constant strings as exception messages currently, as documented here: https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/csharp-language-support.html#supported-c-features-in-hpc

    For more details on when string formatting is supported see: https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/csharp-string-support.html

    As for debugging, you should be able to set a breakpoint at the offending code, and you'll be able to debug the managed version of the function. Alternatively you can use Debug.Log from Burst.

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.