Search Issue Tracker
Third Party Issue
Votes
0
Found in [Package]
1.2.0 - Entities
1.3.X - Entities
7000.0.0a1
Issue ID
ECSB-1034
Regression
No
"IndexOutOfRangeException" error is thrown when increasing NativeArray length in a Baker class
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/OutdoorsScene/SubScene” Scene
3. Open the “Assets/Script/Assembly/TestAuthoring“ script with a code editor
4. In the code editor, change the NativeArray, which is in line 14, argument from “1 * 1024 * 1024” to “10 * 1024 * 1024”
5. In the Hierarchy window, select the “SubScene” Sub Scene
6. In the Inspector window, press the “Reimport” button
7. Observe the Console
Expected result: No errors are logged in the Console
Actual result: “IndexOutOfRangeException” error is logged in the Console
Reproducible with: 1.2.0 (6000.0.0b14)
Couldn't test with: 1.1.0-pre.3, 1.0.16 (because of other package dependency on Entities package)
Reproducible on: Windows 11
Not reproducible on: No other environments tested
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
- [VFX Graph] ArcTorus Transform changes in blackboard not reflected in Graph
- Text deletion works incorrectly in an input field when the Chinese language is used and the "Event System" Component is turned off
- Typed text doesn't appear in an input field when the Chinese language is used and the "Event System" Component is turned off
- Script associated with "GlobalVolumeFeature" is missing when inspecting "Mobile Renderer" Asset
- Clearable "RenderingCommandBuffer" errors are thrown in the Console when creating project using Universal 3D Template
Resolution Note:
This issue is a user error and was resolved when fixing the user code:
In MeshSimplifier.cs/ln.74 the user ResizeUninitialized an array, but neglects to initialize all the indices before use. Fix is to move this line up top and use subMeshTriangleCount as the size of the array, as is done in the other Simplify function in the same file:
var subMeshTriangleCount = tris.Length / TriangleVertexCount;