Test failure in `VoxelPrimitive`
Found a failing test locally when running through the release. It isn't happening in CI but @ggetz confirmed it's happening locally for her too. Voxel picking is still working so it seems like it's just a broken test
1) picks a voxel cell from a VoxelPrimitive
Scene/Pick pickVoxel
TypeError: Cannot read properties of undefined (reading 'tileIndex')
at packages/engine/Specs/Scene/PickingSpec.js:280:28 <- Build/Specs/SpecList.js:206370:28
at compare (Specs/addDefaultMatchers.js:410:13 <- Build/Specs/karma-main.js:373:13)
at <Jasmine>
at UserContext.<anonymous> (packages/engine/Specs/Scene/PickingSpec.js:279:23 <- Build/Specs/SpecList.js:206369:24)
Thanks @jjspace for the report. I can reproduce it on my machine.
I did a few tests to see where it started. This spec was broken in #11847.
In Scene.pickVoxel, there are 3 things going on:
- Regular picking to identify which primitive is under the cursor
- Re-render to the
PickFramebufferto identify the tile and sample within the voxel - Look up the relevant data from the voxel metadata ArrayBuffers
The spec failure is caused by a problem in step 1: no primitive is identified under the cursor.
My first guesses at possible reasons:
- Something flaky about camera position/orientation relative to the voxel shape
- Something flaky about rendering order: we didn't wait for something to finish rendering?
I say "flaky" in both cases, because the spec was fragile even before #11847. This spec uses the ellipsoid-shaped test dataset at Data/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/. If I instead use the box-shaped tileset Data/Cesium3DTiles/Voxel/VoxelBox3DTiles/, the spec fails in all versions, again because it doesn't find any rendered primitive under the cursor.
@jjhembd Would it be reasonable to get this test failure fixed for the next release?
I'll look at it on Monday. I think it should be a one day fix.
Fantastic, thanks!