Skip to content

fix(rendering): skip deferred renders after view disposal - #1018

Merged
PaulHax merged 2 commits into
Kitware:mainfrom
PaulHax:fix/disposed-deferred-render
Nov 5, 2026
Merged

PaulHax merged 2 commits into
Kitware:mainfrom
PaulHax:fix/disposed-deferred-render

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

A render queued before view disposal can still run if cleanup throws before the pending timer is cancelled. Check the disposed flag when the deferred callback executes, preventing it from rendering widgets or traversing the deleted view.

The tests use normal frozen vtk.js objects and observe their public modification/render events. A throwing view-removal listener interrupts cleanup after the OpenGL view is deleted, leaving the queued render pending. Live-view and normal-disposal cases provide controls. No constructors, render methods, or delete methods are replaced; fake timers control callback execution. These are lifecycle tests, not GPU rendering tests.

Validation:

  • All 6 useVtkView teardown tests pass.
  • Removing only the disposal guard makes the interrupted-cleanup case fail with widget and render events; restoring it passes.
  • TypeScript, targeted ESLint, and formatting checks pass.
  • Staged-change quality checks pass with a local Windows launcher adapter for jscpd.

@netlify

netlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit 22568e1
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6aecdc09e3ce72b95b5db6a0
😎 Deploy Preview https://deploy-preview-1018--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PaulHax
PaulHax marked this pull request as ready for review November 5, 2026 19:42
@PaulHax
PaulHax merged commit 150859c into Kitware:main Nov 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant