[solved] Unable to allocate scripting memory

Hello,

I updated to 4.05 and I’m getting the message “Unable to allocate scripting memory”. The fc does meet the requirements described in the docs. Its an mRo X2.1. Previously I did not have any issues.

Has there been a change which can result in this issue?

Thx,
Tobias

The change was probably that it did not complain before, and it does now.
My guess the problem was there all along.

1 Like

THX, but I’m not sure because the scripts where previously working and stopped to do so now.

I have now tested the same script and same settings with a Pixhawk 2.8.4 and it runs without problems. It is a simple startup script which changes the flight mode. It does work on previous Arducopter releases on different X2.1 but not on my current X2.1 with AC 4.0.5 which makes me wonder if the device is defective or if there is something else going on.
Any ideas? I’m a little bit desperate because I already tried many things like adjusting the memory and deactivating SRTL and Terrain Following.

you can also save memory by disabling some EKFs. So the EKx_IMU_MASK parameter can be set to “1” to only enable one EKF. Also make sure that only EKF2 or EKF3 is running by checking/changing EK2_ENABLE and/or EK3_ENABLE.

1 Like

Thank you very much @rmackay9 and @amilcarlucas!

I must apologize, found the error - of course my fault and nothing wrong with AC or the mRo X2.1.

I uploaded the parameter set for an older AC version and that caused the error. I had a log buffer beyond the standard size.

1 Like

please i have same ur problem but it didnot solve
can u help me
i use mission planner with pixhawk 2.4.8

Update to Arducopter 4.1.3-rc2

sorry mr
is this firmware

Yes firmware. And reset all parameters

For anyone else that runs into this issue it’s most likely due to log files taking up all the memory. Going through MAVFTP I went into all log folders, deleted the logs, and disabled logging in general. That fixed everything :slight_smile:

Deleting log files didn’t do anything for you. Disabling logging probably freed some RAM, but that’s probably not a wise feature to disable.

Hello again Yuri, I’ve found my way here as I’ve made a fairly simple script that might work to read the serial stream that I plan on sending to my Pixhawk 2.4.8 through telem2. I’m getting this same error where the script can’t run because there isn’t enough memory. I’ve updated the firmware. Disabled some choice bits that might consume memory unnecessarily, but I’m still getting the same issue. Even entirely disabling logging didn’t do anything to help. What else can I do?

I’m afraid that hardware probably isn’t up to the task. Anything labeled “Pixhawk 2.4.8” these days is a cheap clone of an outdated board. Regardless of the suspect hardware quality, even if it is a faithful reproduction of the spec, it is memory limited to the point where scripting is not likely to work well (or at all).

Your best bet is to invest in a newer autopilot with an H743 processor and SD card support.

I had said I’d get right on it, but I went for a run, came back and rebooted everything… The script I wrote to see if I could even get one working just magically worked and played the sweet sound of ‘CCCCCCCCCC’ through the buzzer. Now I wish I had done something more creative with the sound that I wanted produced, but at least it’s evidence that scripting can work on this specific clone. Lets see how much I can add before it all breaks down.