MAVSDK: Consecutive param sets trigger exception
@dakejahl reports:
This causes an exception
_param_interface->set_param_int(param_name, val);
_param_interface->set_param_int(param_name, val);
terminate called after throwing an instance of 'std::future_error'
what(): std::future_error: Promise already satisfied
Is there a reason why setting parameters back to back like this would be a problem? If I add a sleep in between it works
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (6 by maintainers)
std::shared_ptr
for plugins is no longer necessary, and we’re updating the examples: https://github.com/mavlink/MAVSDK/pull/1270/files#diff-76a888fbf298963b3e21d48a9d7efd522e32ac8e65446b29311addaf78602453R104-R106I would challenge that.
It’s often inconvenience against safety, I’d say.
@dakejahl to get a backtrace, just run it with gdb.
Or save a core dump: https://stackoverflow.com/questions/17965/how-to-generate-a-core-dump-in-linux-on-a-segmentation-fault