Git Product home page Git Product logo

Comments (3)

jacquelinekay avatar jacquelinekay commented on July 18, 2024

To clarify, you only see the segfault if the name of the parameter is "DemoRobot"? Are you suggesting that the CamelCase name is the cause of the segfault? Or the particular string? That seems to be a dubious cause for the issue. Can you make a more minimal example that reproduces the segfault?

A debugger backtrace from the segfault would also be helpful, if you don't have time to make a MWE.

from rclcpp.

dirk-thomas avatar dirk-thomas commented on July 18, 2024

I tried to compile your demo application which took quite a while and some updates. Please make sure that your examples compile correctly out of the box against the latest default branches in the future.

That being said I can reproduce the segfault in the demo_client now:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b053f7 in rclcpp::parameter::ParameterVariant::get_value<(rclcpp::parameter::ParameterType)1> (this=0x0)
    at /home/dthomas/ros/ros2/ws_ros2/src/ros2/rclcpp/rclcpp/include/rclcpp/parameter.hpp:120
120     if (value_.type != rcl_interfaces::msg::ParameterType::PARAMETER_BOOL) {
(gdb) bt
#0  0x00007ffff7b053f7 in rclcpp::parameter::ParameterVariant::get_value<(rclcpp::parameter::ParameterType)1> (this=0x0)
    at /home/dthomas/ros/ros2/ws_ros2/src/ros2/rclcpp/rclcpp/include/rclcpp/parameter.hpp:120
#1  0x00007ffff7b03a06 in rclcpp::parameter::ParameterVariant::as_bool (this=0x0) at /home/dthomas/ros/ros2/ws_ros2/src/ros2/rclcpp/rclcpp/src/rclcpp/parameter.cpp:148
#2  0x00000000004188c7 in ros2_components::Robot::ListKnownRobots (prefix=..., _parentNode=...) at /home/dthomas/ros/ros2/ws_demog/src/ros2_components_demo/src/ros2_components/Robot.h:157
#3  0x000000000041782b in main (argc=1, argv=0x7fffffffb0a8) at /home/dthomas/ros/ros2/ws_demog/src/ros2_components_demo/src/exec/client.cpp:11

And the problem seems to be this - actually this:

(gdb) print this
$1 = (const rclcpp::parameter::ParameterVariant * const) 0x0

from rclcpp.

dirk-thomas avatar dirk-thomas commented on July 18, 2024

The client segfaults due to two bugs in your code:

from rclcpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.