You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Step 1: unsynchronized live trajectory reads and bucket-map reset #592
Step 1 has two shared-state synchronization problems during background odometry, identified by source inspection at commit 56b7e2525b88f0fdfaff7940e9f361d86105b83f.
Live trajectory reads overlap worker updates.loadData() starts a worker thread, while display() iterates the same trajectory/prediction containers for trajectory axes, prediction axes and trajectory points. The worker changes poses, assigns trajectory vectors and appends prediction poses. Those reads are not synchronized with the writes or possible vector reallocations, so they can produce a data race and undefined behavior. Active gizmo/settings paths can also edit data used by the worker.
The sliding-window reset clears bucket maps without their mutexes.process_worker_step_update_rgd_after() clears both maps, while the renderer relies on those mutexes when iterating the maps. The unsynchronized clear can invalidate the renderer's iterators/references.
The affected path is reached by starting a recording through Load & process scanning, leaving trajectory display enabled or enabling axes/prediction overlays, and allowing odometry to run through a sliding-window reset.
This is a source-level race report. No particular recording, reproduced crash or ThreadSanitizer diagnostic is claimed. Runtime stress/sanitizer validation would provide additional evidence.
Expected behavior: the GUI should keep displaying a coherent trajectory without accessing containers concurrently modified by the worker, and every bucket-map reset should use the renderer's existing map mutexes.
PR #590 addresses this by publishing immutable copies of only the displayed trajectory/prediction fields at safe producer boundaries, retaining a copy for each GUI frame, guarding active edits, and locking the map reset. It reuses WorkerData and the existing drawing code, preserving live trajectory, axis and prediction overlays, including while paused. No performance improvement is claimed; snapshot copying adds RAM and processing overhead. Validation and remaining limits are documented in the PR.
Activity