Closed
Bug 412878
Opened 17 years ago
Closed 17 years ago
Crash [@ nsAccessible::InvalidateChildren ]
Categories
(Core :: Disability Access APIs, defect, P3)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
References
Details
(Keywords: crash)
Crash Data
Attachments
(4 files, 8 obsolete files)
5.84 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
4.91 KB,
patch
|
Details | Diff | Splinter Review | |
5.65 KB,
patch
|
surkov
:
review+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
19.66 KB,
patch
|
Details | Diff | Splinter Review |
This is a fairly common crash now. The first time it shows up on crash stats is Jan 10 builds, although that could just be the first time Firefox 3 builds started getting heavy usage. http://crash-stats.mozilla.com/report/list?range_unit=months&query_search=stack&query_type=contains&version=Firefox%253A3.0b3pre&signature=nsAccessible%253A%253AInvalidateChildren()&query=InvalidateChildren&range_value=2 I see several sub-types, in both cases the doc has finished loading and FireDocLoadEvents() wants to be sure to invalidate any children that were created while it was still loading (e.g. the user tabbed into the doc so an accessible needed to be created for the focus event). Here is when TryFireEarlyLoadEvent() succeeded and EVENT_INTERNAL_LOAD was fired. 0 nsAccessible::InvalidateChildren() mozilla/accessible/src/base/nsAccessible.cpp:541 1 nsDocAccessible::FireDocLoadEvents(unsigned int) mozilla/accessible/src/base/nsDocAccessible.cpp:779 2 nsAccessibilityService::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, unsigned int) mozilla/accessible/src/base/nsAccessibilityService.cpp:219 3 nsDocLoader::FireOnStateChange(nsIWebProgress*, nsIRequest*, int, unsigned int) mozilla/uriloader/base/nsDocLoader.cpp:1235 This is from the later doc load finished handler: 0 nsAccessible::InvalidateChildren() mozilla/accessible/src/base/nsAccessible.cpp:541 1 nsDocAccessible::FireDocLoadEvents(unsigned int) mozilla/accessible/src/base/nsDocAccessible.cpp:779 2 nsDocAccessible::FlushPendingEvents() mozilla/accessible/src/base/nsDocAccessible.cpp:1556 3 nsDocAccessible::FlushEventsCallback(nsITimer*, void*) mozilla/accessible/src/base/nsDocAccessible.cpp:1619 4 nsTimerImpl::Fire() mozilla/xpcom/threads/nsTimerImpl.cpp:400
Flags: blocking1.9?
Assignee | ||
Comment 1•17 years ago
|
||
I think that RefreshNodes() could happen on the doc accessible, and the children of the doc accessible wouldn't be invalidated even though they should. It also appears that we do not do any node refreshing when the root of the subtree has no accessible. That's not right.
Attachment #297665 -
Flags: ui-review?(ginn.chen)
Attachment #297665 -
Flags: superreview?(surkov.alexander)
Attachment #297665 -
Flags: review?(Evan.Yan)
Assignee | ||
Comment 2•17 years ago
|
||
Also, nsAccessible::Shutdown() is called it does an InvalidateChildren() on the parent. It uses mParent to do this. So if it is possible for the nsDocAccessible to create the children, but for them not to store mParent, then that wouldn't work. I don't know how that's possible, though.
Comment 3•17 years ago
|
||
the patch looks ok though i don't get why you changed the order of menupopup events firing.
Assignee | ||
Comment 4•17 years ago
|
||
The order of the event firing wasn't why I moved it. I wanted to keep it inside the if block where I know there is an accessible object.
Attachment #297665 -
Flags: ui-review?(ginn.chen)
Attachment #297665 -
Flags: review?(Evan.Yan)
Attachment #297665 -
Flags: review+
Comment 5•17 years ago
|
||
Comment on attachment 297665 [details] [diff] [review] A hunch: fix logic of nsDocAccessible.cpp ok if event order doesn't make a difference then the patch is ok with me
Attachment #297665 -
Flags: superreview?(surkov.alexander) → superreview+
Assignee | ||
Comment 6•17 years ago
|
||
Surkov, I think you mean r+ not sr+ Maybe I requested it incorrectly? Let's fix that before we seek approval.
Assignee | ||
Comment 7•17 years ago
|
||
Comment on attachment 297665 [details] [diff] [review] A hunch: fix logic of nsDocAccessible.cpp Let's change to r=
Attachment #297665 -
Flags: superreview+ → review?(surkov.alexander)
Updated•17 years ago
|
Attachment #297665 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #297665 -
Flags: approval1.9?
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Comment 8•17 years ago
|
||
Comment on attachment 297665 [details] [diff] [review] A hunch: fix logic of nsDocAccessible.cpp Now on blocking list - patches don't need approval to land
Attachment #297665 -
Flags: approval1.9?
Assignee | ||
Updated•17 years ago
|
Attachment #297665 -
Flags: approval1.9?
Assignee | ||
Updated•17 years ago
|
Attachment #297665 -
Flags: approval1.9?
Assignee | ||
Comment 9•17 years ago
|
||
Marco, can you run with this and make sure it doesn't do anything evil to the build? Here's a try server build: https://build.mozilla.org/tryserver-builds/2008-01-21_18:12-aaronleventhal@moonset.net-Crash-412878/
Assignee | ||
Comment 10•17 years ago
|
||
Let's hope this fixes the problem ... fix number 1000 for me :)
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•17 years ago
|
||
Marco found a problem with dynamic content updates: "go to crash-stats.mozilla.com, click Top Crashers, Firefox 3.0b3pre, and then the no. 23 crash. On the page that appears, click the "Reports" link. With JAWS running, the content isn't updated to show the table with crashers."
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 12•17 years ago
|
||
Attachment #298727 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 13•17 years ago
|
||
Comment on attachment 297665 [details] [diff] [review] A hunch: fix logic of nsDocAccessible.cpp The new change is smaller than this one, we need to have Marco test and see if it creates problems. It should be tested alongside the latest patch in bug 409473.
Attachment #297665 -
Attachment is obsolete: true
Comment 14•17 years ago
|
||
Comment on attachment 298727 [details] [diff] [review] If doc accessible refreshed we must InvalidateChildren if there are any, otherwise we will retain invalid pointers to mFirstChild etc. looks good
Attachment #298727 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 15•17 years ago
|
||
Comment on attachment 298727 [details] [diff] [review] If doc accessible refreshed we must InvalidateChildren if there are any, otherwise we will retain invalid pointers to mFirstChild etc. Checked this in, but leaving the bug open for more related work in RefreshNodes()
Assignee | ||
Comment 16•17 years ago
|
||
Attachment #298727 -
Attachment is obsolete: true
Attachment #298761 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 17•17 years ago
|
||
Attachment #298762 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 18•17 years ago
|
||
Try server builds here: https://build.mozilla.org/tryserver-builds/2008-01-23_16:49-aaronleventhal@moonset.net-RefreshNodes412878/
Comment 19•17 years ago
|
||
This looks much better! No problems with dynamically updating content, yet I still think that browsing is a bit smoother than before. Good work!
Comment 20•17 years ago
|
||
Comment on attachment 298761 [details] [diff] [review] Follow-up: 1) Correct the 2 cases (there is/isn't an accessible) -- especially we need to still shut down dom subtree's accessible if the root has no accessible 2) Don't reuuse iterNode variable r=me for the patch -w
Attachment #298761 -
Flags: review?(surkov.alexander) → review+
Updated•17 years ago
|
Attachment #298762 -
Flags: review?(surkov.alexander)
Assignee | ||
Updated•17 years ago
|
Attachment #298761 -
Flags: approval1.9?
Assignee | ||
Comment 21•17 years ago
|
||
Comment on attachment 298761 [details] [diff] [review] Follow-up: 1) Correct the 2 cases (there is/isn't an accessible) -- especially we need to still shut down dom subtree's accessible if the root has no accessible 2) Don't reuuse iterNode variable Once again I forgot that we don't need a= for blockers!
Attachment #298761 -
Flags: approval1.9?
Assignee | ||
Updated•17 years ago
|
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 22•17 years ago
|
||
We're still getting 1-2 of these each day: http://crash-stats.mozilla.com/report/list?range_unit=months&query_search=stack&query_type=contains&version=Firefox%3A3.0b3pre%2CSeaMonkey%3A2.0a1pre%2CSunbird%3A0.6a1%2CThunderbird%3A3.0a1pre&signature=nsAccessible%3A%3AInvalidateChildren()&query=FireDocLoadEvents&range_value=1 The crashes started on January 10: Steve Lee submitted one this morning which is reproduceable for him on Linux, which involves http://www.bloglines.com/public/stevelee Unfortunately it requires his login to reproduce. Some clues: 1. The crash stack occurs when a page load is finished 2. Steve Lee gets it when loading a link into a frame Perhaps it's due to incorrect cache updating when loading just a frame.
Status: RESOLVED → REOPENED
OS: Windows XP → All
Hardware: PC → All
Resolution: FIXED → ---
Assignee | ||
Comment 23•17 years ago
|
||
Don't fire doc load finished events for docs that are already shut down.
Attachment #301544 -
Flags: review?(ginn.chen)
Assignee | ||
Updated•17 years ago
|
Attachment #301544 -
Flags: review?(ginn.chen) → review?(surkov.alexander)
Comment 24•17 years ago
|
||
(In reply to comment #22) > Steve Lee submitted one this morning which is reproduceable for him on Linux, And on another PC also with Ubuntu, but not on Windows.
Comment 25•17 years ago
|
||
I tried loads of other frame examples and sites but cannot get it to happen any place else. Still I have a test for the fix.
Comment 26•17 years ago
|
||
Comment on attachment 301544 [details] [diff] [review] Don't fire doc load finished events when doc accessible has been shut down 6:37 -0000 >@@ -191,33 +191,45 @@ NS_IMETHODIMP nsAccessibilityService::On > GetAccessibleFor(domDocRootNode, getter_AddRefs(accessible)); btw, could you rename domDocRootNode to domDocNode because when I see this name I think of document element for sure if you're agree root may confuse > nsCOMPtr<nsPIAccessibleDocument> docAccessible = > do_QueryInterface(accessible); > NS_ENSURE_TRUE(docAccessible, NS_ERROR_FAILURE); > >- PRUint32 eventType = 0; >+ PRUint32 eventType; I'd personally prefer to initialize local variables. >+ if (aStateFlags & STATE_STOP) { >+ nsCOMPtr<nsIAccessibleDocument> docAccessible = >+ nsAccessNode::GetDocAccessibleFor(domDocRootNode); Why do we try to get doc accessible here because we got it above already?
Assignee | ||
Comment 27•17 years ago
|
||
Attachment #301544 -
Attachment is obsolete: true
Attachment #301658 -
Flags: review?(surkov.alexander)
Attachment #301544 -
Flags: review?(surkov.alexander)
Assignee | ||
Updated•17 years ago
|
Attachment #301658 -
Attachment is obsolete: true
Attachment #301658 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 28•17 years ago
|
||
Attachment #301660 -
Flags: review?(surkov.alexander)
Comment 29•17 years ago
|
||
Comment on attachment 301660 [details] [diff] [review] Correct patch look ok. >+ if (aStateFlags & STATE_STOP) { >+ // Do not create accessible for page load end events >+ // in case it was already shut down before page finished loading >+ docAccessible = nsAccessNode::GetDocAccessibleFor(domDocNode); // Cached doc accessibles only what is idea to use GetDocAccessibleFor(nsIDOMNode*) instead of GetDocAccessibleFor(nsIDocument*) directly?
Attachment #301660 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 30•17 years ago
|
||
No reason -- I can switch to the more direct method.
Assignee | ||
Updated•17 years ago
|
Attachment #301660 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #301660 -
Flags: approval1.9? → approval1.9+
Comment 31•17 years ago
|
||
Aaron, did the 50/50 fix go in? If so I'm afraid it still crashes. http://crash-stats.mozilla.com/report/index/d85c3140-d550-11dc-998f-001a4bd46e84 http://crash-stats.mozilla.com/report/index/ecfa470f-d550-11dc-a644-001a4bd46e84
Comment 32•17 years ago
|
||
Hey, hey, hey OK, so now I've read my email and used the try server version (#2) I cannot make it crash, despite trying like mad. So it looks like it was 100% the right fix ;-)
Assignee | ||
Comment 33•17 years ago
|
||
Fix checked in. Let's close in a week if the crashes no longer show up on crash-stats.
Comment 34•17 years ago
|
||
I still haven't had the crash since using try build.
Assignee | ||
Comment 35•17 years ago
|
||
Ok that does sound good. We can reopen if it appears again.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 36•17 years ago
|
||
Crashes are still occuring, maybe not quite as often: http://crash-stats.mozilla.com/report/index/425e3a8c-dbb6-11dc-ba5e-001a4bd43e5c http://crash-stats.mozilla.com/report/index/da0c2a80-dbaf-11dc-b914-001a4bd43e5c and, this last checkin apparently caused bug 417249.
Assignee | ||
Comment 37•17 years ago
|
||
Marco & Scott, try server builds are being built, called DocLoadFixes_417249_417828_417578 They'll appear here: https://build.mozilla.org/tryserver-builds/?C=M;O=D
Attachment #303571 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 38•17 years ago
|
||
Marco & Scott, try server builds are being built, called DocLoadFixes_417249_417828_417578 They'll appear here: https://build.mozilla.org/tryserver-builds/?C=M;O=D
Attachment #303572 -
Flags: review?(surkov.alexander)
Assignee | ||
Updated•17 years ago
|
Attachment #303571 -
Attachment is obsolete: true
Attachment #303571 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 39•17 years ago
|
||
Try builds are here: https://build.mozilla.org/tryserver-builds/2008-02-15_13:22-aaronleventhal@moonset.net-DocLoadFixes_417249_417828_417578/
Assignee | ||
Comment 40•17 years ago
|
||
I believe the strong refs will help with the crashes. Also, by waiting for a timer we should be sure to have the correct document and create the correct doc accessible. That should help with crashes, as well as make sure we create the doc accessible that we need at start of load.
Attachment #303572 -
Attachment is obsolete: true
Attachment #303616 -
Flags: review?(surkov.alexander)
Attachment #303572 -
Flags: review?(surkov.alexander)
Comment 41•17 years ago
|
||
(In reply to comment #40) > - } > + NS_ASSERTION(privDocAccessible, "No nsPIAccessibleDocument for NsIAccessibleDocument"); > + privDocAccessible->FireDocLoadEvents(eventType); > > - return NS_OK; > + > +void nsAccessibilityService::EndLoadCallback(nsITimer *aTimer, void *aClosure) This results in a missing } at the end of the StartLoad function, the patch doesn't compile as it is. :-)
Assignee | ||
Comment 42•17 years ago
|
||
I noticed that last night as well. Just put the extra } in to build, or use the pre-made try builds. I was fixing the whitespace last minute. But, the code is still correct other than that.
Comment 43•17 years ago
|
||
I've got a little lost here. should I use the above try servers or wait for new ones or a new nightly?
Assignee | ||
Comment 44•17 years ago
|
||
Use the above try server builds to test this patch. This hasn't been reviewed or checked in yet.
Comment 45•17 years ago
|
||
It sounds you do not use this nsCOMPtr<nsIWebProgress> mStartLoadProgress, mEndLoadProgress; // Hold strong ref
Comment 46•17 years ago
|
||
Is it possible to get two notifications (OnStateChange) for two different webprogresse the same time?
Assignee | ||
Comment 47•17 years ago
|
||
Surkov, I'm not sure if 2 are possible at the same time. We should probably handle that. But, it's definitely something that would be hard for me to deal with right now since I'm going away for about 10 days. Would you be willing to work on that? And, how does everything else look?
Comment 48•17 years ago
|
||
(In reply to comment #47) > Surkov, I'm not sure if 2 are possible at the same time. We should probably > handle that. But, it's definitely something that would be hard for me to deal > with right now since I'm going away for about 10 days. Would you be willing to > work on that? > If nobody feels hot on this then I can take this. > And, how does everything else look? > I didn't accomplish to review the patch actually. But in general it look ok excepting that question.
Assignee | ||
Comment 49•17 years ago
|
||
Attachment #303616 -
Attachment is obsolete: true
Attachment #303616 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 50•17 years ago
|
||
Attachment #305483 -
Attachment is obsolete: true
Assignee | ||
Comment 51•17 years ago
|
||
Fixed via checkin to bug 417249.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Summary: Crash [ @ nsAccessible::InvalidateChildren ] → Crash [@ nsAccessible::InvalidateChildren ]
Updated•13 years ago
|
Crash Signature: [@ nsAccessible::InvalidateChildren ]
You need to log in
before you can comment on or make changes to this bug.
Description
•