Bugfix: avoid querying device after depthNode pipeline stops - #1961
Bugfix: avoid querying device after depthNode pipeline stops#1961MaticTonin wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📜 Recent review details🔇 Additional comments (1)
📝 WalkthroughWalkthroughDepth AUTO backend tests now receive the platform and precomputed RVC2 ToF-sensor state. User-camera, AUTO-selection, rebuild, and camera-reuse test paths pass these values to backend validation. ChangesDepth AUTO validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The test now captures device capabilities while the device is live, avoiding the post-stop query that caused the crash; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| bool userPreviewStream) { | ||
| PipelineStopGuard guard(pipeline); | ||
| const auto platform = device->getPlatform(); | ||
| const auto autoUsesTof = platform == Platform::RVC2 && deviceReportsTofSensor(device); |
There was a problem hiding this comment.
Why we require RVC2 platform? You check the platform later.
I suggest rename it to hasTofSensor and just place there deviceReportsTofSensor(device).
There was a problem hiding this comment.
Renamed and remived the RVC2 platform check yea, since its duplicated
Summary
Fixes a segfault in the Depth AUTO backend on-device tests on RVC2/network devices.
The test previously queried getConnectedCameraFeatures() after startPipelineAndRequireFirstFrames() returned. That helper stops the pipeline before returning, which closes the device RPC client. The subsequent capability query dereferenced the closed client and caused a SIGSEGV.
Capture the platform and ToF capability while the device is live, then use those cached values for post-stop backend assertions.
Tested with:
https://github.com/luxonis/depthai-core/actions/runs/32837049490/job/97770930315#step:3:4404
Summary by CodeRabbit