audacity / audacity/audacity

Audacity reads the project when you discard changes

Open
#1,485 5 comments 0 reactions 0 assignees View on GitHub
AU3-bug P3
Dominant language
C++
Stars
18.4k
Forks
2.7k
Avg merge
3d 3h
Merged PRs (30d)
85

Description

Audacity Recovery does NOT honor the user's selection to discard a broken project.

While working on a project with an extremely large project record (think runaway envelope points), Audacity fails to honor the user's request to DISCARD a broken project. The result is an "infinite" loop.

Automatic crash recovery says:

"The following projects were not saved properly the last time Audacity was run and can be automatically recovered.

"After recovery, save the projects to ensure changes are written to disk.

"Recoverable projects:
"Select Name
" x New Project 2021-08-16 10-57-51 N-1
" x MyBrokenProject"

Both projects are clearly selected. I press the "Discard Selected" button, and up pops another window "Are you sure you want to discard the selected projects? Choosing "Yes" permanently deletes the selected projects immediately."

I select "Yes", but Audacity goes on to OpenConnection at line 342 in ProjectFileIO, reads the project BLOB at line 1894, and hangs again in ProjectSerializer::Decode called at line 1910, which is where it hung up in the first place.

I can work around this problem by renaming the .AUP3 file so Audacity cannot find it, but I shouldn't have to do this.
It should be easy to simulate this error by trapping Audacity at the call to ProjectSerializer::Decode.

Btw, the inclusion of the offer to recover "New Project 2021-08-16 10-57-51 N-1" causes nothing but confusion.

Contributor guide

Open the contributing guide

Research direction

Start in ProjectFileIO at the reported OpenConnection line 342 and project BLOB read near line 1894, then trace the ProjectSerializer::Decode call at line 1910. Reproduce recovery with a broken, very large project and choose “Discard Selected”; done means the discarded project is not read again or left in a hang, while the extra “New Project” entry is addressed if it is part of the same behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.