Crash: Internal error WaveTrack.cpp:1232 when a Macro runs a generator right after creating the first audio track (Audacity 3.7.5, Windows 11 Pro)

Environment

  • Audacity: 3.7.5 portable
  • OS: Windows 11 Pro (build unknown)
  • UI language: IT (but reproducible with English command names in Macros)

Steps to reproduce

  1. Start Audacity. Make sure the project is empty (no tracks).
  2. Tools → Macros → New → name it BoingTest.
  3. Insert these steps into the macro:
NewStereoTrack:
SelectTracks: Mode="Set" Track="0" TrackCount="1"
SelectTime: Start="0" End="1" RelativeTo="ProjectStart"
Tone: Frequency="440" Amplitude="0.8" Type="Sine" Duration="1"
  1. Tools → Apply Macro… → Project.

Expected

  • Audacity generates a 1-second tone in the newly created track.

Actual

Notes

  • If there is already at least one audio track in the project BEFORE applying the macro, no crash occurs.
  • The crash also occurs when using Chirp or Pizzicato/Pluck instead of Tone.
  • Adding SetTrackStatus: Focused="1" Selected="1" and/or priming with Silence does not avoid the crash when the first audio track is created and a generator is executed within the same macro.
  • Looks like the first WaveTrack is not fully initialised before the generator writes data.

Macro used:

NewStereoTrack:
SelectTracks: Mode="Set" Track="0" TrackCount="1"
SelectTime: Start="0" End="1" RelativeTo="ProjectStart"
Tone: Frequency="440" Amplitude="0.8" Type="Sine" Duration="1"

I hope I managed to explain clearly what happened.
I also hope it’s something that can be fixed and that I didn’t make a mistake on my end.
If the developers need any more information, I’m here.

Thanks for your patience—I’m a new user :wink:

Kain TS

I hope I managed to explain clearly what happened.

Thanks @KainTS , this is a perfect bug report. I created an issue in the bug tracker: Error when applying a macro · Issue #9210 · audacity/audacity · GitHub

1 Like