Closed Bug 134845 Opened 23 years ago Closed 23 years ago

[PATCH]Crash in layout while printing a page with large links

Categories

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

defect

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: roland.mainz, Assigned: karnaze)

References

()

Details

(Keywords: crash, Whiteboard: [adt2])

Attachments

(1 file, 5 obsolete files)

2002-03-31-08-trunk build on Solaris 2.7/SPARC with Sun Workshop 7 EA2.
The build crashes in layout while printing
http://bugzilla.mozilla.org/show_bug.cgi?id=132965 due a SIGFPE error.

Stack trace looks like this:
-- snip --
nsLineLayout: Text(0)@ae01a8 metrics=808157,225!
nsLineLayout: Inline(a)(1)@ae013c metrics=808157,225!
Block(pre)(95)@b009c0: line=b00e04 xmost=808157
nsLineLayout: Text(0)@ae0268 metrics=811406,225!
nsLineLayout: Inline(a)(3)@ae0230 metrics=811406,225!
Block(pre)(95)@b009c0: line=b01020 xmost=811406
nsLineLayout: Text(0)@ae2fb4 metrics=697704,225!
nsLineLayout: Inline(a)(3)@ae2f7c metrics=697704,225!
Block(pre)(144)@ae2d6c: line=b03848 xmost=697704
nsLineLayout: Text(0)@ae3074 metrics=700306,225!
nsLineLayout: Inline(a)(5)@ae303c metrics=700306,225!
Block(pre)(144)@ae2d6c: line=b039d0 xmost=700306
nsLineLayout: Text(0)@ae3134 metrics=703046,225!
nsLineLayout: Inline(a)(7)@ae30fc metrics=703046,225!
Block(pre)(144)@ae2d6c: line=b03b58 xmost=703046
nsLineLayout: Text(0)@ae31f4 metrics=702658,225!
nsLineLayout: Inline(a)(9)@ae31bc metrics=702658,225!
nsLineLayout: Text(0)@ae31f4 metrics=702658,225!
nsLineLayout: Inline(a)(9)@ae31bc metrics=702658,225!
Block(pre)(144)@b03d80: line=b03ce0 xmost=702658
nsLineLayout: Text(0)@ae32b4 metrics=700104,225!
nsLineLayout: Inline(a)(11)@ae327c metrics=700104,225!
Block(pre)(144)@b03d80: line=b04068 xmost=700104
nsLineLayout: Text(0)@ae3374 metrics=701309,225!
nsLineLayout: Inline(a)(13)@ae333c metrics=701309,225!
Block(pre)(144)@b03d80: line=b041f0 xmost=701309
GetPrimaryFrameFor() called while FrameManager is being destroyed!
GetPrimaryFrameFor() called while FrameManager is being destroyed!
GetPrimaryFrameFor() called while FrameManager is being destroyed!
GetPrimaryFrameFor() called while FrameManager is being destroyed!
GetPrimaryFrameFor() called while FrameManager is being destroyed!
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! ASSERTION: no window in frame tree: 'nsnull != window', file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
###!!! Break: at file
../../../../../../../../../home/mozilla/src/2002-03-31-08-trunk/mozilla/layout/html/base/src/nsFrame.cpp,
line 2213
t@1 (l@1) signal FPE (integer divide by zero) in nsTableFrame::RoundToPixel dbx:
warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsTableFrame.o"
dbx: warning: see `help finding-files'
at 0xfd6edb20
0xfd6edb20: RoundToPixel+0x0088:        sdivcc  %l0, %l1, %g1
(/opt/SUNWspro/FD7/bin/../YNH/bin/sparcv9/dbx) where
current thread: t@1
  [1] nsTableFrame::RoundToPixel(aValue = 14673, aPixelToTwips = 0.1191151,
aRound = eAlwaysRoundDown), line 386 in "nsTableFrame.cpp"
  [2] nsTableOuterFrame::OuterReflowChild(this = 0x9d9fb4, aPresContext =
0x9bb3c0, aChildFrame = 0xaf2ea8, aOuterRS = STRUCT, aMetrics = STRUCT,
aAvailWidth = (nil), aDesiredSize = STRUCT, aMargin = STRUCT, aMarginNoAuto =
STRUCT, aPadding = STRUCT, aReflowReason = eReflowReason_Initial, aStatus = 0),
line 986 in "nsTableOuterFrame.cpp"
  [3] nsTableOuterFrame::Reflow(this = 0x9d9fb4, aPresContext = 0x9bb3c0,
aDesiredSize = STRUCT, aOuterRS = STRUCT, aStatus = 0), line 1608 in
"nsTableOuterFrame.cpp"
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsBlockReflowContext.o"
  [4] nsBlockReflowContext::DoReflowBlock(0xffbea134, 0xffbe9d8c, 0x0, 0x9d9fb4,
0xfd71b710, 0xfda453b4), at 0xfd5575dc
  [5] nsBlockReflowContext::ReflowBlock(0xffbea134, 0x9d9fb4, 0xffbea05c, 0x0,
0xffbea85c, 0x1), at 0xfd5570cc
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsBlockFrame.o"
  [6] nsBlockFrame::ReflowBlockFrame(0x9d9c9c, 0xffbea7dc, 0xffbea2e0, 0x0,
0xfd605cc0, 0x0), at 0xfd54bcf8
  [7] nsBlockFrame::ReflowLine(0x9d9c9c, 0xffbea7dc, 0xffbea4a8, 0xffbea50c,
0x0, 0x3951), at 0xfd54a6a0
  [8] nsBlockFrame::ReflowDirtyLines(0x9d9c9c, 0xffbea7dc, 0x1, 0xac0d40,
0xfda5ba78, 0x0), at 0xfd549d78
  [9] nsBlockFrame::Reflow(0x9d9c9c, 0x9bb3c0, 0xffbeafd4, 0xffbeabe4,
0xffbeaeb0, 0x400000), at 0xfd5473c8
  [10] nsBlockReflowContext::DoReflowBlock(0xffbeaf8c, 0xffbeabe4, 0x0,
0x9d9c9c, 0xfd546c60, 0xfda3369c), at 0xfd5575dc
  [11] nsBlockReflowContext::ReflowBlock(0xffbeaf8c, 0x9d9c9c, 0xffbeaeb4, 0x1,
0xffbeb6b4, 0x1), at 0xfd5570cc
  [12] nsBlockFrame::ReflowBlockFrame(0x9d9940, 0xffbeb634, 0xffbeb138, 0x0,
0xfd5463c0, 0x3952), at 0xfd54bcf8
  [13] nsBlockFrame::ReflowLine(0x9d9940, 0xffbeb634, 0xffbeb300, 0xffbeb364,
0x0, 0x3952), at 0xfd54a6a0
  [14] nsBlockFrame::ReflowDirtyLines(0x9d9940, 0xffbeb634, 0x1, 0xac161c,
0xfda5ba78, 0x0), at 0xfd549d78
  [15] nsBlockFrame::Reflow(0x9d9940, 0x9bb3c0, 0xffbebf54, 0xffbeba18,
0xffbebe74, 0x400000), at 0xfd5473c8
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsContainerFrame.o"
  [16] nsContainerFrame::ReflowChild(0x9d96e8, 0x9d9940, 0x9bb3c0, 0xffbebf54,
0xffbeba18, 0x0), at 0xfd563af0
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsPageContentFrame.o"
  [17] nsPageContentFrame::Reflow(0x9d96e8, 0x9bb3c0, 0xffbebf54, 0xffbebbd0,
0xffbebe74, 0x0), at 0xfd5d5b04
  [18] nsContainerFrame::ReflowChild(0x9d94e0, 0x9d96e8, 0x9bb3c0, 0xffbebf54,
0xffbebbd0, 0x2d0), at 0xfd563af0
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsPageFrame.o"
  [19] nsPageFrame::Reflow(0x9d94e0, 0x9bb3c0, 0xffbebf54, 0xffbebe78,
0xffbebe74, 0xae8200), at 0xfd5d17e0
  [20] nsContainerFrame::ReflowChild(0x9d9388, 0x9d94e0, 0x9bb3c0, 0xffbebf54,
0xffbebe78, 0x0), at 0xfd563af0
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsSimplePageSequence.o"
  [21] nsSimplePageSequenceFrame::Reflow(0x9d9388, 0x9bb3c0, 0xffbec208,
0xffbec150, 0xffbec3f4, 0x2bb0), at 0xfd5ffcf0
  [22] nsContainerFrame::ReflowChild(0x9d934c, 0x9d9388, 0x9bb3c0, 0xffbec208,
0xffbec150, 0x0), at 0xfd563af0
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsViewportFrame.o"
  [23] ViewportFrame::Reflow(0x9d934c, 0x9bb3c0, 0xffbec4ac, 0xffbec3f8,
0xffbec3f4, 0xffbec4f8), at 0xfd61c058
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsPresShell.o"
  [24] PresShell::InitialReflow(0x9ec508, 0x2bb0, 0x3ef2, 0x1, 0xfd5dbcbc,
0xffbec584), at 0xfd5dc134
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/content/build/nsDocumentViewer.o"
  [25] DocumentViewerImpl::ReflowPrintObject(0x79afa8, 0x94c890, 0x953a20,
0x3ef2, 0xffbec6b0, 0xffbec6b4), at 0xfc554ed0
  [26] DocumentViewerImpl::ReflowDocList(0x79afa8, 0x94c890, 0x1, 0x0, 0x953a20,
0xfc8ad30c), at 0xfc553ee0
  [27] DocumentViewerImpl::SetupToPrintContent(0x79afa8, 0x6c00, 0x6c3c, 0x0,
0x0, 0x80000000), at 0xfc5566a4
  [28] DocumentViewerImpl::DocumentReadyForPrinting(0x79afa8, 0xffbec8d4,
0xfc86b6ff, 0x20db84, 0x0, 0xffbec8cc), at 0xfc5586e8
  [29] DocumentViewerImpl::Print(0x79afa8, 0x97cb68, 0xffbec9f0, 0xffbec9dc,
0xffbec9c8, 0x953a20), at 0xfc55df60
  [30] XPTC_InvokeByIndex(0x79afb8, 0x10, 0x2, 0xffbecc58, 0x80000000,
0x80000001), at 0xff128bdc
=>[31] XPCWrappedNative::CallMethod(ccx = CLASS, mode = ???) (optimized), at
0xfd27009c (line ~2024) in "xpcwrappednative.cpp"
  [32] XPC_WN_CallMethod(cx = ???, obj = ???, argc = ???, argv = ???, vp = ???)
(optimized), at 0xfd27c3b8 (line ~1266) in "xpcwrappednativejsops.cpp"
  [33] js_Invoke(cx = ???, argc = ???, flags = ???) (optimized), at 0xff24ab44
(line ~788) in "jsinterp.c"
  [34] js_Interpret(cx = ???, result = ???) (optimized), at 0xff257034 (line
~2745) in "jsinterp.c"
  [35] js_Invoke(cx = ???, argc = ???, flags = ???) (optimized), at 0xff24abb8
(line ~805) in "jsinterp.c"
  [36] js_InternalInvoke(cx = ???, obj = ???, fval = ???, flags = ???, argc =
???, argv = ???, rval = ???) (optimized), at 0xff24ae50 (line ~880) in
"jsinterp.c"
  [37] JS_CallFunctionValue(cx = ???, obj = ???, fval = ???, argc = ???, argv =
???, rval = ???) (optimized), at 0xff21eddc (line ~3412) in "jsapi.c"
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/dom/src/build/nsJSEnvironment.o"
  [38] nsJSContext::CallEventHandler(0x20dc80, 0x6b8430, 0x6b8440, 0x1,
0xffbed834, 0xffbed4fc), at 0xfbc3cd28
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/dom/src/build/nsJSEventListener.o"
  [39] nsJSEventListener::HandleEvent(0x407690, 0x947448, 0x0, 0xffbed834,
0x80000000, 0xffbed5bc), at 0xfbcaba18
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/content/build/nsEventListenerManager.o"
  [40] nsEventListenerManager::HandleEventSubType(0xffbed8b0, 0x335fa0,
0x947448, 0x407690, 0x20db80, 0xfbcab374), at 0xfc1b2ec0
  [41] nsEventListenerManager::HandleEvent(0x309538, 0x0, 0xffbee538,
0xffbee388, 0x309500, 0x0), at 0xfc1b5984
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/content/build/nsXULElement.o"
  [42] nsXULElement::HandleDOMEvent(0x3094f8, 0x2ffe80, 0xffbee538, 0xffbede34,
0x0, 0xffbee580), at 0xfc40d474
  [43] PresShell::HandleDOMEventWithTarget(0x302458, 0x3094f8, 0xffbee538,
0xffbee580, 0x3f7b58, 0xfd5e5978), at 0xfd5e5a1c
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-03-31-08-trunk/objdir_ws7ea2_gtk/layout/build/nsMenuFrame.o"
  [44] nsMenuFrame::Execute(0x956118, 0x23ced0, 0xffbee494, 0x302458,
0xffbee474, 0xffbee52c), at 0xfd79e0cc
  [45] nsMenuFrame::HandleEvent(0x956118, 0x2ffe80, 0x0, 0x0, 0x12d, 0x759818),
at 0xfd799c18
  [46] PresShell::HandleEventInternal(0x302458, 0xffbeebf0, 0x9460a8, 0x1,
0xffbee83c, 0xfda4cb7c), at 0xfd5e5900
  [47] PresShell::HandleEvent(0x302458, 0x9460a8, 0xffbeebf0, 0xffbee83c, 0x0,
0xffbee834), at 0xfd5e54c4
  [48] nsViewManager::HandleEvent(this = ???, aView = ???, aEvent = ???,
aCaptured = ???) (optimized), at 0xfb85a1a4 (line ~2062) in "nsViewManager.cpp"
  [49] nsView::HandleEvent(this = ???, aVM = ???, aEvent = ???, aCaptured = ???)
(optimized), at 0xfb84b9f4 (line ~305) in "nsView.cpp"
  [50] nsViewManager::DispatchEvent(this = ???, aEvent = ???, aStatus = ???)
(optimized), at 0xfb859ba4 (line ~1869) in "nsViewManager.cpp"
  [51] HandleEvent(aEvent = ???) (optimized), at 0xfb84b0a4 (line ~80) in
"nsView.cpp"
  [52] nsWidget::DispatchEvent(this = ???, aEvent = ???, aStatus = ???)
(optimized), at 0xfca3f04c (line ~1483) in "nsWidget.cpp"
  [53] nsWidget::DispatchWindowEvent(this = ???, event = ???) (optimized), at
0xfca3ecc4 (line ~1371) in "nsWidget.cpp"
  [54] nsWidget::DispatchMouseEvent(this = ???, aEvent = STRUCT) (optimized), at
0xfca3f124 (line ~1510) in "nsWidget.cpp"
  [55] nsWidget::OnButtonReleaseSignal(this = ???, aGdkButtonEvent = ???)
(optimized), at 0xfca401e4 (line ~2072) in "nsWidget.cpp"
  [56] nsWindow::HandleGDKEvent(this = ???, event = ???) (optimized), at
0xfca470bc (line ~4130358) in "nsWindow.cpp"
  [57] dispatch_superwin_event(event = ???, window = ???) (optimized), at
0xfca335dc (line ~944) in "nsGtkEventHandler.cpp"
  [58] handle_gdk_event(event = ???, data = ???) (optimized), at 0xfca33274
(line ~810) in "nsGtkEventHandler.cpp"
dbx: warning: can't find file
"/home/gisburn/package-builds/gtk+/gtk+-1.2.8/objdir/gdk/gdkevents.lo"
  [59] gdk_event_dispatch(0x0, 0xffbef060, 0x0, 0xff3e4270, 0xfe86ca24,
0xffbeefc8), at 0xfea41470
dbx: warning: can't find file
"/home/gisburn/package-builds/glib/glib-1.2.8/objdir/gmain.lo"
  [60] g_main_dispatch(0xffbef060, 0x1b49f8, 0x1, 0x1db0b0, 0xfeb5155b, 0x378),
at 0xfe9b6dc8
  [61] g_main_iterate(0x1, 0x1, 0x5, 0xff3e4270, 0xfca11aaa, 0x19), at
0xfe9b7bcc
  [62] g_main_run(0x1db080, 0x1db080, 0x1, 0x0, 0xfca9373c, 0xff1e76d8), at
0xfe9b7f64
dbx: warning: can't find file
"/home/gisburn/package-builds/gtk+/gtk+-1.2.8/objdir/gtk/gtkmain.lo"
  [63] gtk_main(0xc1f30000, 0x183d34, 0xfca250d0, 0x0, 0x0, 0x78a38), at
0xfecd60a0
  [64] nsAppShell::Run(this = ???) (optimized), at 0xfca253b4 (line ~364) in
"nsAppShell.cpp"
  [65] nsAppShellService::Run(this = ???) (optimized), at 0xfcb301a4 (line ~308)
in "nsAppShellService.cpp"
  [66] main1(argc = ???, argv = ???, nativeApp = ???) (optimized), at 0x18d20
(line ~1350) in "nsAppRunner.cpp"
  [67] main(argc = ???, argv = ???) (optimized), at 0x196f4 (line ~1698) in
"nsAppRunner.cpp"
-- snip --
Exact location of the crash
(http://lxr.mozilla.org/mozilla/source/layout/html/table/src/nsTableFrame.cpp#386):
-- snip --
t@1 (l@1) signal FPE (integer divide by zero) in nsTableFrame::RoundToPixel at
line 386 in file "nsTableFrame.cpp"
  386     PRInt32 excess = aValue % fullPixel;
-- snip --

CC:'ing karnaze per CVS blame...
We get a lot of asserts from reflowing the GfxTextControlFrame2 when it tries to
move it's view. Then later it crashes because a frame's view isn't there.
Assignee: rods → kin
Keywords: crash
I suppose there should be a check for 0 before dividing, but if aPixelsToTwips 
is 0, something very serious has happened.
Putting a printf() in the matching function shows the values used there:
-- snip --
nsTableFrame::RoundToPixel: fullPixel=0, halfPixel=0, aValue=2492,
aPixelToTwips=0.119115
-- snip --
|aPixelToTwips| is not |0| - but it is very small in this case...
Attachment #77246 - Attachment is obsolete: true
Comment on attachment 77248 [details] [diff] [review]
correct patch to avoid dividing by 0

I already tried this solution myself and it does not seem to be the correct one
- no crash anymore but the layout looked horked...
I think it's better to continue printing then to bail. You will always get
fullPixel <= 0 when rendering to a device that has finer resolution than Twips.


In the case fullPixel is <= 0, there is no adjusting necessary for rounding
since aValue is already as accurate as it's going to get.
Also, the assertions that we see while printing pages with text widgets are due 
to bug 61320, and it's totally unrelated to this bug.

Changing platform to ALL since I see this crash on Win2k when printing to a 
file.
Status: NEW → ASSIGNED
Keywords: mozilla1.0, nsbeta1
OS: Solaris → All
Priority: -- → P3
Hardware: Sun → All
Target Milestone: --- → mozilla1.0
Whiteboard: FIX IN HAND, need r=, sr=, and a=
Ok duh, the ABORT1 macro doesn't actually abort so my fix basically does the 
same thing karnaze's does, but it has comments explaining why it can be zero.

Giving this bug to karnaze.
Assignee: kin → karnaze
Status: ASSIGNED → NEW
Priority: P3 → --
Whiteboard: FIX IN HAND, need r=, sr=, and a=
Target Milestone: mozilla1.0 → ---
Reassigning to rods and CCing jkeiser based on comment #2 to fix the underlying 
problem.
Assignee: karnaze → rods
I filed bug 134960 to deal with the bad layout and will keep this.
Assignee: rods → karnaze
Attachment #77248 - Attachment is obsolete: true
Attachment #77261 - Attachment is obsolete: true
Severity: blocker → critical
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: PATCH
Target Milestone: --- → mozilla1.0
nsbeta1+. [adt2]
Keywords: nsbeta1nsbeta1+
Whiteboard: PATCH → PATCH [adt2]
Attachment #77289 - Flags: review+
Comment on attachment 77289 [details] [diff] [review]
same patch applied to pixel rounding in nsCSSRendering as well as nsTableFrame

If an |if| block does a return, there's no need to shove everything after it 
into an |else| block, so instead of your code changing things so that they are 
like this:

   if (aPixelToTwips <= 0)
     return aValue;
   else {
     // The rest of the code in the method.
   }


it should just keep it as:


  if (aPixelToTwips <= 0)
    return aValue;

  // The rest of the code in the method.


I noticed the |if (0 == excess)| block does the same thing too.

Fix that and it's r=kin or sr=kin, whichever you need.
Comment on attachment 77289 [details] [diff] [review]
same patch applied to pixel rounding in nsCSSRendering as well as nsTableFrame

sr=attinasi
Attachment #77289 - Flags: superreview+
Attachment #77289 - Attachment is obsolete: true
Attachment #77376 - Attachment is obsolete: true
Attachment #77377 - Flags: superreview+
Attachment #77377 - Flags: review+
Summary: Crash in layout while printing a page with large links → [PATCH]Crash in layout while printing a page with large links
Whiteboard: PATCH [adt2] → [adt2]
Keywords: approval
Comment on attachment 77377 [details] [diff] [review]
revised patch with reviewer's suggestion

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #77377 - Flags: approval+
Keywords: adt1.0.0
adt1.0.0+ (on ADT's behalf) approval for checkin into 1.0.
Keywords: adt1.0.0adt1.0.0+
The patch is in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Keywords: fixed1.0.0
verified....I don't get a crash.

Roland, does this work for you also ? If not, then REOPEN.
Status: RESOLVED → VERIFIED
Keywords: verified1.0.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: