Skip to content

Copter: SmartRTL can trigger flow-of-control internal error #17416

Open
@rmackay9

Description

During testing of Copter-4.1 a user managed to trigger these lines of code in SmartRTL. In SITL this causes the simulator to crash (on purposes so that we can catch these types of error) but on a real vehicle the vehicle would immediately land and the user would find they were unable to re-arm and takeoff because of this internal error.

        } else if (g2.smart_rtl.get_num_points() == 0) {
            // We should never get here; should always have at least
            // two points and the "zero points left" is handled above.
            INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control);
            smart_rtl_state = SmartRTL_PreLandPosition;

by doing this in SITL:

1) Start mavproxy SITL, "sim_vehicle.py --console --map"
2) Set the ALT_HOLD mode
3) Set mode 21 (SRTL)
4) Set ALT_HOLD
5) Set mode 21 (SRTL)
6) ArduCopter will at this point crash and mavproxy reports "no link" 

@tridge has reproduced the issue in SITL.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions