-
Notifications
You must be signed in to change notification settings - Fork 19k
AP_Scripting: Only allow scripting restart if disarmed #24106
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
AP_Scripting: Only allow scripting restart if disarmed #24106
Conversation
Scripting is being used and recommended for hard-core flight time work like device drivers. If it can stop and stay stopped, then those recommended uses might need to be re-considered. |
Its not a script problem, its that restarting scripts can cause the flight controller to lock up. Its fine for the majority but there are some cases we have not tracked down. If you don't try and restart there is no problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to get to the bottom of the actual cause
This is the reproduction:
I used a CubeOrange-Plus on master. The same thing works on stable, I have not tried other boards. edit: I have found a minimum script, just need this one line |
We have fixed the particular crash that prompted me to open this, #24231 However, I suspect there are others we have not found yet.... |
This requires the vehicle to be disarmed for scripting to be re-started. Scripts can still be stopped while armed. This is because I found another case where scripting restart causes a flight controller lockup and watchdog on real hardware.
In that case I restarted the
math.lua
test. There have been several of these that we have now fixed, but there might be more we have not found.Crash dump output and watchdog decode from that one are here:
https://discord.com/channels/674039678562861068/719466647710072832/1120113508877598780