Firefox hangs

来自WordPress中文文档
跳转至: 导航搜索

Hanging (freezing, not responding) is when a program is running but stops responding to user input. A hang/freeze is different from a crash, which ends the program. If Firefox closes unexpectedly, or if an error dialog appears and Firefox closes, see Firefox crashes.

Many "Firefox" problems are caused by incompatible themes, extensions, or programming errors in plugins. Especially if Firefox hangs after an update, start it in its own Safe Mode (not Windows Safe Mode) to use the default them and temporarily disable all extensions. As explained at Standard_diagnostic_-_Firefox, you can also use the add-ons manager (accessible from the Tools menu) to update or disable your extensions. Starting with Firefox 3, the add-ons manager can also be used to disable plugins.

Hang loading first Firefox window

Hyper-Threading

Hyper-Threading is a feature on certain older Intel Pentium 4-based processors. In some cases, motherboard chipsets supporting Hyper-Threading can cause Firefox to hang at startup. If you’re experiencing hangs, you may want to check your motherboard manufacturer’s website for updates to the BIOS. [1]

Alternatively, you can disable Hyper-Threading support for Firefox in Windows 2000 and later, as follows: Right-click the Firefox shortcut → Properties → Compatibility → Check "Run this program in compatibility mode" → Select "Windows 98/Windows ME" → OK. [2] [3] For more information on Hyper-Threading, see Intel's article and this article at pcworld.about.com.

Close Firefox dialog

If you see a "Close Firefox" dialog when starting Firefox, with the message Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system., Firefox may have stopped responding the last time you closed it. Note that Firefox 3 has a delayed shutdown and will show you this dialog if you try to restart it too soon after exiting. [4] [5] If you are unable to restart Firefox, you will need to end all Firefox processes or restart the computer. See Hang at exit (below) if this is a recurring problem. (If you see this message when no Firefox processes are running, even after restarting the computer, see this article.)

Delay or hang waking from standby

You may experience excessive delay or Firefox may appear to hang when waking the computer from hibernation or standby. You may also notice high CPU usage. On Windows, updating Flash to the latest version should resolve the issue, which has been reported with Flash 8. [6] This page will tell you what Flash version is installed. Note that Flash is not the only cause of problems after waking the computer from hibernate or standby. [7] As a workaround, close Firefox before placing the computer in standby/hibernation mode.

Hang downloading files

As the download history grows, files may take longer to download and Firefox may appear to hang when downloading. In the Firefox menu, go to "Tools -> Downloads" and click "Clean Up" (Firefox 2) or "Clear List" (Firefox 3) to clear the Download History.

Firefox may hang downloading files if the folder where Firefox is attempting to save the download no longer exists or is not accessible. Try resetting the browser.download.lastDir preference in about:config. You can also try choosing a new download folder in your Firefox settings ("Tools -> Options -> Main / Downloads -> Save files to -> Browse").

See Unable to save or download files for more information.

Hang saving images

See above.

Hang using page history

If you set Firefox to remember the visited pages for more than the default number of days, operations involving browsing history can slow down or hang Firefox for short periods of time. Clearing the browsing history will usually resolve the problem [9]. History can be cleared as part of the "Clear Private Data" function, if "Browsing History" is selected in "Tools -> Options -> Privacy / Private Data -> Settings". You can also set Firefox to retain a smaller browsing history in your Privacy settings for History ("Tools -> Options -> Privacy / History"):

  • Firefox 2: "Remember visited pages for the last ___ days” (default is 9 days)
  • Firefox 3: "Keep my history for at least ___ days” (default is 90 days)
  • Firefox 3.5: "Firefox will: Use custom settings for history -> Remember my browsing history for at least __ days" (default is 90 days)

If Firefox hangs when accessing page history (e.g., when you click History on the menu bar) the file that saves your browsing history may be damaged. To fix this, exit Firefox, open the Firefox profile folder (see the linked article for the location) and then delete or rename history.dat (Firefox 2) or places.sqlite, "places.sqlite-journal", and any "places.sqlite.corrupt" files, if found (Firefox 3 and above - see also Locked or damaged places.sqlite). Firefox will generate a new history.dat or places.sqlite file and, in Firefox 3 and above, your bookmarks will be automatically restored from backup, but you will lose your browsing history. [10]

Hang after prolonged or extensive use

For some users, Firefox consumes excessive amounts of memory and may slow down or hang in situations that include being open for long periods of time, after downloading or saving images or other files, or after extensive use with multiple tabs open. See the article, Reducing memory usage - Firefox. Additional suggestions are given here.

Hang loading websites

Hang loading sites with JavaScript

Firefox may become very slow to respond because of badly coded JavaScript causing infinite loops on certain websites [11]. This problem can usually be cleared by closing the window or tab for that website. You can also temporarily disable JavaScript to view the problem site, but the website may not work without JavaScript. Read Firefox CPU usage for more information and also see the related article, Unresponsive Script Warning.

If the web site hangs Firefox (you can't even exit Firefox) try running in Safe Mode and see if you can get an Unresponsive Script Warning. Watch the status bar and see if this frequently occurs while it mentions a specific URL. If so, try blocking that URL using a content-blocker such as Adblock Plus. The problem URL may be fetching an advertisement or side panel that you can do without.

If none of this helps, try using a different browser (such as IE or Opera) or try accessing the site at another time. This might help you determine if the problem lies with Firefox, a poorly designed website, or content that changes over time, such as ads. [12]

Hang loading sites with Java, Flash, or PDF files

If Firefox hangs attempting to load a site with Java or Flash, or an Adobe PDF file, it's likely a problem with the associated plugin.

Hang loading websites when using an automatic proxy configuration file

If you're using an auto-config proxy (PAC), Firefox will hang when you attempt to load sites that don't exist and when opening sites on a domain you haven't opened recently. The amount of time it hangs will depend on how many look-ups the PAC does. There is no current solution, however this is a recognised bug, and as such is being tracked here: Bug 235853 - PAC: isResolvable() causes the UI to hang during resolution.

Hang deleting bookmarks - Firefox 3

In Firefox 3, deleting, adding, or organizing a large quantity of bookmarks can take a very long time [13] and trying to delete a complex bookmarks folder (one that contains many bookmarks and multiple levels of subfolders) can cause Firefox to hang. [14] To work around this problem, delete unwanted bookmark subfolders in small steps. As a last resort you can restart in Firefox Safe Mode, select the option, "Reset bookmarks to Firefox defaults" and click "Make Changes and Restart". (Warning: This will remove all of your added bookmarks!) You can then import bookmarks, if available, from a bookmarks HTML file or from another browser.

Hang searching bookmarks and history

A bug in Firefox builds since 3.6.13 and 4.0b5 may cause Firefox to respond very slowly or hang while searching bookmarks and history. [15] This should be fixed in an upcoming Firefox update so check for updates and make sure that you are using the latest Firefox version.

Hang at exit

Sometimes when you try to open Firefox you may see a "Close Firefox" dialog with the message, Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. This can happen if you try to restart Firefox 3 too soon after closing it [16] [17] but other times, Firefox stops responding at exit and the process remains active, even though no Firefox windows are open. You must then end all Firefox processes or restart the computer before you can reopen Firefox. (See Profile in use for other causes and solutions.)

Note that you may not always see a "Close Firefox" dialog when a Firefox process from a previous session did not close properly. This can result in multiple instances of Firefox in the processes list or cause other issues, until you end the Firefox processes or restart the computer. [18] (If firefox.exe remains in the processes list even after restarting the computer, see Firefox.exe always open.)

You can try the following solutions if Firefox processes that remain at exit are a recurring problem:

  • Problematic extensions can cause the issue. Disable all extensions ("Tools -> Add-ons -> Extensions") and restart Firefox. If the issue is resolved, one of the disabled extensions was causing the problem. If you have many installed extensions, see the Extension issues section of this article for suggested diagnostic steps. [19] [20] [21]
  • Certain Java applets can cause the Firefox process to persist after exit. Try updating Java to the latest version or, if you don't need Java, disable the Java plugin as a workaround.
  • You can disable your installed plugins to see if a plugin is causing your issue. See Issues related to plugins for more information.
  • Using certain Internet security software is reported to cause Firefox processes to remain at exit, on some systems. Updating your security software may resolve the issue. If it doesn't, and you use one of the following applications, try these suggestions:
    • If you use ZoneAlarm Firewall on Windows Vista, Firefox may stop loading pages or hang at exit. You may be unable to end the firefox.exe process and will need to restart the computer before you can reopen Firefox. Try updating ZoneAlarm; if the problem persists, uninstall ZoneAlarm and use another firewall (or use Windows Firewall). [22] [23] [24] [25]
    • If you use Avast! Antivirus, switch to another antivirus product if you also have ZoneAlarm installed. [26]
    • If you use Norton 360 2.0, Firefox 3 may not close properly, resulting in multiple firefox.exe processes and symptoms of a locked places.sqlite file (blank homepage, missing bookmarks and history, inactive back/forward toolbar buttons) when you next reopen Firefox. [27] Update Norton 360 to the latest version. As a workaround, disable "Phishing Protection" in Norton's settings [28] or follow these instructions to manually remove the Norton anti-phishing toolbar from Firefox. [29]
    • If you use Norton Internet Security 2008.5, update to NIS 2009 or apply the workarounds described above for Norton 360.
    • If you have upgraded Comodo Internet Security from a version prior to 3.10, the Comodo Safe Surf component from the previous version can cause Firefox to hang at exit. To resolve the issue, you can uninstall Comodo Safe Surf via Windows Control Panel, as its function is now integrated into the current Comodo application. [30] [31] [32]

Closing Firefox properly

  1. Use "File -> Exit" (Windows) "File -> Quit" (Linux) or "Firefox -> Quit Firefox" (Mac OS X). [33]
  2. Close any remaining dialog boxes or secondary windows such as the Downloads window or the Extensions window.

Sometimes, even after following the steps above, Firefox may still be running or it may have stopped responding to input. Read this for additional steps you may need to take.

Note: To close Firefox and immediately restart, you can install and use the "Quick Restart" extension. Once installed use keyboard shortcut "Ctrl+Alt+R" to close and restart or use the Tools menu item "Restart Firefox".  Firefox 4 users can use the much smaller "Restartless Restart" extension with the same keyboard shortcut.

Other causes of hanging

Live Bookmarks

Live Bookmarks can take a long time to load and may hang Firefox (fixed in Firefox 3.1). [34] As a workaround, try deleting unneeded Live Bookmarks.[35]

Extensions

Extensions are a common cause of Firefox problems, including hangs, slowdowns, or periodic freezes. Check the list of problematic extensions to see if it is a known issue and go through the standard diagnostic steps related to extension issues to see if an extension is causing Firefox to hang.

Multiple sessionstore.js files

If Firefox is slow to respond or appears to hang, open the Firefox profile folder, check for multiple sessionstore.js files and delete all copies found. [36] See Multiple profile files created for details.

Internet security software

Internet security software may cause Firefox to hang at exit (see above), to respond very slowly, stop loading pages or to hang during use.

  • Spybot Search and Destroy Spybot S&D includes an "Immunize" feature that, on some systems, can cause Firefox to respond very slowly; for example, extended pauses when loading web pages or switching tabs. [37] [38] To undo the Firefox immunization, go into Spybot S&D -> Immunize. If you right-click in the Immunization window on the right, you can select "deselect all". Check the Immunizations for Firefox you would like to remove, then click Undo. See this Spybot forum topic for more information. Note: The problem was reportedly caused by the large number of entries added to the Firefox hostperm.1 file. Since Firefox 3 uses "permissions.sqlite" instead of hostperm.1 this issue may be limited to Firefox 2 and below.
  • ZoneAlarm on Windows Vista Firefox may stop loading pages or hang on Windows Vista when ZoneAlarm is installed. Uninstall ZoneAlarm and use the Windows Firewall, or install another firewall such as the free Comodo Firewall. [39] [40] [41]
  • Outpost Pro Firewall Outpost Pro Firewall, versions 2.7 and 3.0, can cause Firefox to stop loading Web sites. The "firefox.exe" process may also be left running after closing Firefox, and shutting down the computer may be blocked by an error message that the XPCOM:EventReceiver is still waiting for data.[42],[43] This may be due to blocking the loopback (localhost) connection.[44]
  • Norton Anti-virus Older versions of Norton Anti-virus have been known to cause Firefox 2 to hang when NAV real-time protection is turned on. Updating to the latest version may solve the problem. [45]

Adobe Type Manager/Font issues

Having installed a huge number of fonts can also cause this problem. [46] Using Adobe Type Manager can lead to a huge number of installed fonts. Uninstall all fonts - except the standard fonts - and Adobe Type Manager in this case.

Other solutions

  • Perform the standard diagnostic to resolve hanging problems not specifically mentioned in this article.
  • Some older versions of video card drivers can cause hangs. Make sure your drivers are up to date.
  • If none of the solutions on this page fixes your problem, you may want to file a bug report. This is a list of unsolved bugs in Firefox that cause hangs. Look through the list, and if your situation doesn't match any of the situations listed, file a new bug report. If you cannot give a set of steps that reproduces the problem, you may want to try to find a regression window to determine which change to Firefox caused the problem. On Windows, you can also use Process Explorer to determine which thread is using the most CPU.

See also

External Links