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

Audacity Bugzilla



Bug 1263 - Build up of aud***.tmp files in Roaming->Audacity if audacity.cfg is locked read-only
Build up of aud***.tmp files in Roaming->Audacity if audacity.cfg is locked r...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
2.1.2
Per OS All
: P3 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on: 1264
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-21 06:20 UTC by James Crook
Modified: 2021-02-01 12:22 UTC (History)
4 users (show)

See Also:
Steps To Reproduce:
1) Go into user/Roaming/Audacity and right-click on audacity.cfg and change its permissions to be read only. 2)Also make pluginsettings.cfg read only. 3) Open Preferences and OK, or make a change to the preferences and OK. 4) Observe: About six aud*.tmp files are written. 5) Open an effect, 6)change its settings and OK (or Apply an RTP effect). 7) Observe: One plu*.tmp file is written per OK or Apply. 8) Observe: The effect cannot be applied, and a non-RTP effect does not close on OK.
Release Note:
Group: Problems reopening, saving or crashing in projects *If your audacity.cfg file becomes locked then you may experience a build-up of aud****.tmp files in you audacity settings folder. Note that this should not happen in normal circumstances, but some virus checker apps have been know to lock the file.
First Git SHA:
Group: ---
Workaround:
Unlock your audacity.cfg file - please see: https://manual.audacityteam.org/man/faq_installation_and_plug_ins.html#reset Delete the aud****.tmp files
Closed: 2021-02-01 00:00:00
gale: Regression+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Crook 2015-11-21 06:20:02 UTC
When using a virus checker such as MacAffee, there can be a build up of files with names like aud7071.tmp in the user->Roaming->Audacity directory where the audacity.cfg file lives.  More are created every time the Audacity preferences are updated.
Comment 1 James Crook 2015-11-21 06:28:12 UTC
Added release notes, steps to reproduce and (provisional) P1.
Comment 2 Peter Sampson 2015-11-21 06:51:04 UTC
Should we be considering adding a clean-up routine on exit from Audacity to remove the aud*.tmp files?
Comment 3 James Crook 2015-11-21 07:00:07 UTC
(In reply to Peter Sampson from comment #2)
Yes!  However I don't think that should impact our 2.1.2 release.  It's not important enough to require a respin, provided this bug is as we think it is.  We do clean-up on exit, or an equivalent, for 2.1.3.
Comment 4 James Crook 2015-11-24 03:26:23 UTC
Demoted to P2 now that bug #1266 exists.  Depends on #1264 as that this happens silently is an integral part of the problem.
Comment 5 Gale Andrews 2015-11-24 07:15:37 UTC
Removed the block on 1266 per http://bugzilla.audacityteam.org/show_bug.cgi?id=1264#c2 .
Comment 6 Gale Andrews 2015-11-24 07:26:10 UTC
I think this should be P3, given bug 1264 is currently P3. P2 for both would also be OK with me if most people want that. I think they are both P2/P3 borderline.
Comment 7 James Crook 2015-12-26 15:01:19 UTC
Leland's fix for bug 1266 should have fixed the root cause of this.  I have additionally added Leland's reduction in preference flushes:

https://github.com/audacity/audacity/commit/9dd79c9f808ea1abe7dddd3bf4505b3420bd70d3

There's no need for a clean-up routine if we are not creating the extra files.  So marked DEVEL-FIXMADE.
Comment 8 Peter Sampson 2015-12-26 16:45:24 UTC
(In reply to James Crook from comment #7)
testing on audacity-win-r13f1349-2.1.2-alpha-27-nov-15 on W10 shows no build-up of any aud*.tmp files.
Comment 9 Gale Andrews 2016-01-01 16:02:19 UTC
I've seen no build of TMP files in my tests for bug 1266.
Comment 10 Gale Andrews 2016-01-01 16:50:33 UTC
(In reply to Gale Andrews from comment #9)
REOPENED. 

Win 10, McAfee LiveSafe has been uninstalled. Oops I did not actually test against bug 1264. On a read-only audacity.cfg there still aud*.tmp files being created (but many fewer than before) and on a read-only pluginsettings.cfg plu*.tmp files are still being created. Plugins cannot be used while pluginsettings.cfg cannot be written to. 

Steps to Reproduce adjusted.
Comment 11 James Crook 2016-01-01 17:09:00 UTC
Good catch.  My comment #7 was inaccurate!  I was too caught up in bug 1266.  P3 seems right.
Comment 12 James Crook 2018-09-21 04:01:10 UTC
*** STEPS UPDATED ***

Note that this requires write protection of audacity.cfg!!

Demoted from P3 to P4 as we are now less gung-ho about release notes (there are too many for users to wade through)
Comment 13 Peter Sampson 2019-06-18 08:54:45 UTC
Still happens on W10 with audacity-2.3.3-alpha-271-d84ab5948d544eec6ba6a648d76d31ef9d5edc88

having the plufinsettings file locked causes a build-up of files of the form plu***.tmp - see Bug #1264  -  these files are not cleaned-up or purged by Audacity


Testing on macOS 10.14.5 I also see a build of of temporary files of the form audacity****** - and these are not 

So assume all platforms
Comment 14 Peter Sampson 2019-08-09 09:42:35 UTC
Elevating to P2 in line with other ***.cfg locked file issues
Comment 15 Peter Sampson 2019-08-22 06:40:03 UTC
Demoted to P3 with a Release Note and Workaround as this file should not become locked in normal use of Audacity.
Comment 16 Peter Sampson 2020-04-05 07:22:59 UTC
Testing on macOS 10.15.5 with Audacity 2.4.0 b4d6595

This bug remains extant for 2.4.0
Comment 17 Leland Lucius 2020-04-14 16:07:45 UTC
I can add an error dialog informing the user that saving the configuration file has failed and to refer to Help -> Diagnostics -> Show Log for more info.  They will see messages like these:

14:38:49: Error: can't remove file 'C:\Users\Yam\AppData\Roaming\audacity\audacity.cfg' (error 5: Access is denied.)
14:38:49: Error: Failed to update user configuration file.

We could check for "common" causes before flushing the configuration file, but all that gets us is more specific error messages.  And there will still have to be the above "catch all" for situations we don't detect.

In any case, the audacity.cfg will NOT have been updated, so the user should get told about it.

And there's not really anything we can do about the "tmp" files.  We could "guess" that all "audXXX.tmp" files in the same directory as audacity.cfg are bogus and failed attempts, so just delete them, but it would only be a guess and might be a bit too dangerous.
Comment 18 Leland Lucius 2020-04-14 16:23:45 UTC
I've just tried the "message" dialog idea and there's a slight problem with it.  We "Flush" changes to the audacity.cfg file all over the place and we'd get a message box for every single Flush.  And the majority of Flushes do not check the success or failure, so will just keep throwing up the dialog.  (Exiting preferences throws up about 10 message dialogs.)

So, I'm wondering if this might be a really good case for using Paul's fancy exception handling.  Would need help from Paul to get it right though.
Comment 19 James Crook 2020-04-14 16:27:27 UTC
RM: Too risky to fix this for 2.4.0.
Comment 20 Peter Sampson 2021-01-12 11:11:36 UTC
We used to get user reports on the Forum with this happening - but we have not had this for a very long while now - we used to think that maybe the files got locked by virus checkers,

So the basic way of this happening is "extreme user error" i.e. the user deliberately locking the file.

Accordingly I am going to downgrade this to P4
Comment 21 Leland Lucius 2021-02-01 04:10:57 UTC
This should be fixed in:

https://github.com/audacity/audacity/commit/21296b0
Comment 22 Peter Sampson 2021-02-01 12:22:18 UTC
Tested on W10 and macOS 11.1 Big Sur with Audacity 3.0.0 accd177

This no longer happens as Audacity is blocked when audacity.cfg is locked

See
Bug #2649 and Bug #1264