Broken tabbrowser after undo close tab

RESOLVED FIXED

Status

SeaMonkey
Tabbed Browser
--
major
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: Bruno 'Aqualon' Escherl, Assigned: neil@parkwaycc.co.uk)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

8 years ago
I've found a race condition in the tabbrowser. If you close a website want to undo that too quickly after closing it, you get a new tab without content, that doesn't work anymore. One probably has to repeat the steps some times to see it.

Steps:

1. Load a big website like kicker.de
2. Close it with ctrl+w
3. Undo that with ctrl+shit+t

Execute steps 2 and 3 repeatedly and very fast.

First error in error console:

Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWebNavigation.goBack]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://navigator/content/tabbrowser.xml :: restoreTab :: line 1358"  data: no]

Switching to the broken tab (5 times):

Error: listener is undefined
Source File: chrome://navigator/content/tabbrowser.xml
Line: 885

Wanting to close the broken tab:

Error: oldBrowser is undefined
Source File: chrome://navigator/content/tabbrowser.xml
Line: 1408

I can only get rid of it, by closing the whole window.
(Reporter)

Comment 1

8 years ago
It's ctrl+shift+t of course *hide*

And I also get the following error after undo close tab, even if that works successful:

Error: this.browsers[i] is undefined
Source File: chrome://navigator/content/tabbrowser.xml
Line: 1025
(Reporter)

Comment 2

7 years ago
Maybe the problem isn't what it seemed to be.

Easier steps to reproduce:

1. start SeaMonkey
2. open new tab
3. close that tab
4. try to undo it

At step 4 I get the error at restoreTab and the tab isn't opened:

Error: uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWebNavigation.goBack]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://navigator/content/tabbrowser.xml :: restoreTab :: line 1574"  data: no]

If I then open a new tab, that previous non-restored tab appears too but is non-functional.

Tested with Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100908 Firefox/4.0b6pre SeaMonkey/2.1b1pre, new profile and safe-mode.

Comment 3

7 years ago
This seems reproducible on clean profile.
(Assignee)

Comment 4

7 years ago
Created attachment 478381 [details] [diff] [review]
Quick fix

This just stops you from undoing the close tab if it's not ready.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #478381 - Flags: review?(misak.bugzilla)
(Assignee)

Comment 5

7 years ago
Created attachment 478383 [details] [diff] [review]
Slow fix

This might let you undo the close tab even though we're not ready.

But I haven't really tested it.

Comment 6

7 years ago
It seems both patches don't work. I was able to reproduce this bug with any of them applied.
(Assignee)

Comment 7

7 years ago
Comment on attachment 478383 [details] [diff] [review]
Slow fix

>             // navigate back to the proper page from the light page
>-            b.webNavigation.goBack();
>+            if (b.webProgress.isLoadingDocument)
>+              b.stop();
>+            else
>+              b.webNavigation.goBack();
What about if you replace this with
b.stop();
b.webNavigation.gotoIndex(0);

Comment 8

7 years ago
Comment on attachment 478381 [details] [diff] [review]
Quick fix

(In reply to comment #7)
> What about if you replace this with
> b.stop();
> b.webNavigation.gotoIndex(0);

This fixes things.
Attachment #478381 - Flags: review?(misak.bugzilla) → review-
(Assignee)

Comment 9

7 years ago
Created attachment 478589 [details] [diff] [review]
Updated fix
Attachment #478381 - Attachment is obsolete: true
Attachment #478383 - Attachment is obsolete: true
Attachment #478589 - Flags: review?(misak.bugzilla)

Updated

7 years ago
Attachment #478589 - Flags: review?(misak.bugzilla) → review+

Updated

7 years ago
Duplicate of this bug: 595554
(Assignee)

Comment 11

7 years ago
Pushed changeset 8a177d109616 to comm-central.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.