Plugin-container and out-of-process plugins: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
Line 52: Line 52:
==Plugin hang detector==
==Plugin hang detector==
In Firefox 3.6.4 and above, a [https://developer.mozilla.org/en/Plugins/Out_of_process_plugins/The_plugin_hang_detector plugin hang detector] determines when an out-of-process plugin or plugin script has stopped responding, so that Firefox can terminate the plugin.  The time period that must pass before the plugin is assumed to be locked up is set in the preference '''dom.ipc.plugins.timeoutSecs'''  (the default is  '''45''' seconds in Firefox 3.6.6).  [https://bugzilla.mozilla.org/show_bug.cgi?id=574905]  When Firefox terminates a plugin that is no longer responding,  you will see the "plugin has crashed" error dialog shown above.  To prevent Firefox from terminating plugins it considers non-responsive,  set '''dom.ipc.plugins.timeoutSecs'''  to '''-1''' in [[about:config]].  This disables the plugin hang detector but does not disable OOPP or stop "plugin-container" from running; to do that, you must set the '''dom.ipc.plugins.enabled.*''' preferences to "false" [[#Disabling crash protection|(see above)]].
In Firefox 3.6.4 and above, a [https://developer.mozilla.org/en/Plugins/Out_of_process_plugins/The_plugin_hang_detector plugin hang detector] determines when an out-of-process plugin or plugin script has stopped responding, so that Firefox can terminate the plugin.  The time period that must pass before the plugin is assumed to be locked up is set in the preference '''dom.ipc.plugins.timeoutSecs'''  (the default is  '''45''' seconds in Firefox 3.6.6).  [https://bugzilla.mozilla.org/show_bug.cgi?id=574905]  When Firefox terminates a plugin that is no longer responding,  you will see the "plugin has crashed" error dialog shown above.  To prevent Firefox from terminating plugins it considers non-responsive,  set '''dom.ipc.plugins.timeoutSecs'''  to '''-1''' in [[about:config]].  This disables the plugin hang detector but does not disable OOPP or stop "plugin-container" from running; to do that, you must set the '''dom.ipc.plugins.enabled.*''' preferences to "false" [[#Disabling crash protection|(see above)]].
==See also==
* [[Flash#Flash_issues_in_Firefox_3.6.4_and_above|Flash issues in Firefox 3.6.4 and above]]


==External links==
==External links==

Revision as of 10:51, 16 August 2010

This article applies to Firefox 3.6.4 and above

Crash protection

Starting in Firefox 3.6.4 on Windows and Linux, a new crash protection feature isolates certain plugins from the browser process and sets those plugins to each run in a separate plugin-container process. Before this new "out-of-process plugins" ("OOPP") crash protection feature, a problem with a plugin (e.g, Adobe Flash) would often cause the entire Firefox browser to crash. When an "out-of-process plugin" stops working, Firefox can remain running and just the portions of a webpage that need the plugin will be disabled (i.e., missing the plugin content).

In Firefox 3.6 releases since Firefox 3.6.4, the crash protection feature that sets plugins to run in a separate process is enabled for specified plugins only. By default, the plugins enabled to run "out-of-process" are the NPAPI test plugin, Adobe Flash, Apple QuickTime (Windows) and Microsoft Silverlight (Windows). [1]

These "whitelisted" plugins in Firefox 3.6 releases (Firefox 3.6.4 and above) are each specified in a separate dom.ipc.plugins.enabled.<filename> preference that is set to true for each OOPP-enabled plugin. (Crash protection is disabled by default for all other plugins so, by default, the dom.ipc.plugins.enabled preference that permits all plugins to run "out-of process" is set to false.)

Note: This new crash protection feature will be available for Mac OS (10.6 or higher) in Firefox 4. [2] [3]

Plugin-container

An out-of-process plugin runs in a separate process named "plugin-container" ("plugin-container.exe" on Windows). For each plugin for which the "OOPP" crash protection feature is enabled, a separate plugin-container process will be started when you first visit a webpage that evokes that plugin. When you exit Firefox, those plugin-container processes will terminate.

Important: If your firewall asks for permission to allow plugin-container access to the Internet, you should allow it. If you previously denied access, you should change your firewall program settings to allow plugin-container. [4] [5] [6] [7]

Plugin error dialog

Firefox will automatically use an installed and enabled plugin for embedded webpage content, such as Flash videos on YouTube. If the plugin crashes or if Firefox detects that the plugin has stopped responding, the plugin will terminate and you will see an error dialog on the webpage, instead of the content that uses the plugin. To send a crash report to Mozilla, click the Send crash report link in the error dialog.

Disabling crash protection

In some cases you may want to disable the "out-of-process plugins" (OOPP) crash protection feature; e.g., to troubleshoot problems that first appeared in Firefox 3.6.4 or above. To disable crash protection, go to about:config and set all dom.ipc.plugins.enabled.* preferences to false. This will prevent the "plugin-container" process from running and all plugins will run within the Firefox browser process. [8] [9]

For example, to disable crash protection in Firefox 3.6 releases (3.6.4 and above) type about:config in the Location Bar (address bar) and press the Enter key. When the list of preferences appears, find the following preferences. (Each preference specifies an "out-of-process" plugin by its filename; the name shown in parentheses is for informational purposes only):

On Linux:

  • dom.ipc.plugins.enabled.libflashplayer.so (Adobe Flash)
  • dom.ipc.plugins.enabled.libnptest.so (NPAPI test plugin)

On Windows:

  • dom.ipc.plugins.enabled.npctrl.dll (Microsoft Silverlight)
  • dom.ipc.plugins.enabled.npqtplugin.dll (Apple QuickTime)
  • dom.ipc.plugins.enabled.npswf32.dll (Adobe Flash)
  • dom.ipc.plugins.enabled.nptest.dll (NPAPI test plugin)

Toggle (double-click) each preference to change the value from "true" to false, as shown below on Windows.

Note: In Firefox 3.6 releases (3.6.4 and above) the preference dom.ipc.plugins.enabled is already set to "false", by default.

Firefox 4

This applies to Firefox pre-release builds (3.7a1pre and above) and to the upcoming Firefox 4 release, currently in Beta at time of writing. For more information about Firefox test builds, see Testing pre-release versions.

On Windows and Linux, in current Firefox test builds and in the upcoming Firefox 4 release, crash protection is enabled for all plugins and the preference dom.ipc.plugins.enabled is set to true, by default. To disable crash protection, toggle this preference from "true" to false. If you only want to disable certain plugins from running "out-of-process", you can "blacklist" each plugin by creating a new boolean preference dom.ipc.plugins.enabled.<filename> and setting it's value to false. Filenames of specific plugins can be found in about:plugins and should be entered in lower-case. For example, to disable OOPP for the Adobe Flash plugin on Windows, create the preference dom.ipc.plugins.enabled.npswf32.dll and set it to false. [10]

On Mac OS, (10.6 or above) certain "whitelisted" plugins are set to run "out-of-process" by default, currently Flash Player and Java. Crash protection is disabled by default for all other plugins (i.e., the preference dom.ipc.plugins.enabled is set to false). [11] To disable crash protection on Mac OS, toggle each dom.ipc.plugins.enabled.<filename> preference from "true" to false, e.g.,

  • dom.ipc.plugins.enabled.flash player.plugin
  • dom.ipc.plugins.enabled.javaplugin2_npapi.plugin

Plugin hang detector

In Firefox 3.6.4 and above, a plugin hang detector determines when an out-of-process plugin or plugin script has stopped responding, so that Firefox can terminate the plugin. The time period that must pass before the plugin is assumed to be locked up is set in the preference dom.ipc.plugins.timeoutSecs (the default is 45 seconds in Firefox 3.6.6). [12] When Firefox terminates a plugin that is no longer responding, you will see the "plugin has crashed" error dialog shown above. To prevent Firefox from terminating plugins it considers non-responsive, set dom.ipc.plugins.timeoutSecs to -1 in about:config. This disables the plugin hang detector but does not disable OOPP or stop "plugin-container" from running; to do that, you must set the dom.ipc.plugins.enabled.* preferences to "false" (see above).

See also

External links

Related bug reports