Lua script buttons odd behavior

Linux
Nightly Build: 9.2.613

Not sure if this is Ardour / script itself / or just me.
I was playing around with the Action buttons in the main toolbar.
-I click on an empty button
-Dialog appears
-I click on the drop down to select a script
-I choose Add Audio Track
-I click Add
-The button now shows A so it is assigned
-The first time I click on this button it does work, a new audio track gets created
-However, when I click on that button again, it shows dialog again as if the button was never assigned to this Lua script.
I would think it would just keep allowing user to create more new Audio Tracks.

Am I doing something incorrectly or is this maybe a bug?

Thank You

1 Like

Looks like there’s a problem in that script. The Log windows says…

LuaInstance: action "3": ?:-1: attempt to call a nil value (field 'routeScrollIntoView')

When scripts crash like that they get unloaded/forgotten. (Lua Scripts > Script Manager shows what’s currently assigned/loaded.) That’s why clicking the button the next time shows the dialog, because nothing’s loaded for that button now despite the “A” still being shown.

Mute All Tracks works fine, for example.

1 Like

This is normal. You’re doing nothing wrong. It just means that that script hasn’t been updated to account for whatever Lua-bindings changes have been implemented since its original authoring. (And the fact that it creates a new track, then the button is unassigned simply means that whatever error is happening is happening after the basic track-creation step in the script.)

When a user develops a script, they can test it in the ‘Scripting’ window, and there it will print any errors that may or may not occur. But currently, un-assignment of buttons happens somewhat ‘silently’.

Looks like maybe @x42 might have some Lua scripts to update. :slight_smile:

-J