Closed Bug 650485 Opened 13 years ago Closed 5 years ago

Unresponsive script chrome://browser/content/sanitize.js:136 when clearing browser history

Categories

(Toolkit :: Data Sanitization, defect)

4.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: biahus-bugzilla-mozilla, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

Warning of unresponsive script when clearing browser history via menu option "Tools > Clear Recent History" or by pressing Ctrl+Shift+Delete

Reproducible: Always

Steps to Reproduce:
1. Clear Recent History by either menu option "Tools > Clear Recent History" or by pressing Ctrl+Shift+Delete
2. Set "Time range to clear" field to "Everything"
3. Tick all Detail options 
4. Click "Clear Now" button
Actual Results:  
Dialog window appears warning of unresponsive script

Expected Results:  
Return to browser
If you uncheck the "cookies" option, does it work correctly?
Version: unspecified → 4.0 Branch
I am unable to reproduce this issue on:
Mozilla/5.0 (Windows NT 5.1; rv:6.0a1) Gecko/20110419 Firefox/6.0a1

Reporter, did you had the chance to try what was suggested in Comment 2? Also, could you verify if the issue still occur if you start Firefox in Safe Mode?
http://support.mozilla.com/en-US/kb/Safe+Mode

How about with a new, empty profile?
http://support.mozilla.com/en-US/kb/Basic+Troubleshooting#Make_a_new_profile
Whiteboard: dupeme
biahus?
Whiteboard: dupeme → [closeme 2011-06-09][dupeme]
Sorry for not responding sooner.

None of the following suggestions solved the problem:

    - uncheck the "cookies" option
    - starting in safe mode
    - starting with a new, empty problem

However, in trying those suggestions it became apparent the problem was not consistently reproducible as first described. 

To try and pin-down a reproducible scenario I used SysInternals' Process Explorer tool to monitor the Firefox process and noticed that when the problem occurred the Firefox process always had several, or more, child processes, named plugin-container.exe. After some trial and error I found the scenario to reproduce the problem was as follows:

1) start Firefox
2) go to http://www.adobe.com
3) open a new tab and go to http://www.mozilla.com/en-US/plugincheck/ 
4) clear browser history

In this scenario the firefox process had two child processes before step 4, after which it had several more and causes the unresponsive script warning. 
 
Unfortunately, when I tried this scenario on a newer PC the only problem observed was the creation of the child processes, so this problem is most likely only repeatable on older PCs.
I am experiencing the exact same problem with Firefox 6.
* I clear the history (Active Logins and Site Preferences were unchecked)
* Firefox freezes for a while.
* Then, the Unresponsive Script (sanitize.js:136) appears.

It's happening every time, even if I shut it down and immediately try to clear the history.

If I uncheck "Cookies", the freeze does not happen.

I did have one plugin running at the time: Flash (10.3.183.5)

I then closed the page with the Flash plugin, shut Firefox down and restarted.
* I verified that no plugins were running: no pluginContainer processes) and the 3 pages I had up were simple static HTML and the Add-ons page.
* Went to clear my history (Cookies were checked).
* Received the Unresponsive Script dialog.

So, in my case, at least, it does not appear that plugins are causing the problem, just cookies in general.
(In reply to Rick Alther from comment #7)
> I am experiencing the exact same problem with Firefox 6.
Correction: I was actually on Firefox 7 (beta) - not 6
Simona, is there a way to quantify their cookie count, (or use their data) so you could try to reproduce?

shouldn't cookies issues be somewhere other than in General component?
Whiteboard: [closeme 2011-06-09][dupeme]
The issue is not cookies, it's plug-ins LSO objects and the freeze is due to bug 633427 afaict
(In reply to Marco Bonardo [:mak] from comment #10)
> The issue is not cookies, it's plug-ins LSO objects and the freeze is due to
> bug 633427 afaict

with bug 633427 fixed in http://www.mozilla.org/en-US/firefox/channel/#aurora/aurora-desktop ... can you reproduce using current aurora?
Summary: Unresponsive script chrome://browser/content/sanitize.js:136 → Unresponsive script chrome://browser/content/sanitize.js:136 when clearing browser history
Rick, can you still reproduce?

(reporter is no longer able to test)
Flags: needinfo?(alther)
I do not get the unresponsive script error, but clearing still causes Firefox to 'pause' for a few seconds.  This is on Firefox 35a2.
Flags: needinfo?(alther)
Firefox 34.05, Mac OS X.6.8, MacBook Pro 8,1 (13 inch late 2011). I get the spinning wheel of doom, unresponsive script message:
chrome://browser/content/sanitize.js:206

Line 206 is "} catch (e) {" in below:

if (!this.range || age >= 0) {
          let tags = ph.getPluginTags();
          for (let i = 0; i < tags.length; i++) {
            try {
              ph.clearSiteData(tags[i], null, FLAG_CLEAR_ALL, age);
            } catch (e) {

My YouTube videos aren't working ("An error occurred.") and the video I had open changed to a different error message after this bug occurred – "The Adobe Flash plugin has crashed."

Happens whenever I clear cookies with "everything" time range. I had opened https://www.mozilla.org/en-US/plugincheck/ and adobe.com as someone above mentioned.
Having a look at the above code piece, I think it should be:

        if (!this.range || age >= 0) {

          let tags = ph.getPluginTags();

          for (let i = 0; i < tags.length; i++) {

            try {

              ph.clearSiteData(tags[i], null, FLAG_CLEAR_ALL, age);

            } catch (e) {

              // If the plugin doesn't support clearing by age, clear everything.

              if (e.result == Components.results.

                    NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED) {

                try {
                  // CODE MOD HERE
                  //ph.clearSiteData(tags[i], null, FLAG_CLEAR_ALL, -1);

                  ph.clearSiteData(tags[i], null, FLAG_CLEAR_ALL, Long.MAX_UNSIGNED_VALUE);
                  // END CODE MOD
                } catch (e) {

                  // Ignore errors from the plugin

                }

              }

            }

          }

        }


It shouldn't be -1 but be Long.MAX_UNSIGNED_VALUE going by this reference:

    The maxAge argument is the maximum age in seconds of data to clear, inclusive. If maxAge is 0, no data is cleared. If maxAge is the maximum unsigned 64-bit integer, all data is cleared.

ref:
https://wiki.mozilla.org/NPAPI:ClearSiteData
Joshua, can you submit a patch for review?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(langley.joshua)
All this code was rewritten in bug 1089695, so I suspect that the problem is actually fixed.
Component: General → Data Sanitization
Product: Firefox → Toolkit

This code changed a lot in recent years.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(langley.joshua)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: