Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if _chosen_goal has value before accessing #406

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

piliwilliam0306
Copy link
Contributor

Bug fix

Fixed bug

if _chosen_goal doesn't have value, it may raise:

terminate called after throwing an instance of 'std::bad_optional_access'

This PR checks if _chosen_goal has value before accessing

Signed-off-by: will <piliwilliam0306@gmail.com>
Copy link
Contributor

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good catch, you're right that this should not be here. I think it was a debug printout that should've been removed before it was merged into main.

I think we should actually remove the log entirely instead of protecting it with an if-statement since _find_plan is already logging all relevant updates about the chosen goal.

@piliwilliam0306
Copy link
Contributor Author

Very good catch, you're right that this should not be here. I think it was a debug printout that should've been removed before it was merged into main.

I think we should actually remove the log entirely instead of protecting it with an if-statement since _find_plan is already logging all relevant updates about the chosen goal.

@mxgrey
Thanks for reviewing, removed!

@mxgrey mxgrey enabled auto-merge (squash) February 27, 2025 16:49
auto-merge was automatically disabled February 28, 2025 01:04

Head branch was pushed to by a user without write access

Signed-off-by: will <piliwilliam0306@gmail.com>
@mxgrey mxgrey enabled auto-merge (squash) March 3, 2025 01:52
@mxgrey mxgrey disabled auto-merge March 3, 2025 05:18
@mxgrey mxgrey merged commit 94de148 into open-rmf:main Mar 3, 2025
6 checks passed
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (3be4edf) to head (288c36b).
Report is 117 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #406       +/-   ##
=========================================
- Coverage   17.61%      0   -17.62%     
=========================================
  Files         209      0      -209     
  Lines       19351      0    -19351     
  Branches     9297      0     -9297     
=========================================
- Hits         3409      0     -3409     
+ Misses      12274      0    -12274     
+ Partials     3668      0     -3668     
Flag Coverage Δ
tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 209 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants