Closed Bug 141022 Opened 24 years ago Closed 24 years ago

DOM Inspector crash if "CSS Style rules" is selected on element matching no rules [@nsInspectorCSSUtils::IsRuleNodeRoot]

Categories

(Other Applications :: DOM Inspector, defect, P1)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.1alpha

People

(Reporter: zipo13, Assigned: dbaron)

References

()

Details

(Keywords: crash)

Crash Data

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0+) Gecko/20020428 BuildID: 2002042808 Dom Inspector crash mozilla if CSS Style Rules option is selected upon a local loaded xml file. Reproducible: Always Steps to Reproduce: 1.save the following lines to an xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <channel> </channel> 2. Open Dom inspector 3. Load the file you just saved to the DOM Inspector. 4. select the channel node. 5. from the "Object - Dom Node" popup menu select "CSS Style Rules" Actual Results: Mozilla crash Expected Results: :-) TBID: TB5746619Q
this is a well known crash, unfortunately i can't find any bug report for it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash, stackwanted
Summary: DOM Inspector crash if "CSS Style rules" is selected → DOM Inspector crash if "CSS Style rules" is selected [@nsInspectorCSSUtils::IsRuleNodeRoot]
Attached file stacktrace
crash also occurs with linux build 20020428. this started somewhere between builds 2002021810 and 2002022015.
Keywords: stackwanted
OS: Windows 98 → All
before bug 79091, there was a null check on ruleNode before it was checked for IsRoot(). From attachment 69706 [details] [diff] [review]: - ruleNode = ruleNode->GetParent(); - - // don't be adding that there root node - if (!ruleNode || ruleNode->IsRoot()) - break; - } + mCSSUtils->GetRuleNodeParent(ruleNode, &ruleNode); + mCSSUtils->IsRuleNodeRoot(ruleNode, &isRoot); + } while (!isRoot); (there is no null check in IsRuleNodeRoot)
=>dbaron
Assignee: hewitt → dbaron
Status: NEW → ASSIGNED
Priority: -- → P1
Summary: DOM Inspector crash if "CSS Style rules" is selected [@nsInspectorCSSUtils::IsRuleNodeRoot] → DOM Inspector crash if "CSS Style rules" is selected on element matching no rules [@nsInspectorCSSUtils::IsRuleNodeRoot]
Target Milestone: --- → mozilla1.1alpha
Attached patch patchSplinter Review
This patch is better than just a null-check: the problem is that we need to do the |IsRoot| check before entering the loop, that is, a while loop rather than a do-while loop. I converted it to a for loop while I was there, since I like for loops.
Comment on attachment 86764 [details] [diff] [review] patch sr=waterson
Attachment #86764 - Flags: superreview+
*** Bug 150443 has been marked as a duplicate of this bug. ***
Comment on attachment 86764 [details] [diff] [review] patch r=hewitt
Attachment #86764 - Flags: review+
Fix checked in 2002-06-11 20:30 PDT.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [open1.0.1]
Attachment #86764 - Flags: approval+
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+" keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1+
Fix checked in to MOZILLA_1_0_BRANCH, 2002-06-20 19:53 PDT.
Whiteboard: [open1.0.1]
*** Bug 154631 has been marked as a duplicate of this bug. ***
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020830 vrfy fixed steps: loaded url, selected root node "channel", selected CSS Style Rules.
URL: data:text/xml,<?xml version="1.0" enc...
Status: RESOLVED → VERIFIED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
Crash Signature: [@nsInspectorCSSUtils::IsRuleNodeRoot]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: