Repository navigation
Fix viewer frame-pool error flood when drawing is slow - #15738
Conversation
sysrsbuild-gh-agentic
left a comment
There was a problem hiding this comment.
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.
ashrafk93
left a comment
There was a problem hiding this comment.
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.
ashrafk93
left a comment
There was a problem hiding this comment.
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.
Tracked on: [RSDEV-14557]