Closed Bug 6335 Opened 26 years ago Closed 26 years ago

Deleting a word at start of line throws assertion

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: kinmoz, Assigned: mozeditor)

Details

Load the following html into viewer, and then enter Editor mode. <html> <head><title></title></head> <body> <p>This is a test <p>Ths prgraph c<b>ont</b>ans a toon of speling erors! </body> </html> Now select the word "Ths" in the second paragraph, and hit the backspace key. You should end up hitting an assertion in nsRange.cpp with the stack trace below. Notice how the word "Ths" was not deleted? Trying to delete it a second time works. Undoing everything you just did will hit the same assertion. NTDLL! 77f76148() nsDebug::NotReached(char * 0x01e8301c, char * 0x01e82ff4, int 822) line 165 + 13 bytes nsRange::PopRanges(nsCOMPtr<nsIDOMNode> {...}, int 0, nsCOMPtr<nsIContent> {...}) line 822 + 21 bytes nsRange::OwnerChildRemoved(nsIContent * 0x0153ccac, int 0, nsIContent * 0x0153cb7c) line 1624 + 33 bytes nsGenericHTMLContainerElement::RemoveChildAt(int 0, int 1) line 2649 nsGenericHTMLContainerElement::RemoveChild(nsIDOMNode * 0x0153cb70, nsIDOMNode * * 0x0012f508) line 2464 + 14 bytes nsHTMLParagraphElement::RemoveChild(nsHTMLParagraphElement * const 0x0153cca0, nsIDOMNode * 0x0153cb70, nsIDOMNode * * 0x0012f508) line 48 + 22 bytes nsEditor::JoinNodesImpl(nsIDOMNode * 0x0153cd10, nsIDOMNode * 0x0153cb70, nsIDOMNode * 0x0153cca0, int 0) line 2008 + 43 bytes JoinElementTxn::Do(JoinElementTxn * const 0x0156bba0) line 84 + 43 bytes nsTransactionItem::Do() line 102 + 18 bytes nsTransactionManager::BeginTransaction(nsITransaction * 0x0156bba0) line 560 + 11 bytes nsTransactionManager::Do(nsITransaction * 0x0156bba0) line 98 + 15 bytes nsEditor::Do(nsEditor * const 0x0154a620, nsITransaction * 0x0156bba0) line 678 + 29 bytes nsEditor::JoinNodes(nsEditor * const 0x0154a620, nsIDOMNode * 0x0153cb70, nsIDOMNode * 0x0153cd10, nsIDOMNode * 0x0153cca0) line 1815 + 16 bytes nsHTMLEditRules::JoinNodeDeep(nsIDOMNode * 0x0153cb00, nsIDOMNode * 0x0153cca0, nsIDOMSelection * 0x0152fef4) line 1377 + 45 bytes nsHTMLEditRules::WillDeleteSelection(nsIDOMSelection * 0x0152fef4, nsIEditor::ECollapsedSelectionAction eDeleteLeft, int * 0x0012f87c) line 408 + 33 bytes nsHTMLEditRules::WillDoAction(nsHTMLEditRules * const 0x0154eba0, nsIDOMSelection * 0x0152fef4, nsRulesInfo * 0x0012f880, int * 0x0012f87c) line 215 + 26 bytes nsTextEditor::DeleteSelection(nsTextEditor * const 0x0154a620, nsIEditor::ECollapsedSelectionAction eDeleteLeft) line 783 + 41 bytes nsHTMLEditor::DeleteSelection(nsHTMLEditor * const 0x0154a620, nsIEditor::ECollapsedSelectionAction eDeleteLeft) line 152 nsTextEditorKeyListener::KeyDown(nsIDOMEvent * 0x01565400) line 168 nsEventListenerManager::HandleEvent(nsIPresContext & {...}, nsEvent * 0x0012fd58, nsIDOMEvent * * 0x0012fad8, unsigned int 3, nsEventStatus & nsEventStatus_eIgnore) line 725 + 17 bytes nsDocument::HandleDOMEvent(nsDocument * const 0x015747a0, nsIPresContext & {...}, nsEvent * 0x0012fd58, nsIDOMEvent * * 0x0012fad8, unsigned int 1, nsEventStatus & nsEventStatus_eIgnore) line 2226 nsHTMLHtmlElement::HandleDOMEvent(nsHTMLHtmlElement * const 0x0157569c, nsIPresContext & {...}, nsEvent * 0x0012fd58, nsIDOMEvent * * 0x00000000, unsigned int 1, nsEventStatus & nsEventStatus_eIgnore) line 175 + 41 bytes PresShell::HandleEvent(PresShell * const 0x0152fe24, nsIView * 0x01533a00, nsGUIEvent * 0x0012fd58, nsEventStatus & nsEventStatus_eIgnore) line 2000 + 39 bytes nsView::HandleEvent(nsView * const 0x01533a00, nsGUIEvent * 0x0012fd58, unsigned int 8, nsEventStatus & nsEventStatus_eIgnore) line 831 nsView::HandleEvent(nsView * const 0x01533e90, nsGUIEvent * 0x0012fd58, unsigned int 8, nsEventStatus & nsEventStatus_eIgnore) line 818 nsView::HandleEvent(nsView * const 0x01533dc0, nsGUIEvent * 0x0012fd58, unsigned int 8, nsEventStatus & nsEventStatus_eIgnore) line 818 nsView::HandleEvent(nsView * const 0x0152e2d0, nsGUIEvent * 0x0012fd58, unsigned int 28, nsEventStatus & nsEventStatus_eIgnore) line 818 nsViewManager::DispatchEvent(nsViewManager * const 0x0152ac20, nsGUIEvent * 0x0012fd58, nsEventStatus & nsEventStatus_eIgnore) line 1726 HandleEvent(nsGUIEvent * 0x0012fd58) line 67 nsWindow::DispatchEvent(nsWindow * const 0x01533124, nsGUIEvent * 0x0012fd58, nsEventStatus & nsEventStatus_eIgnore) line 410 + 10 bytes nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012fd58) line 431 nsWindow::DispatchKeyEvent(unsigned int 133, unsigned short 8, unsigned int 8) line 1790 + 15 bytes nsWindow::OnChar(unsigned int 8) line 2059 nsWindow::ProcessMessage(unsigned int 258, unsigned int 8, long 917505, long * 0x0012fef4) line 2182 + 15 bytes nsWindow::WindowProc(void * 0x0085071c, unsigned int 258, unsigned int 8, long 917505) line 474 + 27 bytes USER32! 77e71250()
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
This should be fixed in today's build (I fixed this yesterday).
Uh, this was in todays build, pulled at 8:30am.
Status: RESOLVED → REOPENED
Kin has convinced me that this bug should be reopened.
hey can I simply type in the text like the testfile into the editor and then hit the backspace key to verify that I don't get an assertion?
Okay I tried regressign this one in today's build...even though its reopened. I am able to select "Ths" in teh second paragraph of the test file and use Backspace to delete that text w/o hitting any assertions. Kin was saying that these assertions may not be showing up in optimized builds...
Right; the assertions to nothing in optimized builds, so testing this should concentrate on finding possible scenarios where the application locks up (endless loop) or other bad things happen.
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Status: RESOLVED → VERIFIED
verified in 5/18 build.
You need to log in before you can comment on or make changes to this bug.