The default bug view has changed. See this FAQ.

A "ghost tab" appears inside a Tab Group

VERIFIED FIXED in Firefox 6

Status

Firefox Graveyard
Panorama
P4
normal
VERIFIED FIXED
6 years ago
a year ago

People

(Reporter: Ajith Nair, Assigned: ttaubert)

Tracking

Trunk
Firefox 6
Dependency tree / graph
Bug Flags:
in-testsuite +

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

6 years ago
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

I had two tab groups open when I updated to Fx4 RC2 and restarted. After that, an empty tab appeared in one of my tab groups. Clicking on it will just return me to the current tab -- regardless of which tab group is currently active. I can even click and drag the "ghost" tab around inside or across tab groups. But trying to close it will have no effect; a border appears around the close button, and it stays that way. The tab cannot be closed. Here's a screenshot of what it looks like: http://i121.photobucket.com/albums/o204/ajifocus/Public/FxGhostTab.jpg

Reproducible: Didn't try

Comment 1

6 years ago
That's really unfortunate. Sounds like you've got some bogus data in your profile. 

Has anyone else seen this?

Comment 2

6 years ago
This happens to me pretty often. If i restart Firefox it disappears but after a while it appears again

Comment 3

6 years ago
Will investigate.
Blocks: 603789
Priority: -- → P4

Updated

6 years ago
Version: unspecified → 4.0 Branch
(Assignee)

Updated

6 years ago
No longer blocks: 603789
(Assignee)

Updated

6 years ago
Blocks: 653099

Comment 4

6 years ago
I can confirm that this has happened to me a couple times.
(Assignee)

Comment 5

6 years ago
I manage to reproduce a ghost tab with this:

1) Create multiple groups
2) Restart firefox
3) close all tabs of the current group
4) Open Panorama

The actually closed group is still there and contains a ghost tab.
Assignee: nobody → tim.taubert
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Version: 4.0 Branch → Trunk
(In reply to comment #5)
> I manage to reproduce a ghost tab with this:
> 
> 1) Create multiple groups
> 2) Restart firefox
> 3) close all tabs of the current group
> 4) Open Panorama
> 
> The actually closed group is still there and contains a ghost tab.

Please have a look at the patch for bug 654295 which probably fixes this as well.
(Assignee)

Comment 7

6 years ago
(In reply to comment #6)
> Please have a look at the patch for bug 654295 which probably fixes this as
> well.

This is indeed fixed by bug 654295. The problem is that it only fixes the symptom (removing the ghost tab afterwards) but not the source (not linking tabs that are being removed). I'd rather not combine these patches so let's handle the fix here in this bug and let bug 654295 depend on it.
Blocks: 654295
(Assignee)

Comment 8

6 years ago
Created attachment 532597 [details] [diff] [review]
patch v1
Attachment #532597 - Flags: feedback?(raymond)
Comment on attachment 532597 [details] [diff] [review]
patch v1

Looks good!

+function newWindowWithState(state, callback) {

+function whenWindowLoaded(win, callback) {

+function whenWindowStateReady(win, callback) {

May b we can move those functions to head.js
Attachment #532597 - Flags: feedback?(raymond) → feedback+
(Assignee)

Comment 10

6 years ago
Created attachment 532616 [details] [diff] [review]
patch v2

(In reply to comment #9)
> +function newWindowWithState(state, callback) {
> +function whenWindowLoaded(win, callback) {
> +function whenWindowStateReady(win, callback) {
> 
> May b we can move those functions to head.js

Good idea, done.
Attachment #532597 - Attachment is obsolete: true
Attachment #532616 - Flags: review?(ehsan)
I'm not sure if it's OK to access the tabbrowser guts like this.  You should ask Dao whether he thinks this is OK or not.
(Assignee)

Comment 12

6 years ago
Comment on attachment 532616 [details] [diff] [review]
patch v2

(In reply to comment #11)
> I'm not sure if it's OK to access the tabbrowser guts like this.  You should
> ask Dao whether he thinks this is OK or not.

Ok, I know that we access _removingTabs in another place but let's just ask him :)
Attachment #532616 - Flags: review?(ehsan) → review?(dao)
(Assignee)

Comment 13

6 years ago
Comment on attachment 532616 [details] [diff] [review]
patch v2

Passed try:

http://tbpl.mozilla.org/?tree=Try&pusher=tim.taubert@gmx.de&rev=72fee5cfc4fa
Comment on attachment 532616 [details] [diff] [review]
patch v2

>   get tabs() {
>     // Get tabs from each browser window and flatten them into one array
>     return Array.concat.apply(null, browserWindows.map(function(browserWindow) {
>-      return Array.slice(browserWindow.gBrowser.tabs);
>+      let removingTabs = browserWindow.gBrowser._removingTabs;
>+      return Array.slice(browserWindow.gBrowser.tabs).filter(function (tab) {
>+        return removingTabs.indexOf(tab) == -1;
>+      });

Replace 'Array.slice(browserWindow.gBrowser.tabs).filter(' with 'Array.filter(browserWindow.gBrowser.tabs, '.

I haven't reviewed the test.
Attachment #532616 - Flags: review?(dao) → review+
(Assignee)

Comment 15

6 years ago
Created attachment 532760 [details] [diff] [review]
patch v3

(In reply to comment #14)
> Replace 'Array.slice(browserWindow.gBrowser.tabs).filter(' with
> 'Array.filter(browserWindow.gBrowser.tabs, '.

Fixed.

> I haven't reviewed the test.

Asking Ehsan for review again :)
Attachment #532616 - Attachment is obsolete: true
Attachment #532760 - Flags: review?(ehsan)
Comment on attachment 532760 [details] [diff] [review]
patch v3

>+    let checkTabCount = function () {
>+      if (win.gBrowser.tabs.length > 1) {
>+        executeSoon(checkTabCount);
>+        return;
>+      }

Why is this necessary?  Is it because you're closing the tab with animation?  If yes, please take that out and just check this once after calling removeTab.
(Assignee)

Comment 17

6 years ago
(In reply to comment #16)
> Why is this necessary?  Is it because you're closing the tab with animation?
> If yes, please take that out and just check this once after calling
> removeTab.

Yeah this is because I remove the tab with animation, which is actually part of the problem because the problem doesn't exist when I remove the tab directly. Panorama is initialized while the tab is still being removed and therefore a ghost tab is linked.
Comment on attachment 532760 [details] [diff] [review]
patch v3

Oh, I see!
Attachment #532760 - Flags: review?(ehsan) → review+
(Assignee)

Comment 19

6 years ago
Created attachment 533073 [details] [diff] [review]
patch for checkin
Attachment #532760 - Attachment is obsolete: true
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
Keywords: checkin-needed
Whiteboard: [fixed in cedar]
Pushed:
http://hg.mozilla.org/mozilla-central/rev/e707886bdf16
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed in cedar]
Target Milestone: --- → Firefox 6
Mozilla/5.0 (Windows NT 5.1; rv:6.0a2) Gecko/20110525 Firefox/6.0a2

Verified issue using the STR from Comment 5 on Win XP, Win 7, Ubuntu, Mac OS X. The "ghost tab" is no longer present.
Status: RESOLVED → VERIFIED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.