The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,117 other followers

Audacity error when starting “The application “Audacity.app” can’t be opened.”

Posted by jpluimers on 2020/06/29

For quite a while, I had the error “The application “Audacity.app” can’t be opened.” and Audacity still opening. Clicking the OK button often enough made me hunt for the solution:

This is what I did:

$ cd ~/Library/Application\ Support/audacity
$ grep Temp audacity.cfg
TempDir=/Users/jeroenp/Library/Application Support/audacity/SessionData

Then I checked if the directory existed:

$ find ~/Library/Application\ Support/audacity -type d
/Users/jeroenp/Library/Application Support/audacity
/Users/jeroenp/Library/Application Support/audacity/AutoSave
/Users/jeroenp/Library/Application Support/audacity/Plug-Ins
/Users/jeroenp/Library/Application Support/audacity/SessionData

The odd thing is the directory already existed, so I decided to delete the line, but first needed sed -n (the -n is important: it list only non-matching lines to stdout, see [WayBack] regex – What actually the meaning of “-n” in sed? – Stack Overflow):

$ sed -n '/^TempDir=/p' ~/Library/Application\ Support/audacity/audacity.cfg
TempDir=/Users/jeroenp/Library/Application Support/audacity/SessionData

Since this is Mac OS/Mac OS X/OS X, the -i parameter requires a string even if it is an empty [WayBack] shell – Delete lines in a text file that contain a specific string – Stack Overflow so we get:

$ sed -i '' -n '/^TempDir=/d' ~/Library/Application\ Support/audacity/audacity.cfg

After that, starting audacity still gave the same error and the TempDir entry was re-added.

So I did this:

  1. renamed the audacity directory to audacity.bad,
  2. recreated an empty audacity directory
  3. created empty subdirectories AutoSave, Plug-Ins, SessionData
  4. looped this loop
    1. Start Audacity
    2. On success copy a missing file in the audacity directory tree from the audacity.bad directory tree

In the end, these files were the cause:

  • pluginregistry.cfg
  • pluginsettings.cfg

Since I wasn’t using any plugins, I removed them. Now audacity starts fine.

Now that I had the files pinpointed, I could refine the search and this seems to be a common problem [WayBack] FAQ:Installation, Startup and Plug-ins – Audacity Development Manual: How can I solve Audacity not appearing or crashing on launch, or crashing after I add a plug-in?.

Too bad that page didn’t show up in the original search results.

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: