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

GCS_MAVLink: deny attempt to do partial upload while mission transfer in progress #27021

Merged

Conversation

peterbarker
Copy link
Contributor

Fixes this internal error:

ardurover: #4  0x0000604a12ed5b75 in AP_HAL::dump_stack_trace () at ../../libraries/AP_HAL_SITL/system.cpp:147
ardurover: No locals.
ardurover: #5  0x0000604a12ed5757 in AP_HAL::panic (errormsg=0x604a1302b4cd "AP_InternalError::error_t::%s") at ../../libraries/AP_HAL_SITL/system.cpp:51
ardurover:         ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7ffd7b9dec00, reg_save_area = 0x7ffd7b9deb40}}
ardurover: #6  0x0000604a12dc0d9f in AP_InternalError::error (this=0x604a13139258 <instance>, e=AP_InternalError::error_t::flow_of_control, line=217) at ../../libraries/AP_InternalError/AP_InternalError.cpp:28
ardurover:         buffer = "flow_of_ctrl", '\000' <repeats 36 times>, <incomplete sequence \354>
ardurover: #7  0x0000604a12fd4eee in MissionItemProtocol_Fence::allocate_receive_resources (this=0x604a14c4a930, count=0) at ../../libraries/GCS_MAVLink/MissionItemProtocol_Fence.cpp:217
ardurover:         allocation_size = 0
ardurover: #8  0x0000604a12fd4ff4 in MissionItemProtocol_Fence::allocate_update_resources (this=0x604a14c4a930) at ../../libraries/GCS_MAVLink/MissionItemProtocol_Fence.cpp:240
ardurover:         _item_count = 0
ardurover:         ret = 24650
ardurover: #9  0x0000604a12fd3f9c in MissionItemProtocol::handle_mission_write_partial_list (this=0x604a14c4a930, _link=..., msg=..., packet=...) at ../../libraries/GCS_MAVLink/MissionItemProtocol.cpp:231
ardurover:         ret_alloc = 32765
ardurover: #10 0x0000604a12ddd41c in GCS_MAVLINK::handle_mission_write_partial_list (this=0x604a14c44360, msg=...) at ../../libraries/GCS_MAVLink/GCS_Common.cpp:783
ardurover:         packet = {start_index = 3, end_index = 3, target_system = 1 '\001', target_component = 1 '\001', mission_type = 1 '\001'}
ardurover:         use_prot = 0x604a14c4a930
ardurover: #11 0x0000604a12de5238 in GCS_MAVLINK::handle_common_mission_message (this=0x604a14c44360, msg=...) at ../../libraries/GCS_MAVLink/GCS_Common.cpp:4316
ardurover: No locals.
ardurover: #12 0x0000604a12de4d75 in GCS_MAVLINK::handle_message (this=0x604a14c44360, msg=...) at ../../libraries/GCS_MAVLink/GCS_Common.cpp:4068

The included autotest recreates the problem before the patch is applied.

@peterbarker peterbarker force-pushed the pr/fencefullandpartialtransferfix branch from 1f9c9ad to a2054df Compare May 14, 2024 00:01
… in progress

fixes an internal error where we make sure resources are not allocated before allocating upload resources.

The user may receive a DENIED message if they move a waypoint before an item has been transfered to the vehicle.
@peterbarker peterbarker force-pushed the pr/fencefullandpartialtransferfix branch from a2054df to d9934fa Compare May 14, 2024 11:23
@peterbarker peterbarker merged commit 9f0e191 into ArduPilot:master May 15, 2024
91 checks passed
@peterbarker peterbarker deleted the pr/fencefullandpartialtransferfix branch May 15, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants