Closed Bug 465883 Opened 14 years ago Closed 14 years ago

First tab cannot be closed and doesn't get progress listener attached when gBrowser is resolved too early

Categories

(Firefox :: Tabbed Browser, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: fehe, Assigned: mossop)

References

Details

(Keywords: regression, verified1.9.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Minefield/3.1b2pre

Please read this bug carefully, otherwise you may miss the point.

Ever since bug 225680, there have been random cases of the left-most tab of any given window being stuck and incapable of being closed.  Disabling a certain extension will solve it, possibly only temporarily, however, it is difficult to identify any given extension as a culprit.

Another person experiencing the same problem states that the solution is to close Minefield and delete sessionstore.js, but that the problem is happening more frequently: ref: http://forums.mozillazine.org/viewtopic.php?p=5031605#p5031605

When the stuck tab situation occurs, the following exception appears in Error Console:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebProgress.removeProgressListener]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://browser/content/tabbrowser.xml :: _beginRemoveTab :: line 1509"  data: no]

The steps to reproduce, included here, provides a way to use an extension to trigger the bug.  These steps are for one-time triggering the bug and will not achieve the persistent condition that would require deleting sessionstore.js.  To reproduce afterward, you will need to either create a new profile and run through the steps again, or install an additional extension and restart

With my regular profile, I personally experience the persistent scenario (i.e. where restarting does not solve the problem and only disabling extensions or possibly deleting  sessionstore.js would allow the tab to finally be closed).

And finally, when this bug occurs, the tab is itself usable; only it cannot be closed.


Reproducible: Always

Steps to Reproduce:
1. Create a new profile
2. Go to Tools -->Options... -->Main and configure startup to "Show my windows and tabs from last time"
3. Restart Minefield
4. LEAVE THE FIRST TWO TABS ALONE (don't change or close them)
5. Install Nightly Tester Tools: https://addons.mozilla.org/en-US/firefox/addon/6543
6. Restart Minefield
7. Go to about:config and set value of general.useragent.extra.firefox to Firefox/3.0.4
8. Install Smart Middle Click: https://addons.mozilla.org/en-US/firefox/addon/3885
9. Restart Minefield
10. Notice that the throbber on the left-most tab is spinning indefinitely
11. Click that left-most tab's close button.  Notice that the tab does not close
12. Open Error Console and scroll to the bottom.  Notice the following exception:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebProgress.removeProgressListener]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://browser/content/tabbrowser.xml :: _beginRemoveTab :: line 1509"  data: no]
Blocks: 225680
Flags: blocking-firefox3.1?
Keywords: regression
Version: unspecified → Trunk
i had able to reproduce this using today's nightly.

but after trying to isolate which extension had caused it by disabling all my add-ons and enabling it one by one, problem is gone after even after i had enabled all my add-ons. weird.

btw, wfm in safe mode.
Keywords: qawanted
Could also be caused by Bug 463384 or Bug 463387.
Dave Townsend will surely know.
Are there any STR that don't involve add-ons? Does this reproduce in a nightly before either of those patches landed?
I suspect it is purely the add-on causing this, disabling it solves everything (the missing Done message, the empty locationbar, and the inability to close the first tab).
I don't have nightlies from around that time, only hourlies, and those are pointing to these two bugs. http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2008-11-18+00%3A00%3A00&enddate=2008-11-18+07%3A00%3A00
Which add-on were you referring to? Did you have both the mentioned add-ons installed?
(In reply to comment #4)
> I suspect it is purely the add-on causing this, disabling it solves everything
> (the missing Done message, the empty locationbar, and the inability to close
> the first tab).

Not so fast.  On my regular profile, at first disabling "Smart Middle Click" solved the problem.  Then, it happened again.  This time, disabling either "Adblock Plus: Element Hiding Helper" or "Adblock Plus Watcher" (I'm using Adblock Plus dev build v.0.7.5.5+.2008111908) solved the problem.  Then it happened again last night.  It's a bit too random.

I'm going to see if I can find the regression window.
It is fully reproducible with the Smart Middle Click add-on here (on Vista).
Done testing.  Though I encountered the bug last night, with "Smart Middle Click" disabled--having to disable one of the Adblock Plus extensions to resolve, "Smart Middle Click" is (as far as I know) the only reliable way to reproduce the bug.  You don't need any other extension, as long as the "Smart Middle Click" maxversion is acceptable.

Problem started with the Nov 19 nightly: http://hg.mozilla.org/mozilla-central/rev/0cd41f599080

I will see if I can contact the other person who reported a similar issue, to determine what extensions that person has.
Ok I can see what is going on here now. Trying to determine what the extent of the problem might be.
Blocks: 463384
No longer blocks: 225680
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Random stuck left-most tab → First tab cannot be closed and doesn't get progress listener attached when gBrowser is resolved too early
Attached patch patch rev 1Splinter Review
I think this is going to be a common enough pattern that we should fix it a.s.a.p. We should backout bug 463384, this simple patch allows us to keep 463387 in place.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #349299 - Flags: review?(gavin.sharp)
Keywords: qawanted
Target Milestone: --- → Firefox 3.1b2
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Pushed the backout and patch: http://hg.mozilla.org/mozilla-central/rev/7b73ae8b526d
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Thanks for fixing this.
Status: RESOLVED → VERIFIED
Target Milestone: Firefox 3.1b2 → ---
Duplicate of this bug: 466146
Keywords: verified1.9.1
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.