Closed Bug 774009 Opened 7 years ago Closed 7 years ago

Intermittent browser_overflowScroll.js | uncaught JS exception - TypeError: aTab.linkedBrowser is null at chrome://browser/content/browser.js:4188

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 --- fixed

People

(Reporter: RyanVM, Assigned: dao)

References

(Depends on 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=13541656&tree=Mozilla-Inbound

Rev4 MacOSX Lion 10.7 mozilla-inbound debug test mochitest-other on 2012-07-14 16:43:57 PDT for push 4a87bb77ff98
slave: talos-r4-lion-023

TEST-PASS | chrome://mochitests/content/browser/browser/base/content/test/browser_overflowScroll.js | Scrolled one tab to the right with the mouse wheel
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_overflowScroll.js | an unexpected uncaught JS exception reported through window.onerror - TypeError: aTab.linkedBrowser is null at chrome://browser/content/browser.js:3857
Stack trace:
    JS frame :: chrome://mochikit/content/tests/SimpleTest/SimpleTest.js :: simpletestOnerror :: line 994
    native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
    native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0

JavaScript error: chrome://browser/content/browser.js, line 3857: aTab.linkedBrowser is null
--DOCSHELL 0x143f9e4c0 == 71 [id = 290]
++DOMWINDOW == 251 (0x1497665f0) [serial = 1021] [outer = 0x149484540]
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
WARNING: No outer window available!: file ../../../dom/base/nsGlobalWindow.cpp, line 9073
INFO TEST-END | chrome://mochitests/content/browser/browser/base/content/test/browser_overflowScroll.js | finished in 4453ms
Duplicate of this bug: 775923
OS: Mac OS X → All
Hardware: x86 → All
Summary: Intermittent browser_overflowScroll.js | an unexpected uncaught JS exception reported through window.onerror - TypeError: aTab.linkedBrowser is null at chrome://browser/content/browser.js → Intermittent browser_overflowScroll.js | uncaught JS exception - TypeError: aTab.linkedBrowser is null at chrome://browser/content/browser.js:4188
Assignee: nobody → dao
Status: NEW → ASSIGNED
Dao: this is one of the top oranges recently, have you had a chance to look into it at all?
I know where the exception is thrown (tabPreviews_capture) and how I could prevent it (null-checking aTab.linkedBrowser), but it's not yet clear to me why this happens in the first place, as the tabPreviews_capture call should be guarded by a aTab.parentNode check. I'm trying to find out what's going on by experimenting on the try server.
Attached patch patchSplinter Review
Attachment #664063 - Flags: review?(gavin.sharp)
Comment on attachment 664063 [details] [diff] [review]
patch

I don't understand how the drawWindow call lead to tab removal, since this all happens synchronously.
It doesn't lead to the tab removal. It just happens in parallel. I can't tell why -- it's certainly not the behavior I expected.
I don't see how it can happen in parallel either, since this is all main-thread JS (tabbrowser JS code can't run while we're running the thumbnail code, unless it's somehow called indirectly via the drawWindow call - requestAnimationFrame callback or somesuch?).

Do you have links to the tryserver logs for the debugging you did?
https://hg.mozilla.org/try/rev/5c7021d4727d
https://tbpl.mozilla.org/php/getParsedLog.php?id=15479195&tree=Try

The exception I added wasn't thrown, as you can see. Line 4601 is:

      aTab.__thumbnail_lastURI = aTab.linkedBrowser.currentURI.spec;
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #184)
> (tabbrowser JS code can't run while we're running the
> thumbnail code, unless it's somehow called indirectly via the drawWindow
> call - requestAnimationFrame callback or somesuch?).

Tabs are closed in response to the transitionend event.
Gavin, do you know when you might have a chance to look at the review for this? (It is one of our top oranges and driving sheriffs up the wall).
Comment on attachment 664063 [details] [diff] [review]
patch

I guess we can try this to see if it fixes the orange, but I don't like landing code I don't understand. Can you file a bug to track understanding what's going on here, and reference it in a comment?
Attachment #664063 - Flags: review?(gavin.sharp) → review+
Depends on: 795608
https://hg.mozilla.org/mozilla-central/rev/eef8fce038aa
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Can we get approval to land this on m-b?
Comment on attachment 664063 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): unknown
User impact if declined: n/a (fixes random orange on beta)
Testing completed (on m-c, etc.): on m-c, aurora
Risk to taking this patch (and alternatives if risky): no risk
String or UUID changes made by this patch: none
Attachment #664063 - Flags: approval-mozilla-beta?
Comment on attachment 664063 [details] [diff] [review]
patch

test fix, approving.
Attachment #664063 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.