Last Comment Bug 585813 - Script Timeout at tabbrowser.xml:1457 when closing tabs
: Script Timeout at tabbrowser.xml:1457 when closing tabs
Status: VERIFIED FIXED
[qa!]
: regression
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: -- normal with 6 votes (vote)
: Firefox 13
Assigned To: Tim Taubert [:ttaubert]
:
: Dão Gottwald [:dao]
Mentors:
: 555875 603303 620032 646759 670272 (view as bug list)
Depends on:
Blocks: 380960
  Show dependency treegraph
 
Reported: 2010-08-09 16:36 PDT by Alice0775 White
Modified: 2015-05-02 13:13 PDT (History)
30 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
wontfix
wontfix
verified
verified
wontfix
final+


Attachments
patch v1 (1.77 KB, patch)
2012-02-16 06:33 PST, Tim Taubert [:ttaubert]
dao+bmo: review+
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta-
akeybl: approval‑mozilla‑esr10-
Details | Diff | Splinter Review

Description Alice0775 White 2010-08-09 16:36:06 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100809 Minefield/4.0b4pre ID:20100809040505
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100809 Minefield/4.0b4pre ID:20100809040505

When I close many tabs by middle-clicking. the following alert box appears.

>A script on this page may be busy, or it may have stopped responding. You can >stop the script now, or you can continue to see if the script will complete.
>
>Script: chrome://browser/content/tabbrowser.xml:1457

I select "Continue" in the alert, however I got same alert box again again.
If I select "Cancel" in the alert, then remaining tabs can not be closed any more.

Reproducible: Always

Steps to Reproduce:
1. Start Minefield with new profile
2. Create Bookmarks Folder and 34 Bookmarks in the folder
3. Open in All Tabs Bookmarks Folder ( 34 tabs )
4. Middle click tab quickly ( Till alert appears )

*number 34 is example.

Actual Results:
 Alert box appears.

Expected Results:
 Close action should be performed properly.
Comment 1 Dão Gottwald [:dao] 2010-08-09 16:47:03 PDT
> >Script: chrome://browser/content/tabbrowser.xml:1457

Can you open chrome://browser/content/tabbrowser.xml in a tab, hit Ctrl+U, Ctrl+L, go to line 1457 and tell me what code is in that line? Thanks.
Comment 2 Alice0775 White 2010-08-09 16:53:05 PDT
>>>> is line 1457

            if (aCloseWindow) {
              this._windowIsClosing = true;
>>>>        while (this._removingTabs.length)
                this._endRemoveTab(this._removingTabs[0]);
            } else if (!this._windowIsClosing) {
              if (aNewTab)
                focusAndSelectUrlBar();

              // workaround for bug 345399
Comment 3 Dão Gottwald [:dao] 2010-08-09 16:55:37 PDT
So I guess this loops infinitely. Interesting...
Comment 4 Dão Gottwald [:dao] 2010-10-11 09:55:48 PDT
*** Bug 603303 has been marked as a duplicate of this bug. ***
Comment 5 Justin Dolske [:Dolske] 2010-10-13 14:23:44 PDT
(I just ran across this when trying to enter private browsing, probably the same thing though since it was closing tabs?)
Comment 6 Colin Snover 2010-12-02 20:29:31 PST
This happens to me at least once a day, but when closing tabs using Cmd+W. So far I haven’t seen any particular pattern here. I don’t recall this happening until 4.0b7.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b7) Gecko/20100101 Firefox/4.0b7
Comment 7 Frank Yan (:fryn) 2010-12-17 01:21:39 PST
The only cause I can think of after a brief look at _endRemoveTab is that aTab._endRemoveArgs might be falsy for some reason, resulting in an early return and the infinite loop.
Comment 8 Dão Gottwald [:dao] 2010-12-18 08:33:28 PST
I can't reproduce this anymore. Can someone post more specific steps to reproduce?
Comment 9 Alice0775 White 2010-12-18 08:51:40 PST
I am reporter. and I can not reproduce anymore too.
Comment 10 Colin Snover 2010-12-21 22:15:25 PST
I’m able to reproduce in Fx4b7, but never consistently enough to create a reproducible testcase.
Comment 11 Frank Yan (:fryn) 2010-12-21 22:23:23 PST
(In reply to comment #10)
> I’m able to reproduce in Fx4b7, but never consistently enough to create a
> reproducible testcase.

A lot of code has changed since then. Please test this in a nightly or the release candidate for beta 8: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/4.0b8-candidates/build1/
You can use a separate, fresh profile if you'd like:
http://support.mozilla.com/kb/managing%20profiles
Comment 12 Dietrich Ayala (:dietrich) 2011-01-03 11:48:31 PST
Bump. Colin, can you still reproduce this?
Comment 13 Colin Snover 2011-01-03 11:58:59 PST
I haven’t run into it thus far in Fx4b8, so it is probably fixed.
Comment 14 Dietrich Ayala (:dietrich) 2011-01-03 12:01:33 PST
Thanks Colin.

Closing, since reporter and confirmers can no longer reproduce.
Comment 15 Henrik Skupin (:whimboo) 2011-04-20 15:02:37 PDT
*** Bug 646759 has been marked as a duplicate of this bug. ***
Comment 16 Henrik Skupin (:whimboo) 2011-04-20 15:03:14 PDT
Not fixed at least not for the user on bug 646759.
Comment 17 Frank Yan (:fryn) 2011-04-20 15:24:05 PDT
I have no idea what could cause this, except this._removingTabs[0]._endRemoveArgs being null when this._endRemoveTab(this._removingTabs[0]); is called, but that seems impossible.
Comment 18 Henrik Skupin (:whimboo) 2011-05-03 00:26:43 PDT
*** Bug 620032 has been marked as a duplicate of this bug. ***
Comment 19 Jesse Ruderman 2011-06-04 12:18:46 PDT
I got a slow-script dialog at tabbrowser.xml:1610 with yesterday's nightly. I think I was trying to close a tab when it happened. After that, I couldn't close any tabs, but I could still open new ones.
Comment 20 freemailadm 2011-06-05 13:38:30 PDT
This happens all the time with my FF, as I can remember only on iwiw.hu, which is written in JSP as far as I know.
Comment 21 Henrik Skupin (:whimboo) 2011-07-09 02:18:34 PDT
*** Bug 670272 has been marked as a duplicate of this bug. ***
Comment 22 Paul W 2011-07-25 03:47:50 PDT
This has happened to me on several occasions, but I was never able to consistently reproduce the unresponsive script.  I have finally been able to reproduce this after noticing it at my place of work.

The following link has the ingredient in place to create the bug: http://www.saycgi.com/firefox/testcrash.html

To simulate the unresponsive script/crash:

- You must have dom.allow_scripts_to_close_windows set to true (in about:config) for this to work.
- Have at least two tabs open before opening my link. (It only seems to "crash" when you're closing the penultimate tab.)
- Middle mouse click to close this tab, then close the previous tabs with a middle click. The penultimate tab should make the browser temporarily unresponsive.

The bug seems to be triggered with window.close(). This might also happen without dom.allow_scripts_to_close_windows being set to true, but this is the only way I could repeatedly reproduce it.
Comment 23 (mostly gone) XtC4UaLL [:xtc4uall] 2011-07-25 05:51:04 PDT
For Comment 22 I found
Last good nightly: 2009-03-24
First bad nightly: 2009-03-26 (there were no 2009-03-25 Win32 Builds)
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6cfe70091cfc&tochange=85bd18f6b652

what points to Bug 462673 what points to already filed Regression Bug 555875.

I got no Alert Boxes though.
Comment 24 Paul W 2011-07-25 08:02:41 PDT
For comment 23:

Bug 555875 relates to the middle mouse click causing unclosable tabs, but clicking the tabs 'X' or CTRL+W causes the same unresponsive script problem.

Bug 462673 seems to be more like the problem I'm seeing, though it's showing as fixed, but I saw the same problem in FF 4.0, and currently in FF 5.0.

I'm new to filing bugs, so I apologise if I've done something wrong.
Comment 25 Sean Newman 2011-11-07 10:35:00 PST
The bug was forgotten? Then at least uncheck it as blocking final.
Comment 26 Mark Smith 2012-02-04 01:20:03 PST
Bump, this is still occurring for me using FF10.0 under WinXP and now the line number is 1636 - this has also been occurring under FF9 for a while.

I open several tabs using ctrl-click then visit the first and close it using CTRL-W, which displays the next tab which I then also close using CTRL-W and so on.  It varies how many tabs are closed in this way before the unresponsive script warning  appears but I seem to get this very regularly, perhaps even daily.  For those interested these are Facebook game pages that are almost certainly script-heavy and which have not finished loading by the time I close them.

I can confirm that FF ignores requests to close further tabs after the warning but still allows new ones to be opened.  Closing FF then pops up the confirm dialog asking if I want to close 1 more tab than is visible.

This is the first time I've looked for a bug to report against but it's exactly the script line I'm seeing as unresponsive so my apologies if this is not the right place to post!
Comment 27 Jay 2012-02-15 05:43:01 PST
I'm using FF 10.0.1 on MacOS X 10.7.3.
I've been getting hit with this bug for a very long time, and it's still around.  I finally signed up here and decided to write about it.

This seems to be race-condition however, involved somehow with Flash.

Here's a simple way to repeat it for yourself.

1) Copy the text of this message you're reading and place it somewhere you can read it; as you'll first need to close Firefox.
2) Make sure you have Flash installed in FF.
3) Open Firefox fresh, and don't have any pages open, even this one that you're reading.
4) Go to neimanmarcus.com
5) Open 10 product pages and wait for all the pages to complete loading.  These are pages which show an individual product, and has a zoom feature via Flash loaded on the main photo of the product.
6) Switch focus to the 2nd tab from the left-hand side, then place your mouse over the 'X' like you're ready to close out the tab.
7) Now, click like crazy until all the tabs are closed.  You'll notice, most often, you'll be able to click the 'X' on a single tab multiple times.  That's ok, keep going.  Now, in a short while, you'll be treated with the glory of this never-dying bug.

Cheers.
Comment 28 Tomasz Skórka 2012-02-16 02:43:06 PST
Fails also on MS Vista. Started after installing FF 10 or 10.1.
Comment 29 Tim Taubert [:ttaubert] 2012-02-16 06:19:13 PST
*** Bug 555875 has been marked as a duplicate of this bug. ***
Comment 30 Tim Taubert [:ttaubert] 2012-02-16 06:33:11 PST
Created attachment 597793 [details] [diff] [review]
patch v1
Comment 31 Tim Taubert [:ttaubert] 2012-02-17 04:31:52 PST
https://hg.mozilla.org/integration/fx-team/rev/39f8849e89c5
Comment 32 Tim Taubert [:ttaubert] 2012-02-17 17:08:38 PST
https://hg.mozilla.org/mozilla-central/rev/39f8849e89c5
Comment 33 Loic 2012-03-02 03:03:06 PST
(In reply to Mark Smith from comment #26)
> Bump, this is still occurring for me using FF10.0 under WinXP and now the
> line number is 1636 - this has also been occurring under FF9 for a while.
chrome://browser/content/tabbrowser.xml:1636


Is there a plan to backport this fix into FF11? (FF10 is affected)
Comment 34 Tim Taubert [:ttaubert] 2012-03-02 03:07:54 PST
Comment on attachment 597793 [details] [diff] [review]
patch v1

[Approval Request Comment]
Regression caused by (bug #): bug 380960
User impact if declined: browser might hang when closing tabs
Testing completed (on m-c, etc.): landed two weeks ago and didn't cause any problems
Risk to taking this patch (and alternatives if risky): low risk
String changes made by this patch: none
Comment 35 Alex Keybl [:akeybl] 2012-03-02 09:02:00 PST
Comment on attachment 597793 [details] [diff] [review]
patch v1

[Triage Comment]
Since this may be causing unnecessary user pain and is low risk, approving for Aurora 12. It's too late in FF11's cycle to take a fix for a bug that's been around since FF4, however. There's also no need to backport this to the ESR, however, as it's not a critical security/stability issue.
Comment 36 Tim Taubert [:ttaubert] 2012-03-02 13:24:46 PST
https://hg.mozilla.org/releases/mozilla-aurora/rev/6ac22688553b
Comment 37 Ioana (away) 2012-04-02 06:40:19 PDT
Verified as fixed on:
Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20100101 Firefox/12.0
20120328051619
Comment 38 Ioana (away) 2012-04-02 07:29:00 PDT
While verifying this issue I noticed bug 741391. Could the fix for this bug have provoked it? (that bug didn't reproduce before)
Comment 39 Ioana (away) 2012-04-26 06:57:49 PDT
Verified as fixed on:
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0
Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0
BuildID: 20120425123149
Comment 40 darth.jeeling 2014-12-11 00:22:48 PST
I'm getting this bug (unresponsive script chrome://browser/content/tabbrowser.xml ) on Mac OS X.6.8. Doesn't happen consistently – once every couple dozen tabs closed, maybe, and I can't see a pattern.

It's line 2088 for me, but this is the same as Alice0775 White posted above (with "while" being line 2088).

            if (aCloseWindow) {
              this._windowIsClosing = true;
              while (this._removingTabs.length)
                this._endRemoveTab(this._removingTabs[0]);
Comment 41 Marko 2015-03-13 15:51:13 PDT
I have just got it, browser got frozen completely.

chrome://browser/content/tabbrowser.xml:2066
Comment 42 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2015-03-13 16:12:50 PDT
(In reply to Marko from comment #41)
> I have just got it, browser got frozen completely.
> 
> chrome://browser/content/tabbrowser.xml:2066

This bug was fixed and verified a *long* time ago. While the symptom may appear to indicate this is the same bug, it probably isn't. Please file a new bug report. Thank you.
Comment 43 zaman 2015-03-15 11:35:42 PDT
I have been experiencing browser freezes for the last few days perhaps since the last Firefox release (I am not 100% sure as I have setup FF automatic upgrades). The same things happen i.e. the browser freezes, tabs don't close etc. So, today instead of closing Firefox as a whole or stopping the script, I decided to read the entire message as I thought that maybe there was some virus or something which was trying to freeze the browser everyday. There were no more than 2-3 tabs open and that too of reputable sites. I also clean up all history, cache, cookies etc. all these years everytime I close firefox. So, the freeze today just did not make sense. Here is what was written in the popup:

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: chrome://browser/content/tabbrowser.xml:2089


Then I tried to open the link above and paste the code into notepad++. Here is the lines that appear near line no. 2089.

Here are the lines:

              this.moveTabToEnd();
          </body></method><method name="moveTabToStart"><body>
            var tabPos = this.mCurrentTab._tPos;
            if (tabPos > 0)
              this.moveTabTo(this.mCurrentTab, 0);
          </body></method><method name="moveTabToEnd"><body>
            var tabPos = this.mCurrentTab._tPos;
            if (tabPos < this.browsers.length - 1)
              this.moveTabTo(this.mCurrentTab, this.browsers.length - 1);
          </body></method><method name="moveTabOver"><parameter name="aEvent"/><body>
            var direction = window.getComputedStyle(this.parentNode, null).direction;
            if ((direction == "ltr" && aEvent.keyCode == KeyEvent.DOM_VK_RIGHT) ||
                (direction == "rtl" && aEvent.keyCode == KeyEvent.DOM_VK_LEFT))
              this.moveTabForward();
            else
              this.moveTabBackward();
          </body></method><method name="duplicateTab"><parameter name="aTab"/><!-- can be from a different window as well --><body>
            return SessionStore.duplicateTab(window, aTab);
          </body></method><!-- BEGIN FORWARDED BROWSER PROPERTIES.  IF YOU ADD A PROPERTY TO THE BROWSER ELEMENT
           MAKE SURE TO ADD IT HERE AS WELL. --><property name="canGoBack" onget="return this.mCurrentBrowser.canGoBack;" readonly="true"/><property name="canGoForward" onget="return this.mCurrentBrowser.canGoForward;" readonly="true"/><method name="goBack"><body>



That is from line no.2080 to 2099 as per notepad++. just took some extra lines if there was any mistake by any chance.

The exact line no. 2089 as per notepad++ is

</body></method><method name="moveTabOver"><parameter name="aEvent"/><body>



This frequent browser freezing at that too without opening much tabs and clearing all cache, history etc. has never happened to me in my nearly 10+ years of using Firefox. So, thought of informing.
Comment 44 Nickolay_Ponomarev 2015-05-02 13:13:32 PDT
zaman (comment 43) please try https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode and if it doesn't help, file a separate bugs.

comments 40 and 41: you're probably seeing bug 1078280.

Every one else, please file separate bugs instead of commenting here.

Note You need to log in before you can comment on or make changes to this bug.