Skip to content

New BT.CPP Build Errors with -Werror #1288

Closed

Description

@SteveMacenski

Describe the bug

Nav2’s Rolling CI started failing with GCC 15 due to a -Wnull-dereference warning coming from thread_safe_signal.h. Since we build with -Werror, this breaks our BT node builds, and it should hit anyone else downstream compiling with the same flags.

In member function 'std::__weak_ptr<_Tp, _Lp>& std::__weak_ptr<_Tp, _Lp>::operator=(const std::__weak_ptr<_Tp, _Lp>&) [with _Tp = BT::ThreadSafeSignal<>::Subscription; ...]',
    ...
    inlined from 'void BT::ThreadSafeSignal<CallableArgs>::notify(CallableArgs ...) [with CallableArgs = {}]' at /opt/ros/rolling/include/behaviortree_cpp/utils/thread_safe_signal.h:52:19:
/usr/include/c++/15/bits/shared_ptr_base.h:2039:7: error: potential null pointer dereference [-Werror=null-dereference]

How to Reproduce*

Compile with -O2 -Wnull-dereference -Werror

Activity

  1. sloretz commented on Nov 12, 2026

    @sloretz

    Nav2’s Rolling CI

    This also appears to break the build of nav2_behavior_tree in ROS Lyrical.

  2. SteveMacenski commented on Nov 12, 2026

    @SteveMacenski
    ContributorAuthor

    @facontidavide can we get a new bloom release on rolling/lyrical?

  3. facontidavide commented on Nov 12, 2026

    @facontidavide
    Collaborator

    fixed. I will bloom it

  4. added a commit that references this issue on Nov 12, 2026
    9174257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions