Audacity FAQ – Errors

1 Why do I get “Error while opening sound device”?
2 Why do I get “Error: not well formed (invalid token) at line x”?
3 Why does the computer reboot or show a blue screen stop message when I play or record in Audacity?
4 I found a bug! Or Feature X is not good enough or missing! Now what?

Why do I get “Error while opening sound device”?

This error message asks you to check the input or output device settings and the Audacity project sample rate. If the message mentions “input device”, it means there’s a problem with your Audacity, operating system or sound device recording settings, and if it mentions “output device”, it means there is a problem with your playback settings. Either message can suggest a problem with the drivers of the sound device.

The input device message most commonly occurs on Windows Vista or 7 when one of the sound device inputs is not properly enabled or otherwise cannot respond to Audacity’s request to start recording.

Check Audacity Settings

It may be a good idea to try to play or record after checking or changing each of the following Audacity settings. Sometimes a project rate change is all that is needed.
  • Set the project rate bottom left of the Audacity window to the standard rate of 44100 Hz (or if your sound card only supports a particular rate such as 48000 Hz, set the project rate to that). Help > Audio Device Info… should show the rates the device claims to support.
  • Try turning off Transport > Software Playthrough (on/off) (this should never be enabled if recording computer playback).
  • Try turning off Transport > Overdub (on/off) because recording while playing could stress your sound device or computer. If this solves the problem, read the Wiki pages Updating Sound Device Drivers and Managing Computer Resources and Drivers for advice on how to make your sound device or computer more capable.
  • Check in Device Toolbar that the output and input devices are correctly and explicitly selected.
    • On Windows, don’t choose “Microsoft Sound Mapper” or “Primary Sound Driver” which point to the current Windows default device; choose the required device by name. Try selecting “Windows Direct Sound” as the “Host” instead of “MME”.

Check operating system settings

  • Windows: Go to the system control panel and follow the Wiki instructions for Windows 2000 or XP or Vista or 7 to ensure all available inputs are listed and enabled.
Additionally on Vista or 7, these steps are strongly recommended:

  1. In Sound, right-click over or select the recording and playback device in turn, choose “Properties”, then the “Advanced” tab
  2. Set Default Format to the same sample rate, bit-depth and number of input channels as in Audacity
  3. Put a checkmark in both Exclusive Mode boxes (this allows Audacity to directly request the sample rate from the sound device if the “Host” in Device Toolbar is set to “Windows Direct Sound” as above).
  • Mac OS X: In Finder, choose Go > Utilities > Audio MIDI In “Audio Devices”, select in turn the required Input and Output devices. Set “Format” to the same sample rate, bit-depth and number of input channels as in Audacity.
  • Linux:
While troubleshooting, ensure that Transport > Software Playthrough (on/off) is off. Only enable this option if you really need it, after you have established that Audacity is recording correctly.
  1. In the first instance, try refreshing Audacity’s list of audio devices at Transport > Rescan Audio Devices then select the default option in Device Toolbar. If the error still occurs, recheck the Audacity settings.
  2. It is possible that another application may have exclusive access to the audio device. Try logging out and back in again, then re-check the Audacity settings before opening any other application that may use the audio device.
    • If pulse is an option in Device Toolbar, ensure that you have Pulse Audio Volume Control (pavucontrol) installed. If it is not installed, use your system’s package manager to install it. Open Pulse Audio Volume Control and check that there is an available output device.
    • If Jack Audio System is running on the computer, ensure that it is selected as the Host in Device Toolbar.
  3. Open the system Sound Preferences and check that a recording device is available. Sound Preferences is often available through a loudspeaker icon on the Desktop, Desktop panel, or in the system Preferences menu.
  4. Open AlsaMixer (type alsamixer in a terminal window) and check the sound card and recording device settings. To view the AlsaMixer manual, type man alsamixer in a terminal window.

Check sound device drivers and firmware

The computer’s built-in sound device should usually have the latest drivers for your operating system, supplied by the motherboard or computer manufacturer. A PCI or external sound card should usually have the latest drivers and firmware supplied by the manufacturer of the device. See Updating Sound Device Drivers on the Wiki for help with correcting driver issues.

Check PCI card or external sound device settings and connections

If you use a high-end PCI sound card or external USB or Firewire interface, you must make the sample rate, bit-depth and number of input channels the same in all possible places. This is especially important if you are recording Multi-Track Overdubs where you play and record at the same time. Settings must match in:

  • the Audacity Project Rate
  • the track(s) in Audacity (to resample tracks to the Project Rate, select each track in turn then choose Tracks > Resample…).
  • all inputs and outputs in the operating system sound control panel or application
  • all inputs and outputs in any software or hardware control panel the sound device may have.
Make sure the device is connected properly. “Error while opening…” will occur if the device becomes disconnected during an Audacity session and you then try to play or record. Reconnect the device then choose Transport >Rescan Audio Devices.



Why do I get “Error: not well formed (invalid token) at line x”?

This usually means that the AUP project file contains an unexpected non-English, accented or control character at the line quoted in the error message. There are two main causes.

  • The project contains non-English or accented characters and was created in an ANSI build of Audacity, where Windows was running in other than English. ANSI builds are not properly Unicode aware, so do not support creating or re-opening projects containing non-English or accented characters.
    • All recommended downloads of Audacity fully support Unicode. You can check your Audacity version at Help > About Audacity….
  • The project contains imported files whose metadata (like artist or genre) contains control characters. This mostly occurs with iTunes files on OS X where the project was created in an older version of Audacity.
Warning icon Very rarely, Audacity may not write the .aup file completely when saving a project. This may or may not be accompanied by an obvious Audacity crash. If there was a crash, the next time you launch Audacity it will offer to recover the project as it was just before you saved it.

  • If recovery is not offered, the invalid token error may appear when reopening the project. Please either ask on the Audacity Forum for help (attaching the .aup file as it is) or see if you can recover the project manually.

Solution for error caused by invalid characters

  1. Make a copy of the AUP project file and open it in a text editor like Notepad (Windows) or TextEdit (Mac).
  2. Turn word wrap off in the menus (or in TextEdit, drag the window horizontally so that lines do not wrap).
  3. In the line indicated in the error message, look for one of these:
    • projname=
    • name=
    • value=
    • title=

    then remove all characters inside the quotation marks that follow which are not a number or an A to Z letter. You could also change those characters to a number or A to Z letter. For example, a string of control characters you would want to remove or change might start with &# followed by four numbers and a semi-colon, such as &# 0 0 1 3 ;.

  4. Save the changes to the .aup file.
  5. If you re-open the project and an error occurs at another line, repeat the steps above in the new line indicated in the error message.
Here is a real-world example of a corrupt line in the GENRE tag in a project where “Drama” and “Comedy” were incorrectly separated using the control character for a horizontal tab, also missing the closing semi-colon:<tag name=”GENRE” value=”Drama &# 0 0 0 9 Comedy”/>

And the same line corrected so that the two words can be read into the project:

<tag name=”GENRE” value=”Drama, Comedy”/>

“Drama 0009 Comedy”, though meaningless, would also enable the project to be opened correctly.

Warning icon If you had to rename “projname” in the AUP file, rename both the AUP project file and the corresponding _data folder so that they have the same name as “projname” in the AUP file.

Solution to correct an AUP file created in an ANSI version of Audacity, preserving non-English characters

  1. Make a copy of the file
  2. Open the file in Notepad++ (a free text editor that supports UTF-8 encoding of Unicode characters)
  3. Choose Encoding > Convert to UTF-8 without BOM
  4. Save the changes to the file.


Why does the computer reboot or show a blue screen stop message when I play or record in Audacity?

This isn’t Audacity’s direct fault because it does not have kernel privileges to stop or restart the computer. The only general advice we can give is to update the drivers of the sound device you are using, and to examine the memory dump for any further information as to the faulting module or library.

It mostly affects Windows computers. Even if the problem occurs on updating to the latest Audacity version, it isn’t directly an Audacity problem because Audacity does not have the kernel privileges to stop or reboot the computer. Faulty or out-of-date drivers (usually for a sound device) are usually the cause. Inappropriate drivers can also cause Audacity to crash during playback or recording, without necessarily crashing the computer.

The computer’s built-in sound device should usually have the latest drivers for your operating system, supplied by the motherboard or computer manufacturer. A PCI or external sound card should usually have the latest drivers and firmware supplied by the manufacturer of the device. See Updating Sound Device Drivers on the Wiki for help with correcting driver issues.

If necessary the exact driver or module causing a computer crash can be pinpointed on Windows by examining the memory dump made when the crash occurred. You can find the dump by right-clicking over My Computer or Computer > Properties, then click the “Advanced” link or tab, then under “Startup and Recovery”, choose “Settings…”.

If your best available sound card drivers prove to be incompatible with current Audacity, we may not be able to take any direct action, but do let us know:

  • the exact make and model number of the sound device
  • the exact driver and firmware model numbers
  • the exact operating system you are using, including the Service Pack if you are on Windows.
Warning icon If you encounter Audacity or computer crashes when recording, do not enable “Play and/or record using RAM” in Audacity’s Directories Preferences. If RAM caching is enabled, recordings that crash in progress will be permanently lost.

“I found a bug!” or “Feature X is not good enough or is missing!” now what?


The most important things when reporting a bug are to be as specific as possible and check first in the Release Notes if we already know about the problem.

If the bug is not known about, please give us enough information that we can reproduce the bug ourselves on the correct operating system. Otherwise it’s unlikely that we’ll be able to fix it.

Warning icon Please include the following essential information in your report:

  • Your exact three-section version number of Audacity (for example, 2.0.0) – you can check this at Help > About Audacity or Audacity > About Audacity on a Mac computer
  • The exact operating system you are using (for example, Windows 7 Service Pack 1, Mac OS X 10.6.8, Linux Ubuntu 11.10)
  • Any other information about your computer and its audio connections that might be relevant (for example, 2 GB RAM, 2.2 GHz, M-Audio Fast Track USB interface).

If you can make the problem happen consistently, tell us the exact sequence of events, step-by-step from launch of Audacity that causes the bug to occur.

If you see an error message, be sure to send us the exact text of the error message, or attach an image. If you are on OS X or Linux a crash report is useful too.