Exception at rclcpp::Node::make_shared("my_node") in Debug mode

asked 2021-11-16 02:25:59 -0500

Sunny127 gravatar image

updated 2021-11-16 02:29:27 -0500

When I run my project after building it in "Release" or "RelWithDebInfo", all works fine. However when I run my project after building it in "Debug" mode, I get an exception at the following line:

std::shared_ptr<rclcpp::Node> nh = rclcpp::Node::make_shared("my_node");

The exception:

Unhandled exception at 0x00007FF95E704F99 in my_app.exe: Microsoft C++ exception: rclcpp::exceptions::InvalidNodeNameError at memory location 0x000000F2D296C0A0.

Any ideas?

edit retag flag offensive close merge delete

Comments

Do you have a different allocation when you are in Debug mode ? Seems that it missed its name. If you can compile from source the rclcpp library, you can set a breakpoint before the exception

TomSon gravatar image TomSon  ( 2021-11-16 07:46:55 -0500 )edit

Please post your full code.

Geoff gravatar image Geoff  ( 2021-11-16 17:48:35 -0500 )edit