Skip to content
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

Crash on paste after running batch macro #2021

Closed
SteveDaulton opened this issue Oct 26, 2021 · 8 comments
Closed

Crash on paste after running batch macro #2021

SteveDaulton opened this issue Oct 26, 2021 · 8 comments
Assignees
Labels
bug An error, undesired behaviour, or missed functionality crash / freeze catastrophic errors P1 Highest level priority bugs (ship blocker / must fix)

Comments

@SteveDaulton
Copy link
Member

SteveDaulton commented Oct 26, 2021

Describe the bug
When there is audio on the Audacity clipboard, attempting to paste after running a batch processing macro causes Audacity to crash.

To Reproduce
Steps to reproduce the behavior:

  1. Copy some audio to the clipboard
  2. Clear all tracks from the project
  3. Run a macro on one or more files (example, "MP3 Conversion") and wait for the batch to complete.
  4. "Edit menu > Paste"
  5. Observe crash

Expected behavior
The copied audio to be pasted.

Screenshots

Additional information (please complete the following information):

  • OS: Xubuntu 20.04 / first reported with Windows 10.
  • Version: Confirmed with Audacity 3.0.2 / 3.0.3 / 3.0.5 / 3.1.0

Additional context
The original report on the forum was due to a user attempting to use a macro that they were previously using (successfully) in Audacity 2.4.2, in which they would copy audio to the clipboard, then use a macro to append the audio to multiple files:

SelectAll:
Normalize:ApplyGain="1" PeakLevel="-0.1" RemoveDcOffset="1" StereoIndependent="0"
CursTrackEnd:
Paste:
ExportMp3:

While this did not crash, the macro failed to append the audio from the clipboard. The user has reverted to Audacity 2.4.2.

@SteveDaulton SteveDaulton added bug An error, undesired behaviour, or missed functionality crash / freeze catastrophic errors labels Oct 26, 2021
@SteveDaulton
Copy link
Member Author

SteveDaulton commented Oct 26, 2021

Assert:
UndoManager.cpp(384): assert "n < stack.size()" failed in SetStateTo().

BACKTRACE:
[1] UndoManager::SetStateTo(unsigned int, std::function<void (UndoStackElem const&)> const&)
[2] ProjectHistory::SetStateTo(unsigned int, bool)
[3] ProjectHistory::RollbackState()
[4] wxEvtHandler::TryHereOnly(wxEvent&)
[5] wxEvtHandler::TryBeforeAndHere(wxEvent&)
[6] wxEvtHandler::ProcessEventLocally(wxEvent&)
[7] wxEvtHandler::ProcessEvent(wxEvent&)
[8] wxEvtHandler::ProcessPendingEvents()
[9] wxAppConsoleBase::ProcessPendingEvents()
[10] wxApp::DoIdle()
[11] g_main_context_dispatch
[12] g_main_loop_run
[13] gtk_main
[14] wxGUIEventLoop::DoRun()
[15] wxEventLoopBase::Run()
[16] wxAppConsoleBase::MainLoop()
[17] wxAppConsoleBase::OnRun()
[18] wxAppBase::OnRun()
[19] AudacityApp::OnRun()
[20] wxEntry(int&, wchar_t**)
[21] wxEntry(int&, char**)
[22] main
[23] __libc_start_main
[24] _start

@Paul-Licameli Paul-Licameli self-assigned this Dec 2, 2021
@AnitaBats AnitaBats added this to To do in Sprint 10 - Enhancements&Bug fixes via automation Dec 2, 2021
@AnitaBats AnitaBats added this to the Audacity 3.1.3 milestone Dec 2, 2021
@crsib crsib self-assigned this Dec 8, 2021
@AnitaBats AnitaBats assigned crsib and unassigned crsib and Paul-Licameli Dec 8, 2021
@crsib
Copy link
Member

crsib commented Dec 8, 2021

Oh wow, it's one of the most common crashes in Audacity! Thank you for STR, @SteveDaulton!

@crsib crsib added the P1 Highest level priority bugs (ship blocker / must fix) label Dec 8, 2021
@crsib crsib moved this from To do to In progress in Sprint 10 - Enhancements&Bug fixes Dec 9, 2021
@crsib
Copy link
Member

crsib commented Dec 9, 2021

Another way:

  1. Run Export MP3 on a larger file
  2. Cancel
  3. Run Export MP3 on a larger file
  4. Cancel

Or even

  1. Run Export MP3 on a larger file
  2. Run Export MP3 on a larger file
  3. Cancel

@crsib
Copy link
Member

crsib commented Dec 9, 2021

Optionally, apply the macro to a few files. If the macro succeeds on the first file and fails on any later - Audacity crashes

@crsib
Copy link
Member

crsib commented Dec 9, 2021

  1. Generate sound
  2. Copy to clipboard
  3. Remove track
  4. Use macro on file
  5. Paste
  6. Undo
  7. Use macro on file

Audacity crashes

@crsib
Copy link
Member

crsib commented Dec 9, 2021

As for the original issue with Paste not working for the user - the behavior was disabled by @Paul-Licameli: 105558c while fixing https://bugzilla.audacityteam.org/show_bug.cgi?id=2567

Do we want to restore it?

@SteveDaulton
Copy link
Member Author

SteveDaulton commented Dec 9, 2021

It's a useful feature (as demonstrated by the fact that this bug came to light). I don't think that useful features should be removed unless they are replaced by a superior alternative.

@crsib
Copy link
Member

crsib commented Dec 9, 2021

I have split this issue in two. The issue reported on the forum is moved to #2254

@crsib crsib moved this from In progress to Review in progress in Sprint 10 - Enhancements&Bug fixes Dec 10, 2021
@crsib crsib moved this from Review in progress to Ready for QA in Sprint 10 - Enhancements&Bug fixes Dec 15, 2021
@Penikov Penikov moved this from Ready for QA to In QA in Sprint 10 - Enhancements&Bug fixes Dec 15, 2021
@Penikov Penikov moved this from In QA to Done in Sprint 10 - Enhancements&Bug fixes Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, undesired behaviour, or missed functionality crash / freeze catastrophic errors P1 Highest level priority bugs (ship blocker / must fix)
Projects
No open projects
Development

No branches or pull requests

5 participants