cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Test failure in `VoxelPrimitive`

Open jjspace opened this issue 1 year ago • 4 comments

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)

jjspace avatar Apr 01 '24 17:04 jjspace

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:

  1. Regular picking to identify which primitive is under the cursor
  2. Re-render to the PickFramebuffer to identify the tile and sample within the voxel
  3. 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 avatar Apr 05 '24 14:04 jjhembd

@jjhembd Would it be reasonable to get this test failure fixed for the next release?

ggetz avatar Apr 26 '24 18:04 ggetz

I'll look at it on Monday. I think it should be a one day fix.

jjhembd avatar Apr 26 '24 19:04 jjhembd

Fantastic, thanks!

ggetz avatar Apr 26 '24 20:04 ggetz