Closed Bug 16285 Opened 25 years ago Closed 25 years ago

Crash on doing Ctrl-C ( twice ) in editor

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: harishd, Assigned: akkzilla)

References

Details

Attachments

(1 file)

#1. To reproduce the crash do the following.

1. Open up editor and select the contents ( completely ) of the
   opening document ( initial editor test document ).
2. Now do Ctrl-C twice ( this is also a bug ).

You should see a crash in

void nsHTMLContentSinkStream::EnsureBufferSize(PRInt32 aNewSize)
{
  if (mBufferSize < aNewSize)       <----- mBuffSize = 3 and aNewSize = 4
  {
    delete [] mBuffer;              <----- mBuffer had a string value "hr"

....

Unable to provide the stack because the crash happend when my copy-buffer was in
use and therefore wasn't able to attach the stack to the report.

#2. There is no code to delete mBuffer in nsHTMLContentSinkStream destructor.
Blocks: 12541
Assignee: buster → akkana
reassign to akkana@netscape.com

Sujay--can you reproduce this bug on any other platforms?
I can't reproduce this...but now we don't load the initial
editor test page so I tried it out on a bare minimum loaded
page with text...Harish, is this still happening for you?
Attached file Here's the intial editor page. (deleted) —
Yes, it still crashes for me.
Status: NEW → ASSIGNED
Target Milestone: M11
I'm not seeing this on Linux, but there are known problems with Windows
copy/paste, and perhaps the crash is related to that.  But I'll keep this at
least 'til I fix the problem with not deleting the buffer.
Cc'ing Pinkerton -- this only happens on windows, and it's possible that it's
resulting from memory corruption from problems in the Windows clipboard code.
Adding Rick to cc list -- Rick, if you find yourself doing a Windows Purify run
looking at the parser library, we'd love to know what happens when you hit ^C
twice after selecting all the text in the document.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Harish just checked in a fix for this.
Status: RESOLVED → REOPENED
Tree is red. I haven't checked in the fix yet.  Will checkin as soon as the tree
turns green.

I'll close the bug after my checkin.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Ok, fix is in...  Marking bug FIXED.
Status: RESOLVED → VERIFIED
verified in 10/21 build.
Status: VERIFIED → REOPENED
Akkana, I'm reopening this bug because the crash started to happen again. We
expected this...didn't we??
Resolution: FIXED → ---
I hope to check in the encoder fix I've been working on with Naoki today.  That
changes the code and should be a bit more reliable; with any luck it'll fix this
problem too.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Not crashing anymore ( tested with akkana's recent changes ).

Marking but FIXED.
Blocks: 17907
Status: RESOLVED → VERIFIED
verified in 11/4 build.
No longer blocks: 17907
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: