Closed Bug 847636 Opened 12 years ago Closed 12 years ago

Intermittent test_focus_browserui.xul | Assertion count 1 is greater than expected range (Can't create an accessible for the document!: 'parentDocAcc')

Categories

(Core :: Disability Access APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: RyanVM, Assigned: tbsaunde)

References

Details

(Keywords: assertion, intermittent-failure)

Attachments

(2 files)

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

builder: mozilla-inbound_xp-debug_test-mochitest-other
slave: talos-r3-xp-056

13:32:53     INFO -  2976 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | wrong state bits for ['input node', address: [object HTMLInputElement], role: entry, name: 'Search or enter address', address: 0xa90b800]!
13:32:53     INFO -  2977 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Focussed ['input node', address: [object HTMLInputElement], role: entry, name: 'Search or enter address', address: 0xa90b800] must be focusable!
13:32:53     INFO -  2978 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Singleline ['input node', address: [object HTMLInputElement], role: entry, name: 'Search or enter address', address: 0xa90b800] cannot be multiline!
13:32:53     INFO -  ++DOMWINDOW == 45 (0D077BE8) [serial = 202] [outer = 0CD65858]
13:32:53     INFO -  2979 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Test with ID = '[ 'document node', address: 0xc8d18d8 ] 't ctrl ' key' succeed. Event focus was handled.
13:32:53     INFO -  2980 INFO TEST-INFO | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Invoke the '[ 'document node', address: 0xc8d18d8 ] 'w ctrl ' key' test { scenario #0: expected 'focus' event;  }
13:32:54     INFO -  2981 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | wrong state bits for ['input@id="input" node', address: 0xc185358, role: entry, address: 0xa484c00]!
13:32:54     INFO -  2982 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Focussed ['input@id="input" node', address: 0xc185358, role: entry, address: 0xa484c00] must be focusable!
13:32:54     INFO -  2983 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Singleline ['input@id="input" node', address: 0xc185358, role: entry, address: 0xa484c00] cannot be multiline!
13:32:54     INFO -  2984 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Test with ID = '[ 'document node', address: 0xc8d18d8 ] 'w ctrl ' key' succeed. Event focus was handled.
13:32:54     INFO -  WARNING: getting z level of unregistered window: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/xpfe/appshell/src/nsWindowMediator.cpp, line 558
13:32:54     INFO -  WARNING: getting z level of unregistered window: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/xpfe/appshell/src/nsWindowMediator.cpp, line 558
13:32:54     INFO -  ###!!! ASSERTION: Can't create an accessible for the document!: 'parentDocAcc', file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/accessible/src/base/DocManager.cpp, line 373
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000011C1F4B
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000011C5494
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000008E8317
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000008E94BB
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000008F1BAC
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000E8DF25
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000E80F15
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000F0EB03
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000F14A9B
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000F03D08
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000919D1D
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000091C8CE
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000091FD1F
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000091FC10
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000001833D70
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000DE4754
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000DE8A1E
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001ACF56
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001AD518
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x000000000024FAEF
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000003478A9
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x0000000000254B74
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x000000000025671B
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001ACDF9
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001C4629
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001A0771
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001AD02D
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x00000000001AD518
13:32:54     INFO -  mozjs!JS_GetStringCharsZ+0x0000000000043058
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000DD60B2
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000DCB0B0
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000001833F79
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000183407A
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000001812D62
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000017B8E8F
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000012BEB75
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000185A495
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000185AB10
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000185B114
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000117F962
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000011380C8
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000F2603A
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x000000000001FE09
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x00000000000201F0
13:32:54     INFO -  xul!JSD_GetScriptTotalExecutionTime+0x0000000000020738
13:32:54     INFO -  0x000000000040249A
13:32:54     INFO -  0x0000000000402BDE
13:32:54     INFO -  0x0000000000402D2F
13:32:54     INFO -  0x000000000040678F
13:32:54     INFO -  0x00000000004065BF
13:32:54     INFO -  kernel32!RegisterWaitForInputIdle+0x0000000000000049
13:32:54     INFO -  JavaScript error: chrome://browser/content/tabbrowser.xml, line 2667: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebProgress.removeProgressListener]
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80520012: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/netwerk/base/src/nsFileStreams.cpp, line 215
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80520012: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/netwerk/base/src/nsFileStreams.cpp, line 487
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x8000FFFF: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/base/src/nsContentUtils.cpp, line 3011
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(pusher.Push(aBoundElement)) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/content/xbl/src/nsXBLProtoImplMethod.cpp, line 308
13:32:54     INFO -  WARNING: NS_ENSURE_TRUE(lastNodeWithCaret) failed: file e:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/accessible/src/base/nsCaretAccessible.cpp, line 281
13:32:54     INFO -  2985 INFO TEST-END | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | finished in 2481ms
13:32:54     INFO -  ++DOMWINDOW == 46 (0AA710D0) [serial = 203] [outer = 0C7CEC20]
13:32:54     INFO -  2986 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/events/test_focus_browserui.xul | Assertion count 1 is greater than expected range 0-0 assertions.
Severity: major → normal
Priority: P1 → --
Attached file log
A11YLOG was docload,doccreate I was getting crashes with doclifecycle when a doc was shutting down, but I'm too tired to debug that tonight.
So, when the assert fires the top frame on the js stack is closeBrowserWindow() and DocManager::GetDocAccessible() is being called by FocusManager::NotifyOfDOMBlur() both aDocument and aDocument->GetParentDocument() have pres shells, so I think what's happening is that page hide has fired and we've shut the documents down, and now we want to get the document the blur is related to to notify it of the blur, and since its destroyed we try and create a new document for that dom doc.
seems correct (just in case, related stack):

###!!! ASSERTION: Can't create an accessible for the document!: 'parentDocAcc', file /src/moz1/accessible/src/base/DocManager.cpp, line 373
mozilla::a11y::DocManager::CreateDocOrRootAccessible(nsIDocument*) (/src/moz1/accessible/src/base/DocManager.cpp:374)
mozilla::a11y::DocManager::GetDocAccessible(nsIDocument*) (/src/moz1/accessible/src/base/DocManager.cpp:57)
mozilla::a11y::FocusManager::NotifyOfDOMBlur(nsISupports*) (/src/moz1/accessible/src/base/FocusManager.cpp:158)
nsFocusManager::SendFocusOrBlurEvent(unsigned int, nsIPresShell*, nsIDocument*, nsISupports*, unsigned int, bool, bool) (/src/moz1/dom/base/nsFocusManager.cpp:1920)
nsFocusManager::WindowHidden(nsIDOMWindow*) (/src/moz1/dom/base/nsFocusManager.cpp:940)
nsGlobalWindow::PageHidden() (/src/moz1/dom/base/nsGlobalWindow.cpp:8266)
nsGlobalWindow::PageHidden() (/src/moz1/dom/base/nsGlobalWindow.cpp:8256)
nsDocumentViewer::PageHide(bool) (/src/moz1/layout/base/nsDocumentViewer.cpp:1268)
nsDocShell::FirePageHideNotification(bool) (/src/moz1/docshell/base/nsDocShell.cpp:1626)
nsDocShell::Destroy() (/src/moz1/docshell/base/nsDocShell.cpp:4927)
nsXULWindow::Destroy() (/src/moz1/xpfe/appshell/src/nsXULWindow.cpp:481)
nsWebShellWindow::Destroy() (/src/moz1/xpfe/appshell/src/nsWebShellWindow.cpp:754)
nsChromeTreeOwner::Destroy() (/src/moz1/xpfe/appshell/src/nsChromeTreeOwner.cpp:349)
nsGlobalWindow::ReallyCloseWindow() (/src/moz1/dom/base/nsGlobalWindow.cpp:6958)
nsGlobalWindow::FinalClose() (/src/moz1/dom/base/nsGlobalWindow.cpp:6905)
nsGlobalWindow::Close() (/src/moz1/dom/base/nsGlobalWindow.cpp:6849)
nsGlobalWindow::Close() (/src/moz1/dom/base/nsGlobalWindow.cpp:6783)
NS_InvokeByIndex_P (/src/moz1/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_unix.cpp:164)
I think it's ok to use cached document here since we use blur to fire focus on the document only.
(In reply to alexander :surkov from comment #4)
> I think it's ok to use cached document here since we use blur to fire focus
> on the document only.

so, my other question here is this perhaps a reason we shouldn't shut down doc accessible on page hide, and only on pres shell destruction?
(In reply to Trevor Saunders (:tbsaunde) from comment #5)
> (In reply to alexander :surkov from comment #4)
> > I think it's ok to use cached document here since we use blur to fire focus
> > on the document only.
> 
> so, my other question here is this perhaps a reason we shouldn't shut down
> doc accessible on page hide, and only on pres shell destruction?

per irc: I wouldn't get of rid pagehide over presshell descruction but I'd changed GetOrCreateAccessible to ignore documents that received page hide events. So the question is does nsIDocument have a flag we could check?
Comment on attachment 722628 [details] [diff] [review]
bug 847636 - a11y focus manager doesn't need to force doc accessible creation on dom blur events

Review of attachment 722628 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/src/base/FocusManager.cpp
@@ +155,5 @@
>    if (targetNode && targetNode->OwnerDoc() == FocusedDOMDocument()) {
> +    DocAccessible* doc = GetExistingDocAccessible(targetNode->OwnerDoc());
> +    if (doc) {
> +      doc->HandleNotification<FocusManager, nsINode>
> +        (this, &FocusManager::ProcessDOMFocus, targetNode->OwnerDoc());

can we do an approach from comment #6?
> can we do an approach from comment #6?

I think we might be able to find out if we grovel through docshell enougl, but I don't remember exactly.  In any case I think it doesn't make much sense to consider creating a doc accessible here, so I'd prefer it used GetCachedDocAccessible()
(In reply to Trevor Saunders (:tbsaunde) from comment #9)
> > can we do an approach from comment #6?
> 
> I think we might be able to find out if we grovel through docshell enougl,
> but I don't remember exactly. 

that would be universal fix though

> In any case I think it doesn't make much
> sense to consider creating a doc accessible here, so I'd prefer it used
> GetCachedDocAccessible()

the minus of this approach it's not evident why we use a cached document in this case. In general I wouldn't want to have GetDoc() and GetCachedDoc() both since it's not clear which version should I use in this or that case.
(In reply to alexander :surkov from comment #10)
> (In reply to Trevor Saunders (:tbsaunde) from comment #9)
> > > can we do an approach from comment #6?
> > 
> > I think we might be able to find out if we grovel through docshell enougl,
> > but I don't remember exactly. 
> 
> that would be universal fix though
> 
> > In any case I think it doesn't make much
> > sense to consider creating a doc accessible here, so I'd prefer it used
> > GetCachedDocAccessible()
> 
> the minus of this approach it's not evident why we use a cached document in
> this case. In general I wouldn't want to have GetDoc() and GetCachedDoc()
> both since it's not clear which version should I use in this or that case.

I think the answer to that is that you should use  the function that doesn't force doc creation unless you have a particular need for it.  So that way doc accessible is always created by DocManager, and GetDocAccessible() can go away and cache only version can be renamed to just GetDocAccessible()
what about the case when a11y is enabled after Firefox?
(In reply to alexander :surkov from comment #12)
> what about the case when a11y is enabled after Firefox?

well, we could force create all documents then, but may be current way is best :/


(In reply to alexander :surkov from comment #10)
> (In reply to Trevor Saunders (:tbsaunde) from comment #9)
> > > can we do an approach from comment #6?
> > 
> > I think we might be able to find out if we grovel through docshell enougl,
> > but I don't remember exactly. 
> 
> that would be universal fix though

So, I talked with smaug a bit about this, and it seems the existing code should work because the child doc shouldn't be visible so CreateDocOrRootAccessible() should return before the assert.
Depends on: 850797
Comment on attachment 722628 [details] [diff] [review]
bug 847636 - a11y focus manager doesn't need to force doc accessible creation on dom blur events

this should be fixed by bug 850797
Attachment #722628 - Flags: review?(surkov.alexander)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee: nobody → tbsaunde+mozbugs
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: