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
autoware_tensorrt_vad: vad_node segfaults on first TF miss (dangling temporary clock in RCLCPP_ERROR_THROTTLE) #13269
autoware_tensorrt_vad's CoordinateTransformer::lookup_base2cam() crashes the whole vad_node with SIGSEGV the first time a TF lookup fails, instead of logging the error it was trying to report.
RCLCPP_ERROR_THROTTLE binds its clock argument to a reference inside the macro expansion and then calls .now() on it in a later statement. *rclcpp::Clock::make_shared() dereferences a temporary shared_ptr whose only reference dies at the end of that first statement — C++ lifetime extension does not apply to *sp (it is an lvalue referring to the managed object, not a prvalue), so the Clock is destroyed before the macro uses it. The subsequent now() call is a use-after-free.
Impact
Any transient TF miss at startup (e.g. a camera frame_id published before the sensor-kit TF tree is complete, or a frame_id not present in the URDF) kills the node with exit code -11.
Because the crash happens inside the error path, the intended "Failed to get TF transformation" message is never printed — the node just dies silently, which makes the underlying TF problem unnecessarily hard to diagnose.
Reproduction
Launch VAD (use_e2e_planning:=true e2e_planning_type:=vad) with any camera whose camera_info.header.frame_id has no transform from base_link (one misnamed frame is enough).
vad_node exits with process has died ... exit code -11 on the first frame, with no error log.
Re-running the exact vad_node command line from the death message under gdb -batch -ex run -ex bt shows the segfault in the clock use inside the throttle macro expansion in lookup_base2cam.
Reproduced on 0.52.0 + the VAD PR (#1685-based setup) with ROS 2 Jazzy; the same code is present on main today.
(or plumb the node's clock into CoordinateTransformer, which also makes the throttle honor sim time). We have been running the static variant in a CARLA-simulator integration and it both stops the crash and surfaces the intended TF error message. Happy to open a PR if the static approach is acceptable.
Activity
stale commentedon Oct 29, 2026
This pull request has been automatically marked as stale because it has not had recent activity.