Closed calumblair closed 8 months ago
Ideally, when importing a file with no hash (as distinct to an incorrect hash), APX-GCS should generate a valid hash.
The problem is here (buffer overflow): https://github.com/uavos/apx-gcs/blob/ba6fd47077d8f8d095329122913a1d7e8610808e/src/Plugins/Protocols/PApx/PApxMission.cpp#L445
Mission hash is not used by the mission import function. https://github.com/uavos/apx-gcs/blob/9977a6a6c2cd1fef557493fc66d30e4f2677ea0f/src/lib/ApxGcs/Mission/VehicleMission.cpp#L337
The purpose of HASH field is to speed-up files identification and check integrity of files when needed by other utilities. Also, the hash value does not depend on mission title.
Describe the bug When a yaml mission is imported and the hash does not match or the mission file has been edited, APX-GCS will crash when uploading it to the vehicle. To Reproduce Steps to reproduce the behavior:
to
See file copied below.
Click "upload to vehicle". APX-GCS will hang and become unresponsive. Screenshot:
Expected behavior APX-GCS should tell me that the file has a bad hash, or it should load the file and generate a new hash. It should not hang.
Screenshots
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
See file below:
default_seattle_sim_edited.mission
: