Closed Bug 205548 Opened 22 years ago Closed 22 years ago

crash when doing multiple redo commands [nsHTMLEditor::CheckResizingState]

Categories

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

defect

Tracking

()

VERIFIED FIXED
mozilla1.5alpha

People

(Reporter: bugzilla, Assigned: glazou)

Details

(Keywords: crash, regression, Whiteboard: editorbase)

Attachments

(2 files)

found using 2003.05.13.08 comm builds on Mac OS X 10.2.6. so far i cannot repro this on win2k or linux rh8.0. 1. open a new editor window. 2. enter a line of text, hit Return. 3. create a list, add three or so list items. 4. hit Return twice, to end the list and add two new lines. 5. add a table (taking default values is fine), hit Return. 6. enter six or so lines of text, hitting Return after each one. 7. hold down command key and hit Z (cmd+Z) to undo everything (including the removal of the first line of text in step 2). 8. now hold down both shift and command key and hit Z to *redo* the changes from step 7. results: some time during step 8, the app will crash. crash report coming up.
looks like this regressed sometime btwn the 2003.03.31 build and 2003.04.16 build. will narrow down some more. also, this can be reproduced by accessing the commands from the Edit menu (ie, not limited to keyboard shortcuts).
Keywords: regression
Is this yours, Daniel?
Assignee: jfrancis → glazman
Seems to WorkForMe using FizzillaMach/2003-05-07-14-1.4b. Tried several undo/redo cycles.
narrowed this down: works with 2003.04.15.08 build, but broken in 2003.04.16.09.
Whiteboard: editorbase
Sairuh--are you sure you didn't resize the table in your steps? Daniel--is this code supposed to be triggered only during resize or on a mousedown or ? I have doubts that this is really platform-specific...
Confirming and taking.
Status: NEW → ASSIGNED
OS: MacOS X → All
Priority: -- → P1
Target Milestone: --- → mozilla1.5alpha
I see major errors in transactions when doing this undo/redo. Furthermore, there is no checkin related to resizing between 14-april and 17-april.... I suspect that the crash in my code is a side effect of a big bug somewhere else.
got it to crash on today's linux build (odd that it didn't occur y'day after numerous attempts, eh well). i don't think i did any resizing --the resize handles didn't appear around the table in the builds where i got the crash. (unless it isn't necessary for the handles to appear in order to initiate resizing behavior.)
Hardware: Macintosh → All
Sairuh: right. I have narrowed the bug, it is caused by a VERY big bug in transactions and undo/redo. In some cases, type a line of text, insert a table (sometimes, the caret is not placed inside the 1st cell but after the table, that's the case we're looking for), type another line. undo 5 times, start redoing and redoing. At some point, we hit a big action nesting problem and THAT causes my code to crash. I am adding some constraints so it won't crash any more BUT it exposes the bug above.
As I said above: An error occurred executing the cmd_redo command An error occurred updating the cmd_paragraphState command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICommandController.getCommandStateWithP arams]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://editor/content/ComposerCommands.js : : goUpdateCommandState :: line 256" data: no] An error occurred updating the cmd_fontFace command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICommandController.getCommandStateWithP arams]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://editor/content/ComposerCommands.js : : goUpdateCommandState :: line 256" data: no] An error occurred updating the cmd_fontColor command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICommandController.getCommandStateWithP arams]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://editor/content/ComposerCommands.js : : goUpdateCommandState :: line 256" data: no] An error occurred updating the cmd_backgroundColor command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICommandController.getCommandStateWithP arams]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://editor/content/ComposerCommands.js : : goUpdateCommandState :: line 256" data: no] An error occurred updating the cmd_highlight command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICommandController.getCommandStateWithP arams]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://editor/content/ComposerCommands.js : : goUpdateCommandState :: line 256" data: no] An error occurred updating the cmd_align command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICommandController.getCommandStateWithP arams]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://editor/content/ComposerCommands.js : : goUpdateCommandState :: line 256" data: no] An error occurred executing the cmd_redo command
Attached patch fix for crasherSplinter Review
WARNING: this fixes the crasher; the original bug causing my code to fail is ***very*** old. I have downloaded 1.3b and have reproduced the "nesting actions" error there, it is impossible to undo/redo totally in the test case described above.
we should _not_ crash here; nominating 1.4 blocker
Flags: blocking1.4?
Attachment #123388 - Flags: superreview?(peterv)
Attachment #123388 - Flags: review?(jfrancis)
Attachment #123388 - Flags: superreview?(peterv) → superreview+
Comment on attachment 123388 [details] [diff] [review] fix for crasher r=brade seeking 1.4final approval for this fix. It is simply adding a null check so we don't crash.
Attachment #123388 - Flags: review?(jfrancis)
Attachment #123388 - Flags: review+
Attachment #123388 - Flags: approval1.4?
I'm sure joe and kin would like to hear about txnmgr problems.
Comment on attachment 123388 [details] [diff] [review] fix for crasher a=sspitzer
Attachment #123388 - Flags: approval1.4? → approval1.4+
Simon: I am going to check that code first, and that will allow to expose the txn bug without crashing. Again, this is an old bug, I can reproduce it with builds from the beginning of february.
checked in (trunk)
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Did you file a bug on the underlying transaction manager problems?
bug 205949 spun off from the current one.
using 2003.05.19.08 comm builds, i no longer crash. however, i do see strange redo behavior --see bug 205949 comment 2 for details. marking this verified.
Status: RESOLVED → VERIFIED
Flags: blocking1.4?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: