Hi, and TIA,
Previous situation: Win 10, one or two updates back of Audacity, MACRO WORKS
Currently: same hardware, Win 11 Pro 24H2, Audacity 3.7.0, MACRO CRASHES, but manually performing each step WORKS
I recreated commands with parameters to see if maybe the parameters had changed and to see if my macro was trying to run obsolete commanding. Nothing found.
I reimported from the saved .txt file for that macro to see if Audacity performed its own update/scrub of macro commands on import. No changes.
I’ve debugged it and found that it seems to be a race condition. I was successively doing STEREO TRACK(ADD NEW TRACK) with PASTE and then some other commands like TIME SHIFT RIGHT and/or CHANGE PITCH. But it was dying at the STEREO TRACK(ADD NEW TRACK) command.
In the hopes of allowing all the STEREO TRACK(ADD NEW TRACK) actions to happen and be done first, I reordered things to put all my STEREO TRACK(ADD NEW TRACK) commands up front and then explicitly selected tracks in sequence before performing operations on them. (The previous macro relied on default current selection along the way.)
After putting all the new track commands up front and explicitly going back to select tracks (earlier to later), the macro still crashes. It does not appear to be completing the final STEREO TRACK(ADD NEW TRACK) command before a later command attempts to select an earlier track to work with, whether I use 3 or 4 of those STEREO TRACK(ADD NEW TRACK) commands. (I only need 3 new tracks.)
Note that the issue isn’t even an attempt to access the latest newly created track.
It’s as if the STEREO TRACK(ADD NEW TRACK) interrupts a SELECT TRACK and PASTE operation on an earlier, already existing new track, crashing the macro because the final STEREO TRACK(ADD NEW TRACK) command hasn’t yet completed.
I actually added a new STEREO TRACK(ADD NEW TRACK) command for a track I didn’t intend to use (that’s the 4th one mentioned) simply to try to allow all of the tracks I do intend to use to exist before I operate on them. But that didn’t work – the macro crashes after the final STEREO TRACK(ADD NEW TRACK). That’s why it seems like a race condition with interruption of track-unrelated commanding.
I then started to add slightly redundant SELECT commands after the finale new track command to try to ‘give it time to complete’ before performing PASTE and track effects modifications on earlier tracks, but it still crashes at that final, redundant STEREO TRACK(ADD NEW TRACK) command.
This so feels like a bug in the STEREO TRACK(ADD NEW TRACK) command. What else can I try? The macro used to work just fine, and you can see that I’ve tried reasonable programming style fixes to no end. ???