RadarHUD.rebuildUI() disposes the blip pool so contacts vanish after resize #1072

Closed
opened 2026-08-13 13:29:09 +00:00 by spikerj · 1 comment
Owner

Where: projects/spikersoft/src/app/_components/_games/space-game/radar/radar-hud.ts — rebuildUI() (called from resize() once UI already exists).

What: Constructor createBlipPool(50) adds 50 meshes to this.group. A later resize() walks every child, dispose()s Mesh geometry/material, then createUI() without re-adding pool blips. activeBlips is also not cleared, so updateBlips() reuses disposed meshes that are no longer in the scene graph.

Result: after a window resize, radar contacts stop rendering (or render with disposed geometry).

Expected: rebuild should either skip pooled blips, recreate the pool, or clear activeBlips and re-add unused pool meshes to the group.

Found by Wave 8 a2 coverage tests.

**Where:** `projects/spikersoft/src/app/_components/_games/space-game/radar/radar-hud.ts` — `rebuildUI()` (called from `resize()` once UI already exists). **What:** Constructor `createBlipPool(50)` adds 50 meshes to `this.group`. A later `resize()` walks every child, `dispose()`s Mesh geometry/material, then `createUI()` without re-adding pool blips. `activeBlips` is also not cleared, so `updateBlips()` reuses disposed meshes that are no longer in the scene graph. **Result:** after a window resize, radar contacts stop rendering (or render with disposed geometry). **Expected:** rebuild should either skip pooled blips, recreate the pool, or clear `activeBlips` and re-add unused pool meshes to the group. Found by Wave 8 a2 coverage tests.
Author
Owner

Resolved in spikersoft-angular PR #819 (merged to master). RadarHUD resize keeps the blip pool so contacts do not vanish. Closing.

Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). RadarHUD resize keeps the blip pool so contacts do not vanish. Closing.
Sign in to join this conversation.