Wrapper created by Catkin plugin crashes with certain arguments
Metadata
Current evaluation
Fixed by snapcore/snapcraft#1099, which stopped the Catkin wrapper from forwarding command-line arguments to ROS setup.sh.
Resolution: closed resolved
Reason: A maintainer confirmed the behavior was unintended and linked the corrective pull request, snapcore/snapcraft#1099.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The Catkin plugin injects the following into the wrapper script that Snapcraft generates:
if `test -e $SNAP/opt/ros/kinetic/setup.sh` ; then
. $SNAP/opt/ros/kinetic/setup.sh ;
fi
However, sourcing with the . also takes the arguments to the script, which can cause unintended consequences. Specifically:
$ my-ros-snap --help
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 1: /tmp/setup.sh.AdVqDh39Fd: usage:: not found
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 3: /tmp/setup.sh.AdVqDh39Fd: Generates: not found
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 5: /tmp/setup.sh.AdVqDh39Fd: optional: not found
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 6: /tmp/setup.sh.AdVqDh39Fd: -h,: not found
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 7: /tmp/setup.sh.AdVqDh39Fd: --extend: not found
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 80: [: -lt: argument expected
/snap/my-ros-snap/x2/command-my-ros-snap.wrapper: 19: exec: roslaunch: not found
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#1099, which stopped the Catkin wrapper from forwarding command-line arguments to ROS setup.sh. | |
| stealth/space-bunny-alpha | — | closed resolved | Catkin wrapper argument handling was fixed by snapcore/snapcraft#1099, as confirmed by the maintainer’s final comment. | |
| stealth/space-bunny-alpha | — | closed resolved | Catkin wrapper leaked app args into sourced ROS setup.sh. Fixed by merged PR snapcraft#1099 (commit 13ec80ff0), which clears args while sourcing setup.sh and restores them before exec. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in merged PR #1099 (commit 13ec80ff0): the Catkin wrapper now clears arguments while sourcing ROS setup.sh, preventing crashes with flags such as --help. | |
| qwen/qwen3.6-35b-a3b | — | — | The Catkin plugin wrapper crashes when sourcing setup.sh with arguments. The report was closed without comments or a fix, indicating it was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Sourcing ROS setup.sh in the Catkin plugin wrapper passes arguments to the shell, causing crashes. No fix was implemented. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#1099
(confidence 99%)
Maintainer kyrofa identified this pull request as the fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1099 catkin plugin: don't pass args to setup.sh. | snapcraft | merged | Merged in canonical/snapcraft#1099 (commit 13ec80ff0), fixing LP #1660852 by preventing app arguments from reaching ROS's setup.sh and restoring them for the launched binary. | |
| #1674487 Catkin plugin requires a valid environment before it runs setup.sh | snapcraft (launchpad) | closed | Catkin setup.sh environment handling was fixed in snapcore/snapcraft#1239, cited by the maintainer as the resolution for Launchpad #1674487. |