Batch Parameter Changes via pymavlink Causing ‘AP: Internal Errors 0x100000’ in Copter - SITL

Hi everyone,

I’ve run into a really puzzling issue and would love to get your thoughts. I’m using pymavlink to send a batch of parameter-change commands to an ArduCopter running in SITL, and every so often the SITL console spits out this message:

AP: Internal Errors 0x100000

(see screenshot below).

I tried to dig in and figure out what’s going on, but as soon as I cut down on the number of parameters I’m setting in one go, the error vanishes completely. Has anyone else ever seen this? Do you know what might be causing it?

For reference, I’m running AP: ArduCopter V4.7.0-dev.


Steps to reproduce

I’ve attached a simple Python 3 script (testsend.py) that automates sending the parameters, as well as the list of parameters & values (testin.txt) and the corresponding log files.

  1. Start the copter
    In one terminal (cmd1) run:
Tools/autotest/sim_vehicle.py -v ArduCopter --console --map -w
  1. Initialize and arm
    Once SITL is up, enter:
mode guided
arm throttle
takeoff 30
  1. Prepare for parameter injection
    In a second terminal (cmd2), make sure testin.txt is in the working directory.
  2. Set a waypoint
    In the map window, right‑click any point and choose “fly to”.
  3. Run the script
    (Make sure you’ve installed pymavlink: pip install pymavlink)
    Then in cmd2:
python testsend.py
  1. Trigger the error
    If you don’t see Internal Errors on the first run, just re‑run the command. Usually after two to four attempts the error will pop up.

I’m a bit stumped by why this only happens when I batch a larger set of changes. Any clues or suggestions would be hugely appreciated!

Thanks in advance!

There is a limit on the number of parameters that can be set. It has to do with the way the parameter memory is managed.

Thanks! Could you please let me know where this limit is defined? I’d like to find out the maximum number of parameters that can be changed in a single batch—it would be really helpful. Also, this issue feels like a “ghost,” since sometimes it’s triggered and other times it isn’t.

I do not know exactly where the limit is, nor where it is defined.

Maybe another dev could chime in?