Search Issue Tracker

Won't Fix

Votes

1

Found in [Package]

1.3.2 - Entities

1.3.8 - Entities

1.3.9 - Entities

1.4.X - Entities

Issue ID

ECSB-1551

Regression

No

“System.InvalidOperationException: index 0 out of range in LowLevelBufferAccessor of length 0” errors are thrown when using an optional dynamic buffer

Package: Entity Component System (ECS)

-

Reproduction steps:
1. Open the attached “ECS Bug.zip” project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Enter the Play Mode
4. Observe the Console window

Expected result: No errors are thrown
Actual result: “System.InvalidOperationException: index 0 out of range in LowLevelBufferAccessor of length 0” errors are thrown

Reproducible with: 1.3.2 (2022.3.58f1, 6000.0.38f1), 1.3.8, 1.3.9 (2022.3.58f1, 6000.0.38f1, 6000.1.0b6, 6000.2.0a4)
Couldn't test with: 1.3.0-pre.4 (2022.3.58f1) (Errors)

Reproducible on: Windows 11
Not reproducible on: No other environment tested

  1. Resolution Note:

    Unfortunately, it appears the [Optional] attribute was never fully implemented for DynamicBuffer components. This issue is limited to the Aspects feature, which has been officially deprecated in a recent Entities 1.3.x patch release and will not receive any further improvements. We'll add a note to the API documentation to emphasize this limitation.

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.