Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2652 - User is not warned if they launch Audacity with a locked pluginsettings.cfg file
User is not warned if they launch Audacity with a locked pluginsettings.cfg file
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
3.0.0
All All
: P3 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-30 14:33 UTC by Peter Sampson
Modified: 2021-02-02 10:19 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1) lock the pluginsettings.cfg folder 2) launch Audacity 3.0.0 3) Observe: no error message all seems OK
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2021-02-02 00:00:00
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2021-01-30 14:33:08 UTC
The user is not warned if they launch Audacity with a locked pluginsettings.cfg file - all seems normal and launches OK.

The problem conmes later when thy try to use any effect
See P3 Bug #2143
>Effects fail silently (and with buildup of .tmp files) when 
>pluginsettings.cfg is locked

It would be much better (for the user) to trap this at launch with a suitable error message.
And that error message should have a "?" help button that links to the FAQ Error page:
Effects fail silently (and with buildup of .tmp files) when pluginsettings.cfg is locked
Comment 1 Leland Lucius 2021-01-31 10:29:04 UTC
Fix in:

https://github.com/audacity/audacity/commit/21296b0

Seems to work fine, but I need Paul's with setting up an exception to exit Audacity a bit more gently.
Comment 2 Peter Sampson 2021-01-31 11:49:21 UTC
Tested on W10 with Audacity 3.0.0 21296b0

I get no error/warning message when I launch with my pluginsettings.cfg file locked.

Accordingly this gets REOPENED
Comment 3 Peter Sampson 2021-01-31 11:55:54 UTC
Tested on W10 with Audacity 3.0.0 21296b0

This now works properly on Windows, with
a) an message shown to the user
b) help button in the message
c) no launch of the effect while the problem remains
d) fixing the problem by unlocking and then using the Retry button proceeds to launch the effect
e) the Quit Audacity button - "does what it says on the tin"
Comment 4 Peter Sampson 2021-01-31 11:57:03 UTC
OOPS - IGNORE Comment #3 - wrong bug thread - this is for Bug #2143
Comment 5 Peter Sampson 2021-01-31 12:53:26 UTC
(In reply to Leland Lucius from comment #1)
Tested on macOS 11.1 Big Sur with Audacity 3.0.0 21296b0

As on W10, I get no error/warning message when I launch with my pluginsettings.cfg file locked.
Comment 6 Leland Lucius 2021-01-31 18:52:30 UTC
Fix in:

https://github.com/audacity/audacity/commit/8e93cac
Comment 7 Peter Sampson 2021-02-01 10:51:54 UTC
(In reply to Leland Lucius from comment #6)
Testing on W10 with Audacity 3.0.0 accd177

On Windows this works fine
Comment 8 Peter Sampson 2021-02-01 10:54:27 UTC
(In reply to Leland Lucius from comment #6)
Testing on W10 with Audacity 3.0.0 accd177

On Mac the user is correctly blocked with the error message.

But 
1) keep error message open
2) unlock the file
3) click Retry
4) Observe: Audacity crashes

But you can then relaunch Audacity OK

But REOPENING this because of the crash
Comment 9 Leland Lucius 2021-02-01 15:33:19 UTC
(In reply to Peter Sampson from comment #8)
> (In reply to Leland Lucius from comment #6)
> Testing on W10 with Audacity 3.0.0 accd177
> 
> On Mac the user is correctly blocked with the error message.
> 
> But 
> 1) keep error message open
> 2) unlock the file
> 3) click Retry
> 4) Observe: Audacity crashes
> 
> But you can then relaunch Audacity OK
> 
> But REOPENING this because of the crash

Does the crash happen on W10 or Mac? Can you reproduce it? I can't seem to.
Comment 10 Peter Sampson 2021-02-01 15:56:29 UTC
(In reply to Leland Lucius from comment #9)
>Does the crash happen on W10 or Mac? Can you reproduce it? I can't seem to.

OOPS sorry Cut&Paste error ...

It happens on Mac, does not happen on Windows.

It happens on Mac if i "Lock" the file not when I just make it "Read only"
Comment 11 Leland Lucius 2021-02-01 16:46:18 UTC
(In reply to Peter Sampson from comment #10)
> (In reply to Leland Lucius from comment #9)
> >Does the crash happen on W10 or Mac? Can you reproduce it? I can't seem to.
> 
> OOPS sorry Cut&Paste error ...
> 
> It happens on Mac, does not happen on Windows.
> 
> It happens on Mac if i "Lock" the file not when I just make it "Read only"

How are you locking it?  And it happens every time?
Comment 12 Peter Sampson 2021-02-01 17:41:13 UTC
(In reply to Leland Lucius from comment #11)
>How are you locking it?  And it happens every time?

1) Finder
2) Right click on file
3) Select Get Info

In the top block "General" (you may need to expand it)there is a checkbox for locked.

This same crash also happens with a "Locked" and the unlocked pluginregistry.cfg

It does not happen with a locked and then unlocked audacity.cfg file

And yes, repeatable - every time.
Comment 13 Leland Lucius 2021-02-01 18:25:18 UTC
(In reply to Peter Sampson from comment #12)
> (In reply to Leland Lucius from comment #11)
> >How are you locking it?  And it happens every time?
> 
> 1) Finder
> 2) Right click on file
> 3) Select Get Info
> 
> In the top block "General" (you may need to expand it)there is a checkbox
> for locked.
> 
> This same crash also happens with a "Locked" and the unlocked
> pluginregistry.cfg
> 
> It does not happen with a locked and then unlocked audacity.cfg file
> 
> And yes, repeatable - every time.

That helped.  I did get the crash here now.  Researching
Comment 14 Leland Lucius 2021-02-02 02:18:53 UTC
This is the same problem that was causing bug #1561, though the fix for that one may have been a little heavy handed and could have been fixed the same way as this one.

This particular crash is happening because the OnInit() routine was split into two routines and the InitPart2() runs after OnInit() exits. When that happens the "Exist On Frame Delete" flag for the Mac is reset and whenever the first displayed dialog (the configuration file retry dialog in this case) is deleted, Audacity proceeds to exit.

Simple fix committed in:

https://github.com/audacity/audacity/commit/4f7affad3f73d9fed71fefa4169949a489a40b26
Comment 15 Peter Sampson 2021-02-02 10:19:49 UTC
(In reply to Leland Lucius from comment #14)
Testing on macOS 11.1 Big Sur with Audacity 3.0.0 392360a

This Now works properly with locking via
a) the "Locked" checkbox in Finder>Get Info, or
b) setting the file "Read Only"  in Finder>Get Info


Also rechecked that this still works on W10 with this latest build - it does.