Closed Bug 16724 Opened 27 years ago Closed 27 years ago

[CRASH] in nsRange using DOM viewer

Categories

(Core :: Layout, defect, P1)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: buster, Assigned: mozeditor)

References

()

Details

in apprunner, fire up DOM viewer load URL above click "refresh" button on DOM viewer crash with this stack: GKHTML! const nsTreeCellFrame::`vftable'{for `nsIFrame'} address 0x01cd16a8 GetNodeBracketPoints(nsIContent * 0x02e612d0, nsCOMPtr<nsIDOMNode> * 0x0012f5b4 {0x00000000}, int * 0x0012f5bc, int * 0x0012f5c0) line 244 CompareNodeToRange(nsIContent * 0x02e612d0, nsIDOMRange * 0x02e6ae10, int * 0x0012f620, int * 0x0012f61c) line 191 + 21 bytes nsContentSubtreeIterator::GetTopAncestorInRange(nsCOMPtr<nsIContent> {0x02e62ee0}, nsCOMPtr<nsIContent> * 0x02e64e0c {0x00000000}) line 1072 + 34 bytes nsContentSubtreeIterator::Init(nsContentSubtreeIterator * const 0x02e64e00, nsIDOMRange * 0x02e6ae10) line 915 + 27 bytes nsDOMSelection::selectFrames(nsDOMSelection * const 0x02d9f0a0, nsIDOMRange * 0x02e6ae10, int 0) line 1893 nsDOMSelection::Clear() line 1748 nsDOMSelection::Collapse(nsDOMSelection * const 0x02d9f0a0, nsIDOMNode * 0x02f34900, int 1) line 2416 nsRangeList::TakeFocus(nsRangeList * const 0x02d9e6f0, nsIContent * 0x02f34910, unsigned int 1, unsigned int 2, int 0, int 0) line 1115 nsRangeList::HandleClick(nsRangeList * const 0x02d9e6f0, nsIContent * 0x02f34910, unsigned int 1, unsigned int 2, int 0, int 0, int 0) line 1027 nsFrame::HandlePress(nsFrame * const 0x02f36e10, nsIPresContext & {...}, nsGUIEvent * 0x0012fbcc, nsEventStatus & nsEventStatus_eIgnore) line 815 nsFrame::HandleEvent(nsFrame * const 0x02f36e10, nsIPresContext & {...}, nsGUIEvent * 0x0012fbcc, nsEventStatus & nsEventStatus_eIgnore) line 772 nsTitledButtonFrame::HandleEvent(nsTitledButtonFrame * const 0x02f36e10, nsIPresContext & {...}, nsGUIEvent * 0x0012fbcc, nsEventStatus & nsEventStatus_eIgnore) line 1172 PresShell::HandleEvent(PresShell * const 0x02d9f104, nsIView * 0x02d79cb0, nsGUIEvent * 0x0012fbcc, nsEventStatus & nsEventStatus_eIgnore) line 2162 + 38 bytes nsView::HandleEvent(nsView * const 0x02d79cb0, nsGUIEvent * 0x0012fbcc, unsigned int 28, nsEventStatus & nsEventStatus_eIgnore, int & 0) line 834 nsViewManager::DispatchEvent(nsViewManager * const 0x02d79d40, nsGUIEvent * 0x0012fbcc, nsEventStatus & nsEventStatus_eIgnore) line 1739 HandleEvent(nsGUIEvent * 0x0012fbcc) line 63 nsWindow::DispatchEvent(nsWindow * const 0x02d79b74, nsGUIEvent * 0x0012fbcc, nsEventStatus & nsEventStatus_eIgnore) line 401 + 10 bytes nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012fbcc) line 422 nsWindow::DispatchMouseEvent(unsigned int 302, nsPoint * 0x00000000 {x=??? y=???}) line 3394 + 21 bytes ChildWindow::DispatchMouseEvent(unsigned int 302, nsPoint * 0x00000000 {x=??? y=???}) line 3612 nsWindow::ProcessMessage(unsigned int 513, unsigned int 1, long 1769476, long * 0x0012fdf4) line 2621 + 24 bytes the problem is that in GetNodeBracketPoints, outParent is null when dereferenced. the code below shows we fail to check outParent for null and GetParentNode for an error result. PRBool GetNodeBracketPoints(nsIContent* aNode, nsCOMPtr<nsIDOMNode>* outParent, PRInt32* outStartOffset, PRInt32* outEndOffset) { if (!aNode) return PR_FALSE; if (!outParent) return PR_FALSE; if (!outStartOffset) return PR_FALSE; if (!outEndOffset) return PR_FALSE; nsCOMPtr<nsIDOMNode> theDOMNode( do_QueryInterface(aNode) ); PRInt32 indx; theDOMNode->GetParentNode(getter_AddRefs(*outParent)); if (!(*outParent)) // special case for root node
accepting/m11
Priority: P3 → P1
Summary: crash in nsRange using DOM viewer → [CRASH] in nsRange using DOM viewer
Target Milestone: M11 → M12
Target Milestone: M12 → M11
Status: ASSIGNED → RESOLVED
Closed: 27 years ago
Resolution: --- → FIXED
fixed, it think. But I'm unable to test (DOM viewer does not come up for me)
I would like to verify this problem too but DOMviewer is not loading. Tested with the Win32 1999111016 build.
Status: RESOLVED → VERIFIED
The crash is no longer occuring in the Nov 29th build.
You need to log in before you can comment on or make changes to this bug.