Closed
Bug 287359
Opened 20 years ago
Closed 20 years ago
Adding dump() loops in the History sidebar code causes crash [@ nsXULMenuitemAccessible::GetRole]
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: GPHemsley, Assigned: Louie.Zhao)
Details
(Keywords: crash)
Crash Data
Attachments
(2 files, 1 obsolete file)
|
1.43 KB,
patch
|
Details | Diff | Splinter Review | |
|
814 bytes,
patch
|
aaronlev
:
review+
dmosedale
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050320 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050320 While adding dumps to try to get familiar with the Mozilla code in order to fix another bug, I stumbled across something that repeatedly crashes. First it was an accident, but I was able to reproduce it every time I tried--but only when I was using my edited code. When I restored the original code, I was not able to reproduce the crash. However, the files I had been editing were JavaScript files (inside JARs), and I'm told by ajschult that "technically, you're not supposed to be able to crash from javascript." Reproducible: Always Steps to Reproduce: 1. Make changes to files, and go about reimplementing the edited JAR files. 2. Load Mozilla with the command line option "-console" and press F9 to open the sidebar. 3. In the History tab, quickly click on the various listings there. Eventually the webpages will stop loading, the listings will stop changing highlighting, and Mozilla will crash. Actual Results: Mozilla crashed and needed to close all windows, including the loaded debugging console. Expected Results: The code should just keep dumping the things it was supposed to, via dump(), just as it had when things were clicked slowly. Two Talkback crash IDs available, though they contain mostly the same data: TB4535094Z and TB4535354X. I'm told by opi and ajschult that this is a regression caused by the resolution of bug 257638. Apparently, the crash happens in accessibility.dll.
| Reporter | ||
Comment 1•20 years ago
|
||
The crash was most likely caused by the code changed in the history files, but I added the bookmark changes to the diff also because those changes were implemented simultaneously (and were removed during the original code check).
| Reporter | ||
Comment 2•20 years ago
|
||
The crash was most likely caused by the code changed in the history files, but I added the bookmark changes to the diff also because those changes were implemented simultaneously (and were removed during the original code check). (The first patch was not processed by Bugzilla correctly, as a diff for two different files. I added a new line to this one to hopefully alleviate the problem.)
Attachment #178355 -
Attachment is obsolete: true
Incident ID: 4535094 Stack Signature nsXULMenuitemAccessible::GetRole c25f7037 Product ID MozillaTrunk Build ID 2005032005 Trigger Time 2005-03-22 18:30:38.0 Platform Win32 Operating System Windows NT 5.1 build 2600 Module accessibility.dll + (00011609) URL visited User Comments Since Last Crash 30 sec Total Uptime 30 sec Trigger Reason Access violation Source File, Line No. c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp, line 182 Stack Trace nsXULMenuitemAccessible::GetRole [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp, line 182] nsDocAccessibleWrap::FireToolkitEvent [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/accessible/src/msaa/nsDocAccessibleWrap.cpp, line 189] nsDocAccessible::FlushPendingEvents [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/accessible/src/base/nsDocAccessible.cpp, line 993] nsDocAccessible::FlushEventsCallback [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/accessible/src/base/nsDocAccessible.cpp, line 1003] nsAppStartup::Run [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpfe/components/startup/src/nsAppStartup.cpp, line 208] main [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpfe/bootstrap/nsAppRunner.cpp, line 1817] WinMain [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpfe/bootstrap/nsAppRunner.cpp, line 1841] kernel32.dll + 0x16d4f (0x7c816d4f)
Summary: Adding dump() loops in the History sidebar code causes crash → Adding dump() loops in the History sidebar code causes crash [@ nsXULMenuitemAccessible::GetRole]
Comment 6•20 years ago
|
||
Aaron this is what I pinged you about, I'll fix this tonight for you ;-)
| Assignee | ||
Comment 7•20 years ago
|
||
The crash may be caused by "'element' is NULL". If so, assertion "No DOM element for menu node!" should be output. Till now, I am not clear why there is no DOM element for the menu node. One possibility is that the DOM node for the menu node has been destroyed before the corresponding accessible object. If this is the reason, the crash can be caused by many places other than nsXULMenuitemAccessible::GetRole. For example: http://lxr.mozilla.org/seamonkey/source/accessible/src/xul/nsXULMenuAccessible.cpp#67 http://lxr.mozilla.org/seamonkey/source/accessible/src/xul/nsXULMenuAccessible.cpp#107
Comment 8•20 years ago
|
||
Louie, no assertion is necessary. It can happen at any time that mDOMNode for an accessible is null. A node may go away in a document, in which case we call Shutdown() on the accessible for it, which set mDOMNode to null. That way if any external process is refcounting the accessible object they end up holding onto a stub that does not refcount anything else. If they call any methods on that dead object they won't crash, but should get an error returned.
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 9•20 years ago
|
||
Assertion removed from talk with aaron, Other areas where mDOMNode being null could cause crash untouched. Mainly due to me not knowing the code involved, so no clue what to set the out value's to.
Attachment #178429 -
Flags: superreview?(dmose)
Attachment #178429 -
Flags: review?(aaronleventhal)
Comment 10•20 years ago
|
||
Comment on attachment 178429 [details] [diff] [review] Bail on null (Checked in) That's exactly right. We shouldn't assert, we should return NS_ERROR_FAILURE. This is actually a very normal occurance as the assistive technology can still be asking about something it's holding onto after ther DOM node has gone away.
Attachment #178429 -
Flags: review?(aaronleventhal) → review+
Comment 11•20 years ago
|
||
Comment on attachment 178429 [details] [diff] [review] Bail on null (Checked in) sr=dmose
Attachment #178429 -
Flags: superreview?(dmose) → superreview+
Comment 12•20 years ago
|
||
Comment on attachment 178429 [details] [diff] [review] Bail on null (Checked in) Checking in nsXULMenuAccessible.cpp; /cvsroot/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp,v <-- nsXULMenuAccessible.cpp new revision: 1.33; previous revision: 1.32 done
Attachment #178429 -
Attachment description: Bail on null → Bail on null (Checked in)
Comment 13•20 years ago
|
||
--> Fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Crash Signature: [@ nsXULMenuitemAccessible::GetRole]
You need to log in
before you can comment on or make changes to this bug.
Description
•