Skip to content

Fix viewer frame-pool error flood when drawing is slow - #15738

Merged
AviaAv merged 3 commits into
realsenseai:developmentfrom
AviaAv:viewer-queue-pool-limit
Sep 30, 2026
Merged

AviaAv merged 3 commits into
realsenseai:developmentfrom
AviaAv:viewer-queue-pool-limit

Conversation

@AviaAv

@AviaAv AviaAv commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Tracked on: [RSDEV-14557]

@sysrsbuild-gh-agentic sysrsbuild-gh-agentic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-generated review by rs-agentic bot.

Exporter regression concern: auto model = ppf.get_points() was removed from the file-export block in viewer.cpp. If model (or any data derived from it) was passed downstream to the export routine in that same block, 3D point-cloud export may now be silently broken. Please verify the export path still receives valid point-cloud data.

Comment thread common/post-processing-filters.cpp Resolved
Comment thread common/post-processing-filters.h Resolved
@AviaAv
AviaAv requested a review from Nir-Az September 29, 2026 10:46
@Nir-Az
Nir-Az requested review from ashrafk93 and removed request for Nir-Az September 29, 2026 11:40

@ashrafk93 ashrafk93 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with a focus on the syncer, since that is the sensitive part here. LGTM overall — the approach is right and I do not see a regression risk.

Syncer: unaffected. render_loop() still pulls viewer.syncer->try_wait_for_frames() and invokes into processing_block; syncer->start()/stop() are unchanged. Only the block's output sink changed (resulting_queue → store_latest). It actually relieves the syncer — both allocate framesets from the same SDK pool the viewer was exhausting by holding up to 20 framesets, which is the pressure behind the error flood.

Correctness: points still ride inside the composite frameset (allocate_composite_frame), so store_latest keeps them and 3D view + PLY export (last_points) still work; the removed get_points()/model were dead (export uses last_points); the new filter logic matches the old; depth-quality (the other handle_ready_frames caller) still gets the latest composite as its return value.

Tested: builds clean on development; realsense-viewer and rs-depth-quality both run clean on a D455 with live streaming through the changed path (no crash, no error flood). Could not exercise the D585 high-load case (no unit available here).

Two minor inline notes below — neither blocks merge.

Comment thread common/post-processing-filters.h Resolved
Comment thread common/post-processing-filters.cpp Resolved
@ashrafk93
ashrafk93 self-requested a review September 29, 2026 12:08

@ashrafk93 ashrafk93 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced on a D455 with the viewer's drawing throttled to ~1.4 fps (Depth 848x480@30 + RGB8 1280x720@30): development logged 658 Out of frame resources! errors in ~30 s; this PR logged 0, including in 3D and after turning RGB off and on. No FPS regression when drawing at normal speed (29.96/29.96).

Optional: consider a regression test in tools/realsense-viewer/tests/streaming/. The ImGui harness can already turn streams on (click_stream_toggle_on), so streaming depth + RGB8 with slowed drawing and asserting there are no error notifications would lock this in.

Comment thread common/viewer.cpp Resolved
Comment thread common/post-processing-filters.h Resolved
@AviaAv
AviaAv merged commit 57acf88 into realsenseai:development Sep 30, 2026
36 checks passed
@AviaAv
AviaAv deleted the viewer-queue-pool-limit branch September 30, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants