audacity / audacity

Audio Editor
https://wiki.audacityteam.org/wiki/For_Developers
Other
12.59k stars 2.26k forks source link

Crash when quitting Audacity with more than one projects open #4023

Closed dozzzzer closed 1 year ago

dozzzzer commented 1 year ago

Bug description

Audacity crashes when a) more than one project is opened and b) at least one of them has the RT effect panel opened

Steps to reproduce

  1. Have two .aup3 project saved each containing one mono track with some audio
  2. Open project A
  3. Open project B
  4. Open the RT effects panel of the audio track by clicking the "Effects" button
  5. Cmd + Q
  6. Observe

Expected behavior

No crash

Actual behavior

Crash:

https://sentry.audacityteam.org/share/issue/4fa38faa4cbe41fa8f03fcc99bebeae2/

A subsequent program launch with an attempt to recover the projects shows that one project's changes were lost.

Audacity Version

https://github.com/audacity/audacity/actions/runs/3620736603

Operating system

macOS, Windows

Additional context

Paul-Licameli commented 1 year ago

Is the description complete? Must there be an effect in the sidebar? The stack trace suggests that you had one of the TAL effects loaded at the time.

dozzzzer commented 1 year ago

Is the description complete?

Yes, I've reproduced this bug a number of times not having a single effect in the stack

Paul-Licameli commented 1 year ago

I failed to reproduce once, then added a TAL effect, then got it -- I've tried VST and AU versions of TAL so far.

I found some clues in the debugger. It may involve @vsverchinsky 's recent changes with TipWindow. Not confirmed yet.

Paul-Licameli commented 1 year ago

Now I'm having trouble repeating it. This bug seems to fleet. I think it involves random memory overwrites.

Paul-Licameli commented 1 year ago

I think a more reliable and precise STR is:

1) Open one project 2) open another project 3) Open the sidebar OF THE SECOND project 4) then ctrl+q

Paul-Licameli commented 1 year ago

I suspect commit 2624e1c1756d4b4c388ec1f334e7bd5b729f10e4 which lately fixed #3997 introduced this other crash, but proof is difficult with the intermittency of the crash.

Paul-Licameli commented 1 year ago

Maybe @dozzzzer you can confirm that this last build of the release branch before that commit is free of this bug: https://github.com/audacity/audacity/actions/runs/3585392211

vsverchinsky commented 1 year ago

I suspect commit 2624e1c which lately fixed #3997 introduced this other crash, but proof is difficult with the intermittency of the crash.

Unlikely, I can reproduce a bug without this commit.

dozzzzer commented 1 year ago

Maybe @dozzzzer you can confirm that this last build of the release branch before that commit is free of this bug

Yes, confirm that, the next release build already has this bug in it

vsverchinsky commented 1 year ago

Unlikely, I can reproduce a bug without this commit.

Sorry, not true, I've tested it at wrong commit

petersampsonaudacity commented 1 year ago

I can reproduce this on W10 with @Paul-Licameli 's simpler STRs with: audacity-win-3.2.2-beta-20221205+3d1ab64-x64-msvc2022

BUT note that I don't get offered recovery for either of the two projects on re-launch UPDATE If I add a step 2.1 to Paul's STRs and make an editing change to Project-2 then I do get offered recovery of both projects. But if I just add a step 1.1 when i make an editing change to Project-1 then I do NOT get offered recovery on relaunch.

And for me this is NOT a regression on 3.2.1 or 3.2.0 on W10 - where I get the same crash (and in earlier versions the TCP Effects button was not present)

petersampsonaudacity commented 1 year ago

When I try to send the crash report I get a failure error:

image

petersampsonaudacity commented 1 year ago

Even simpler STRs - only one project needed for the crasj

  1. Open an existing project
  2. Click on Effects button in TCP
  3. Ctrl+Q to quit
  4. Observe crash
dozzzzer commented 1 year ago

Verified on macOS Ventura & Windows 11

vsverchinsky commented 1 year ago

@petersampsonaudacity Doesn't reproduce for me with your STR (tried both before the hot fix and after). Tried with simple project though, with no effects

dozzzzer commented 1 year ago
  • Open an existing project
  • Click on Effects button in TCP
  • Ctrl+Q to quit
  • Observe crash

I wasn't able to reproduce it following these STR either