FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix interactive stereo not auto-enabling on load by mattdawkins · Pull Request #1736 · Kitware/dive · GitHub

/ dive Public

Fix interactive stereo not auto-enabling on load - #1736

Merged
BryonLewis merged 1 commit into
mainfrom
dev/stereo-autoenable-on-load
Jul 2, 2026
Merged

BryonLewis merged 1 commit into
mainfrom
dev/stereo-autoenable-on-load

Conversation

Copy link
Copy Markdown
Member

Problem

In the desktop interactive stereo feature, if the "update lengths on modify" option (or "auto-compute location on other camera") is on at program boot, the backend stereo service was not initialized and lengths were not auto-recomputed — until the user flipped a stereo toggle off and on again (or turned on the other stereo option).

Root cause

The stereo service was enabled by a single watch(stereoServiceWanted, …, { immediate: true }) in ViewerLoader.vue. The immediate run fires during setup() — before the dataset/viewer has finished loading. On that boot run (treated as non-user-initiated), if loadStereoMetadata() / stereoEnable() doesn't succeed at that instant (multicam metadata / calibration or backend not ready yet), the catch block degrades silently and nothing retries. The frame watcher only pushes frames and bails on !stereoEnabled, so the only re-entry points were a user toggle or a calibration import.

Fix

Split the single watcher into two responsibilities:

  • Runtime toggle changes → a non-immediate watcher, always treated as user-initiated (surfaces failures / reverts toggles, unchanged behavior).
  • Load-time auto-enable of a remembered setting → a one-shot watcher on the viewer's progress.loaded, so the enable runs once the dataset is actually loaded and the metadata/calibration it needs are available.

The enable/disable logic is extracted into a shared applyStereoServiceState(enabled, userInitiated) helper (with an idempotency guard so a user toggle racing the load-time enable can't start the service twice). Benign-failure silent-degrade and launch-failure dialog behavior are preserved.

Verification

eslint passes on the changed file.

The backend stereo service was enabled by a single watcher on the
combined stereo toggle state with { immediate: true }. That immediate
run fires during setup(), before the dataset/viewer has finished
loading, so the load-time auto-enable of a remembered setting (e.g.
"update lengths on modify" on by default) could hit not-yet-ready
multicam metadata, fail, and degrade silently with nothing to retry.
The service then stayed off -- and lengths were not auto-recomputed --
until the user flipped a stereo toggle off and on again.

Split the watcher: runtime toggle changes still enable/disable
immediately (always user-initiated), while the load-time auto-enable is
deferred to a one-shot watcher on the viewer's progress.loaded, so it
runs once the dataset is actually loaded and the metadata/calibration
the enable needs are available.
BryonLewis merged commit 5b27c5e into main Jul 2, 2026
3 checks passed
BryonLewis deleted the dev/stereo-autoenable-on-load branch July 2, 2026 12:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL