Crash [@ nsFrameList::RemoveFrame] on printing/print preview

RESOLVED FIXED in mozilla8



Layout: Tables
6 years ago
6 years ago


(Reporter: Martijn Wargers (dead), Assigned: Bernd)


({crash, testcase})

Windows 7
crash, testcase
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)


(crash signature)


(3 attachments, 1 obsolete attachment)

429 bytes, application/xhtml+xml
433 bytes, application/xhtml+xml
5.00 KB, patch
Details | Diff | Splinter Review


6 years ago
Created attachment 549638 [details]

See testcase, which crashes current trunk build on printing/print preview.

Previous bug, bug 642088.
0 	xul.dll 	nsFrameList::RemoveFrame 	layout/generic/nsFrameList.cpp:129
1 	xul.dll 	nsTableFrame::PushChildren 	layout/tables/nsTableFrame.cpp:1958
2 	xul.dll 	nsTableFrame::ReflowChildren 	
3 	xul.dll 	nsTableFrame::ReflowTable 	layout/tables/nsTableFrame.cpp:1900
4 	xul.dll 	nsTableFrame::Reflow 	layout/tables/nsTableFrame.cpp:1804
5 	xul.dll 	nsContainerFrame::ReflowChild 	layout/generic/nsContainerFrame.cpp:959
6 	xul.dll 	nsContainerFrame::StealOverflowFrames 	layout/generic/nsContainerFrame.h:643
7 	xul.dll 	PL_DHashTableOperate 	obj-firefox/xpcom/build/pldhash.c:625

Comment 1

6 years ago
I will look into it once my debug builds compiles...

Comment 2

6 years ago
I see it in my debug build.
Assignee: nobody → bernd_mozilla

Comment 3

6 years ago
Created attachment 549676 [details]
reduced testcase

the structure now  avoids table pseudo frame creation.
Its important that thead is not the first child of the table

Comment 4

6 years ago
what happens here is that on the first page

tbody splits at the available space and creates a next inflow
the table puts the nif on its overflow list.

the table height computation reports a slightly larger desired size (2 px) than available so the table gets marked as truncated

and gets pushed entirely on to second page

then the same table frame is reflowed and gets back the frame from the overflow list

now the mFrames are

tfoot > tbody > thead > tbody_nif 

where > stands for next sibling relation ship

Comment 5

6 years ago
Created attachment 550779 [details] [diff] [review]

this fixes the crash but does not fix the problem with the tfoots that are not placed due to size constraints.

Comment 6

6 years ago
Created attachment 551274 [details] [diff] [review]

The problem comes here from the fact that a repeatable tfoot can't be placed. If it is not pushed it will cause in CalcDesiredHeight a increase by one cellspacing and misplaced tfoot on the page where it does not fit.
Attachment #550779 - Attachment is obsolete: true

Comment 7

6 years ago
This also crash Aurora7.0a2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110806 Firefox/7.0a2 ID:20110806042002


Comment 8

6 years ago
Comment on attachment 551274 [details] [diff] [review]

Boris, we compute the repeatability of tfoot as a quarter of the page size, however we are not guaranteed that the tfoot will fit. The patch here says if it does not fit then we remove the repeatability and push the tfoot to the next inflow. Otherwise tfoot will end as a not placed frame at 0,0 relative to the table and spoil nsTableFrame::CalcDesiredHeight at by addinga 0 height and one cellspacing in excess. 

I will push this over to try, once my commit is reenabled  (bug  677040)
Attachment #551274 - Flags: review?(bzbarsky)
Comment on attachment 551274 [details] [diff] [review]

Attachment #551274 - Flags: review?(bzbarsky) → review+

Comment 10

6 years ago shows a consistent failure pattern in crashtests

REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/layout/tables/crashtests/576890-1.html | assertion count 2 is more than expected 0 assertions
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/layout/tables/crashtests/576890-2.html | assertion count 12 is more than expected 0 assertions
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/layout/tables/crashtests/576890-3.html | assertion count 2 is more than expected 0 assertions

==> more work required

Comment 11

6 years ago
more work is means bug 610245

Comment 12

6 years ago pushed together with the patch for bug 678447, when pushing this to aurora or beta both patches are required otherwise crash tests will go orange.
Whiteboard: [inbound]
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.