Skip to content

TilesFadePlugin: TypeError when engineData.scene is null in resetVirtualChildren #1553

@aidannewsome

Description

@aidannewsome

Bug

TilesFadePlugin throws a TypeError: Cannot read properties of null (reading 'clone') during resetVirtualChildren. It appears the plugin iterates over tiles and calls engineData.scene.clone() without checking if scene is null first.

This seems to happen when a tile is disposed before its fade transition completes.

Stack trace

3d-tiles-renderer/build/WMSCapabilitiesLoader-X7r6Cf4e.js:4271:66 (So.resetVirtualChildren)
    }), n.sort((i, r) => r.internal.depth - i.internal.depth), n.forEach((i) => {
<anonymous> (Array.forEach)
3d-tiles-renderer/build/WMSCapabilitiesLoader-X7r6Cf4e.js:4272:36 (<anonymous>)
      const r = i.engineData.scene.clone();

Configuration

Using TilesFadePlugin with GoogleCloudAuthPlugin:

<TilesPlugin plugin={TilesFadePlugin} fadeDuration={250} maximumFadeOutTiles={50} />

Library Version

0.4.23

Three.js Version

0.183.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions