Last Comment Bug 761569 - Failure in testCloseWindow | can't access dead object
: Failure in testCloseWindow | can't access dead object
Product: Mozilla QA
Classification: Other
Component: Mozmill Tests (show other bugs)
: unspecified
: All Mac OS X
: -- normal (vote)
: ---
Assigned To: Henrik Skupin (:whimboo)
Depends on:
  Show dependency treegraph
Reported: 2012-06-05 05:51 PDT by Remus Pop (:RemusPop)
Modified: 2012-08-14 08:14 PDT (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1 (2.56 KB, patch)
2012-06-06 16:44 PDT, Henrik Skupin (:whimboo) review+
remus.pop: feedback+
Details | Diff | Splinter Review

Description User image Remus Pop (:RemusPop) 2012-06-05 05:51:17 PDT

Comment 1 User image Remus Pop (:RemusPop) 2012-06-05 05:54:33 PDT
This happens in Nightly on Mac OSX.
Copying over the comment with what was tried towards finding the problematic lines in the test:

After this line I inserted a sleep(2000).

The failure complains about a new elementslib when executing this._view = _document.defaultView;
So I think the DOM is not ready when executing line 88: var tab = controller.tabs.getTab(i);
Comment 2 User image Henrik Skupin (:whimboo) 2012-06-05 07:11:21 PDT
We would have to recreate the controller and tabBrowser instance because they would operate on a window which already has been closed.
Comment 3 User image Henrik Skupin (:whimboo) 2012-06-06 16:44:36 PDT
Created attachment 630768 [details] [diff] [review]
Patch v1

The problem we are facing here is that controller.tabs.getTab() is broken and returns a document which defaultView is not valid anymore. This is most likely a Mozmill bug which I will file tomorrow.

Thankfully we can make use of controller.tabs.activeTab here so we can workaround the problem.

This patch fixes this issue and also makes the code a bit cleaner.
Comment 4 User image Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-06-06 17:48:02 PDT
Comment on attachment 630768 [details] [diff] [review]
Patch v1

Review of attachment 630768 [details] [diff] [review]:

Patch looks fine to me.
Comment 5 User image Remus Pop (:RemusPop) 2012-06-07 00:10:54 PDT
Comment on attachment 630768 [details] [diff] [review]
Patch v1

Looks good and works fine. Great for finding such a simple fix.
Comment 6 User image Henrik Skupin (:whimboo) 2012-06-07 00:21:12 PDT
Pushed to default for now:

If we pass now I can backport to aurora later.
Comment 7 User image Henrik Skupin (:whimboo) 2012-06-07 06:26:34 PDT
Tests for Nightly builds don't show this failure anymore. Pushed patch to all older branches due to improvements of stability: (aurora) (beta) (release) (esr10)

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