Closed Bug 70730 Opened 24 years ago Closed 23 years ago

Printing page crashes Mozilla

Categories

(Core :: Printing: Output, defect, P1)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: dev+mozilla, Assigned: attinasi)

References

()

Details

(Keywords: crash)

Attachments

(8 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.9) Gecko/20010301
BuildID:    2001030110

Trying to print this page crashes Mozilla (before anything gets printed).

Reproducible: Always

Steps to Reproduce:
1. Visit URL.
2. Print the page ("All").

Actual Results:  Crash.

Expected Results:  No crash, and the page printed.

Mozilla does not crash and prints ok if I print only the selection.
Attached file Dr. Watson log.
Adding crash keyword.
Keywords: crash
Summary: Printig page crashes Mozilla → Printing page crashes Mozilla
crashes in Linux as well, with a CVS build from 2001-03-02.
OS: Windows 2000 → All
Attached file reduced test case
Here is the bug.. if I can help let me know.
Assignee: dcone → attinasi
Thanks for the testcase. 
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.8.1
Looks like there is some case where a line with the state bit
NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET does not have an mBullet data member set.
Interestingly, there appears to be some inconsistency between testing for
mBullet and HasOutsideBullet (which tests for the state bit
NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET). If I check for the mBullet in addition to
the HasOutsideBullet() check I can get rid of the crash (and the printout looks
correct!), but I'd like to learn why this discrepency exists.
Don, can you please review the patch? I'm still looking to see why it is
happening that the flag for having a bullet and the data member are out of
synch, but this fixes the crash and makes a good printout (I tested the testcase
only).
Patch looks good.  r=dcone.
thanks marc
*** Bug 70673 has been marked as a duplicate of this bug. ***
Further refinement of patch: Added assertion in HaveOutsideBullet to detect as
early as possible when the mBullet and the NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET
flag get out of whack.

Chris, can you please take a look and possibly grant me your sr=? Thanks.
sr=waterson. Any clue why we're getting out of sync?
Not yet, but it only seems to happen in printing. I'm guessing so far that it is
a timing issue: the bullet frame is getting destroyed before the line somehow -
this is because the printout has all of the bullets anyway, but that is just a
guess.
Fix checked in: nsBlockFrame.h/cpp
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
cf. bug 71181
Had to revert changes due to bug 71181.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Accepting again.
Status: REOPENED → ASSIGNED
OK, I made a really bad assumption about mBullet in the Destroy() method. Prior
to my change, the Destroy method was only deleting the mBullet member if the
HAS_OUTSIDE_BULLET flag is set in the frame's state bits. My change was to
always delete mBullet if non-null. However, the mBullet is also in the frame's
child list if it is an INSIDE bullet, so this was causing a double delete (once
when the child frames were cleaned up, once when mBullet itself was deleted). So
the proper fix is simply to check for HAS_OUTSIDE_BULLET && mBullet in Destroy,
rather than just checking mBullet.

There is still a mystery to solve around why we sometimes get a case of the
HAS_OUTSIDE_BULLET being set but mBullet is null, and I have put in an assertion
to try and detect that early, but I still do not know what is up there (and it
appears to only happen in printing AFAICT).
Is the last patch in lieu of the other patch? Or in addition to it? If the last 
patch is The Whole Patch, it looks ok to me, (s)r=waterson. If both patches are 
req'd, then lemme know; I'll need to grok it better...
Moving to mozilla0.9
Target Milestone: mozilla0.8.1 → mozilla0.9
Fixed (again).
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
*** Bug 71975 has been marked as a duplicate of this bug. ***
verified in 3/20 build.
Status: RESOLVED → VERIFIED
This now works for me too.
*** Bug 72372 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: