Skip to content

[Foxy backport] Improve error message for malformed YAML files #815

@s-hillerk

Description

@s-hillerk

Bug report

Passing a malformed YAML parameter file crashes nodes without hinting at the cause. The symptoms are the same as #553:

free(): double free detected in tcache 2
Aborted (core dumped)

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • ROS2 deb repo via apt
  • Version or commit hash:
    • ros-foxy-rcl 1.1.7-1focal.20200921.18150
  • DDS implementation:
    • default
  • Client library (if applicable):
    • (rclpy)

Steps to reproduce issue

echo malformed::: > /tmp/settings.yaml
ros2 run <any node> --ros-args --params-file /tmp/settings.yaml

Expected behavior

The user is informed that the YAML file is malformed.

Actual behavior

The program crashes. The user is puzzled and is not told the cause of the crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions