Search Issue Tracker

Fixed

Fixed in 2.5.X -Collections

Votes

0

Found in [Package]

2.5.1 - Collections

Issue ID

ECSB-1430

Regression

No

Silent crash when compiling job structs with NativeContainers that contain a struct with a static field of its own type

Package: Unity Native Collections

-

How to reproduce:
1. Open the “CrashRepro“ project

Reproducible with: 2.5.1 (2022.3.53f1, 6000.0.28f1, 6000.1.0a5)
Couldn’t test with: 2.5.1 (2021.3.46f1) (Errors in the Console)

Reproducible on: macOS 14.6.1 Sonoma (Intel), Windows 11 (reported by user)
Not reproducible on: No other environment tested

Note: Commenting out “public MassModel model;“ in the “/Assets/Elements/Systems/MassUpdateSystem.cs“ Script will stop the crash from reproducing

  1. Resolution Note (fix version 2.5.X -Collections):

    When ComputeReflectionDataJob searches through a job struct recursively, looking for a field named m_Safety, GetOffsetForFieldName will recurse down static fields. If a struct has a static field of the same type (for example, int2 has a static int2 zero field), GetOffsetForFieldName will infinitely recurse until the editor segfaults while trying to allocate.

    This is easily solved by only recursing down instance fields and skipping static fields.

    This has been fixed in versions 2022.3.60f1, 6000.0.41f1, 6000.1.0b9, and 6000.2.0a4. A package update should not be required.

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.