FAQ:Errors



< Back to: FAQ:Editing

|< Index of Frequently Asked Questions



Why do I get "Error while opening sound device"?
This error message asks you to check the recording or playback device settings and the Audacity project sample rate. If the message mentions "recording device", it means there's a problem with your Audacity, operating system or sound device recording settings. If the message mentions "playback device", it means there is a problem with your playback settings.

Either message can suggest a problem with the drivers of the sound device, or possibly that you are asking the device to do something it cannot do. For example you will see this error if you attempt to append record to more channels than your device supports, or if you try to overdub on a device that can either record or play back but not both.

The recording device message most commonly occurs on Windows Vista, Windows 7 or Windows 8 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

 * Set the project rate bottom left of the Audacity window to the standard rate of 44100 Hz (or if your soundcard only supports a particular rate such as 48000 Hz, set the project rate to that). should show the rates the device claims to support.


 * Try turning off (this should never be enabled if recording computer playback).


 * Try turning 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 playback and recording 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: Follow the Wiki instructions for Windows XP or Windows Vista, Windows 7 or Windows 8 to configure the Windows sound settings. The key points are:
 * Ensure all available inputs are listed and enabled in the Windows Control Panel.
 * Additionally for Windows Vista, Windows 7 or Windows 8: Ensure Default Format for the playback and recording devices contains the same sample rate and number of recording channels as in Audacity.
 * Very rarely, it can help to use 16-bit or 24-bit Default Format then change the Audacity Quality Preferences to that sample format.
 * If necessary, put a checkmark in both Exclusive Mode boxes then set the "Host" in Audacity's Device Toolbar to "Windows DirectSound" and choose a project rate that your playback and recording devices support. Audacity can then request that rate directly from the sound device.


 * Mac OS X: In Finder, choose . In "Audio Devices", select in turn the required Recording and Playback devices. Set "Format" to the same sample rate, bit-depth and number of recording channels as in Audacity.


 * Linux:


 * 1) In the first instance, try refreshing Audacity's list of audio devices at  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.
 * 3) * 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.
 * 4) * If Jack Audio System is running on the computer, ensure that it is selected as the Host in Device Toolbar.
 * 5) 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.
 * 6) Open AlsaMixer (type alsamixer in a terminal window) and check the soundcard 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 soundcard 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 soundcard 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 ).
 * 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.

back to top

Why do I get "Error: not well formed (invalid token) at line x"?
This usually means that when reopening the AUP project file normally, Audacity finds an unexpected non-English, accented or control character at the line quoted in the error message. There are two main causes of this.
 * 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.
 * The project was saved containing non-English or accented characters using an old ANSI build of Audacity for Windows. ANSI builds are not properly Unicode aware, so do not support non-English or accented characters.
 * The latest version of Audacity will always fully support Unicode. You can check your Audacity version at.

The invalid token error can also occur if Audacity or the computer crashed. Audacity will try to recover the project from its autosave file but the crash may cause a redundant line near the end of the file that triggers the error. Very occasionally, the AUP file may become corrupted by one or more redundant lines even if there was no apparent crash.


 * Bill 11May12: What are we talking about in the box below? Is it when Audacity crashes without completely writing the AUP? I've seen one of those on the forum where the AUP file just stopped without closing a number of tags. "In some cases"? Doesn't Audacity wait to delete the temp files before it completes writing of the saved file? What does "if this does not happen" mean?
 * Gale 11May12: Bill, thanks for picking up on this. It is intentionally vague. Yes, this is usually when there is a crash on saving, but I have seen a number of cases where there was no (reported) crash; Audacity just writes an .aup file that terminates prematurely in nulls (or is even completely nulls). So this latter case is really moonphase saving problems as per what used to be called bug 137. If the crash occurs at the last step of saving (when (re)writing the .aup itself) this will almost certainly result in "invalid token" if the .aup is opened. The question is not I think what happens to the temp files - if the project was never saved before, the temp files (I believe) are moved to a newly created _data folder for the project in the early stages of saving. The question is whether the autosave file that recovery depends on is retained until the .aup file is correctly written. From user reports I have seen, a crash that leaves a corrupted .aup file will sometimes initiate a crash recovery and sometimes not, possibly because there is no proper test of whether the .aup is valid before deleting the autosave file (that is speculation). This behavior is probably one of a number that should be follow-up moonphase bugs branching out from bug 137.
 * Bill 11May12: Tried rewriting it.
 * Gale 21Nov13: Added steps for removing NULL line at end of autosave file and suggested there that this may help correcting an AUP file corrupted for unknown reasons. Replaced the advice div with a note div at the end of this FAQ on other options if all else fails.

Solution for error caused by control characters

 Make a copy of the AUP project file and open it in a text editor like Notepad (Windows) or TextEdit (Mac).  Turn word wrap off in the menus (or in TextEdit, drag the window horizontally so that lines do not wrap).  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 &# &#8201;0&#8201;0&#8201;1&#8201;3 ;. Save the changes to the .aup file. 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. 

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
 * 4) Save the changes to the file.

Solution to correct an AUTOSAVE file that Audacity is attempting to recover from  Find the autosave file. It will be in an "AutoSave" folder in Audacity's folder for application data as follows: <li>Windows XP: Documents and Settings\ \Application Data\Audacity <li>Windows Vista/Windows 7/Windows 8: Users\ \AppData\Roaming\Audacity\ <li>OS X: ~/Library/Application Support/audacity/ <li>Linux: ~/.audacity-data/. </ul> <li>Make a copy of the autosave file as a backup and move the copy somewhere else such as your Desktop. <li> Follow the steps at Convert the AUTOSAVE file to XML below to replace the current autosave file with one that has been converted to XML format. <li> Open that converted autosave file in a text editor like Notepad (Windows) or TextEdit (Mac). <li> Turn word wrap off in the menus (or in TextEdit, drag the window horizontally so that lines do not wrap). <li> Go to the line indicated in the error message. If you had been recording, the last line above it will probably look like  . <li>We need to delete the entire line. It may be a long line containing only empty spaces or it may have   at the end of all the spaces. Hold and press  to select the entire line before pressing. Ensure this leaves you with a final line that contains only  . Ensure this is the only line that contains  . <li>Save the changes to the file. </ol>

<div id="convert_xml"> Converting the AUTOSAVE file to XML

Windows  <li>In the AutoSave folder, right-click the autosave file and choose "Cut". <li>Go to the folder Audacity is installed in, such as "C:\Program Files (x86)\Audacity", then right-click in empty space and choose "Paste". Provide the administrator password if asked. <li>Open an administrator command prompt. On Windows XP, Vista or Windows 7, click Windows Start, go to All programs > Accessories, then right-click the Command Prompt shortcut and select "Run as Administrator". Or see instructions for Windows 8. <li>Assuming the prompt in the command window shows some location in C:\ and Audacity is installed in some location in C:\, type "cd" (without quotes) then a space. If Audacity is on some other drive than the prompt indicates, type the name of that drive letter and a colon (such as D:), press, and then type "cd" (without quotes) then a space. <li>Go up one level in Explorer then drag the icon for the Audacity installation folder into the command window. The path "C:\Program Files (x86)\Audacity" (or whatever it is) will appear. Press to change the prompt to the path you dragged in. <li>At the end of the path, type "audacity" (without quotes), a space, then "/d" (also without quotes), another space, then drag the autosave file into the command window. Here is what an example should look like: C:\Program Files (x86)\Audacity> audacity /d "C:\Program Files (x86)\Audacity\My Project - 2015-07-01 14-12-35 N-2.autosave" <li>Press. You can see in Explorer that the autosave file has been updated. <li>Now you can cut the autosave folder from the Audacity installation folder, and paste it into the AutoSave folder. </ol>

Mac OS X:  <li>In the AutoSave folder, right-click or Control-click the autosave file and choose the option to Copy. <li>Go to the folder Audacity.app is installed in, such as /Applications/Audacity, hold and  then press  to move the autosave file alongside Audacity. <li> Right-click over Audacity.app then choose "Show Package Contents". <li> Open the "Contents" folder then the "Mac OS" folder. <li> Open a Terminal then drag the Audacity file in the "Mac OS" folder into the terminal to display the path to that Audacity file. <li> Then at the end of the file path, type a space, "-d" (without quotes) and another space then drag the autosave file into the Terminal. <li> Press to convert the file. You will see a message that the file has been decoded successfully. <li> In the "Mac OS" folder, right-click or Control-click the autosave file and choose the option to Copy. <li> Go to the "AutoSave" folder, hold and  then press  to move the converted autosave file back into the AutoSave folder. </ol>

GNU/Linux:  <li>Open a terminal. <li>Assuming Audacity is installed, type "audacity -d" (without quotes) then a space, then type the path to the autosave file (or drag the autosave file into the terminal). Here is an example:audacity -d "home/al/.audacity-data/AutoSave/My Project - 2015-07-01 14-12-35 N-2.autosave" <li>Press to convert the file. You will see a message that the file has been decoded successfully. </ol>

back to top

Why does the computer reboot or show a blue screen message when I launch Audacity or play or record?
This mostly affects Windows computers. It happens when your computer sound device has a bad or mismatched driver or there is a problem with a system driver that interacts with that sound device. Even if the problem occurs after updating to the latest Audacity version, it still isn't Audacity's direct fault because Audacity does not have kernel privileges to make the computer restart. Inappropriate drivers can also cause Audacity to crash during playback or recording, without necessarily crashing the computer.

The best practice is to make sure the computer's built-in sound device has the latest drivers for your operating system, supplied by the motherboard or computer manufacturer. For a PCI or external soundcard, obtain 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 playback or recording worked previously, but the sound device drivers are appropriate or cannot be changed to a version that prevents the problem, try Windows System Restore to revert the computer to a state before the problem occurred.

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 or, then click the "Advanced" link or tab, and under "Startup and Recovery", choose "Settings...". WhoCrashed is a Windows tool that makes it easy to identify the driver or module at fault.

If your best available soundcard 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.

back to top

<div id="critical_files">

Mac OS X: Why do I see "Critical Nyquist files cannot be found"?
This error occurs on Mac OS X if Audacity is run directly from the downloaded DMG file. If you do this you also won't be able to save or export files without changing the directory you are saving or exporting to.

Here is the correct way to install Audacity from the DMG file obtainable from our website.


 * 1) Double-click the downloaded DMG to mount it.
 * 2) Copy the "Audacity" folder from the newly mounted DMG to /Applications (or any other location of your choosing).
 * 3) Eject the DMG at bottom left of Finder, then launch Audacity.app from the "Audacity" folder that you copied.

back to top

Bugs
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.

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.

When you have your bug report ready, please email our feedback address.

Feature Requests
You can also send your ideas for new or improved features to our feedback address. Again, be as specific as possible, and feel free to suggest your preferred way of achieving the functionality you desire. If you are a regular visitor to our Forum, you can instead post your suggestions on the Adding Features to Audacity board. If you are a C++ programmer, you can send us a patch or preferably a Git pull request for the bug fix or new feature. Thanks for all your reports, suggestions and patches! All of these help us make Audacity better.

back to top

< Back to: FAQ:Editing

|< Index of Frequently Asked Questions