Bug 72651 - inserting a div an table with an absolute positionning and an height make khtml crash
Summary: inserting a div an table with an absolute positionning and an height make kht...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-14 18:16 UTC by FACORAT Fabrice
Modified: 2004-01-14 20:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FACORAT Fabrice 2004-01-14 18:16:24 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

when loading an html file with a table, and inside this table there is a div, if this div has an absolute positionning and an height ( percentage ), khtml just crash.


here is a very simple test case :

<html>
<head>
	<title>test</title>
	<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
</head>
<body>
 <table align="center" height="80%" cellspacing="0" border="0" width="95%">
  <tbody>
  <tr>
  	<td>
		<div style="position: absolute; left: 10px; top: 40px; width: 95%; height: 90%;" >
		</div>
    	</td>
  </tr>
</tbody>
</table>
</body>
</html>
Comment 1 Stephan Kulow 2004-01-14 18:43:35 UTC
konqueror: KonqMainWindow::openView ok=true bOthersFollowed=false returning true
kdeui (KMainWindow): KMainWindow::applyMainWindowSettings
khtml (xml):  using strict parseMode
konqueror: attach 0x85c3568 html
konqueror: attach 0x85c3620 head
konqueror: attach 0x85c3720 meta
konqueror: attach 0x85c35a8 title
konqueror: KonqMainWindow::setCaption(Obfuscation: Lang5)
konqueror: attach 0x85c39b0 table
konqueror: attach 0x85c3cd0 tbody
konqueror: attach 0x85c3dd8 tr
konqueror: attach 0x85c3e70 td
konqueror: attach 0x85c4080 div
konqueror: RenderCanvas(1): 0x85bdce8  oc mmk zI: auto  <> (0,0,698,0) [22-22] { mT: 0 qT: 0 mB: 0 qB: 0} layer=0x85bdd84
konqueror:   RenderBlock(1): 0x85bddcc  oc mmk  <html> (0,0,698,0) [22-22] { mT: 0 qT: 0 mB: 0 qB: 0} layer=0x85bde3c
konqueror:     RenderBody(1): 0x85bde84  oc mmk zI: auto  <body> (0,10,678,0) [2-2] { mT: 10 qT: 0 mB: 10 qB: 0}
konqueror:       RenderTable(1): 0x85bdef8  ci oc mmk zI: auto  <table> (0,0,644,0) [2-2] { mT: 0 qT: 0 mB: 0 qB: 0}
konqueror:         RenderTableSection(1): 0x85bdf94  lt mmk zI: auto  <tbody> (0,0,0,0) [-1--1] { mT: 0 qT: 0 mB: 0 qB: 0}
konqueror:           RenderTableRow(1): 0x85bdff0  lt mmk zI: auto  <tr> (0,0,0,0) [0-0] { mT: 0 qT: 0 mB: 0 qB: 0}
konqueror:             RenderTableCell(1): 0x85be014  ci oc lt mmk zI: auto  <td> (0,0,644,2) [2-2] { mT: -16384 qT: 0 mB: -16384 qB: 0} [r=0 c=0 rs=1 cs=1]
konqueror:               RenderBlock (positioned)(1): 0x85be098  ci ps mmk zI: auto  <div> (10,40,663,328) [0-0] { mT: 0 qT: 0 mB: 0 qB: 0} layer=0x85be108
 this object = 0x85be014, [
0: /coolo/KDE/lib/libkdecore.so.4(_Z11kdBacktracei+0x3a) [0x408a0476]
1: /coolo/KDE/lib/libkdecore.so.4(_Z11kdBacktracev+0x1f) [0x408a06e9]
2: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock11layoutBlockEb+0x84) [0x42663220]
3: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml15RenderTableCell6layoutEv+0x2d) [0x42693ae1]
4: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml18RenderTableSection10layoutRowsEi+0x6b9) [0x426921c5]
5: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderTable6layoutEv+0x359) [0x4268f01d]
6: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock19layoutBlockChildrenEb+0xef1) [0x42664925]
7: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock11layoutBlockEb+0x40f) [0x426635ab]
8: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock6layoutEv+0x20) [0x42663194]
9: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml10RenderBody6layoutEv+0x20) [0x426b258c]
10: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock19layoutBlockChildrenEb+0xef1) [0x42664925]
11: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock11layoutBlockEb+0x40f) [0x426635ab]
12: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock6layoutEv+0x20) [0x42663194]
13: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock19layoutBlockChildrenEb+0xef1) [0x42664925]
14: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock11layoutBlockEb+0x40f) [0x426635ab]
15: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml11RenderBlock6layoutEv+0x20) [0x42663194]
16: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml12RenderCanvas6layoutEv+0x22e) [0x426aadfc]
17: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLView6layoutEv+0x1ca) [0x425b0baa]
18: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml12RenderCanvas5closeEv+0x3a) [0x426ab49e]
19: /coolo/KDE/lib/libkhtml.so.4(_ZN3DOM12DocumentImpl5closeEv+0x64) [0x426087ea]
20: /coolo/KDE/lib/libkhtml.so.4(_ZN3DOM16HTMLDocumentImpl5closeEv+0x48) [0x4263f538]
21: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLPart18checkEmitLoadEventEv+0x21b) [0x425cddef]
22: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLPart19slotFinishedParsingEv+0x34) [0x425cce32]
23: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLPart9qt_invokeEiP8QUObject+0x49c) [0x425e2ea2]
24: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEP15QConnectionListP8QUObject+0x129) [0x417530a7]
25: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEi+0x180) [0x41752f46]
26: /coolo/KDE/lib/libkhtml.so.4(_ZN3DOM12DocumentImpl15finishedParsingEv+0x36) [0x4260da6a]
27: /coolo/KDE/lib/libkhtml.so.4(_ZN3DOM12DocumentImpl7qt_emitEiP8QUObject+0x42) [0x4260dae6]
28: /coolo/KDE/lib/libkhtml.so.4(_ZN3DOM16HTMLDocumentImpl7qt_emitEiP8QUObject+0x24) [0x426400b2]
29: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEP15QConnectionListP8QUObject+0x100) [0x4175307e]
30: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEi+0x180) [0x41752f46]
31: /coolo/KDE/lib/libkhtml.so.4(_ZN9Tokenizer15finishedParsingEv+0x36) [0x42626e8e]
32: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml13HTMLTokenizer3endEv+0xbd) [0x42635877]
33: /coolo/KDE/lib/libkhtml.so.4(_ZN5khtml13HTMLTokenizer6finishEv+0x30d) [0x42635b8d]
34: /coolo/KDE/lib/libkhtml.so.4(_ZN3DOM12DocumentImpl13finishParsingEv+0x27) [0x4260899b]
35: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLPart3endEv+0x7d) [0x425ccb2f]
36: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLPart12slotFinishedEPN3KIO3JobE+0x2b5) [0x425cc11f]
37: /coolo/KDE/lib/libkhtml.so.4(_ZN9KHTMLPart9qt_invokeEiP8QUObject+0x489) [0x425e2e8f]
38: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEP15QConnectionListP8QUObject+0x276) [0x417531f4]
39: /coolo/KDE/lib/libkio.so.4(_ZN3KIO3Job6resultEPS0_+0xc4) [0x4032533a]
40: /coolo/KDE/lib/libkio.so.4(_ZN3KIO3Job10emitResultEv+0x7f) [0x40313859]
41: /coolo/KDE/lib/libkio.so.4(_ZN3KIO9SimpleJob12slotFinishedEv+0x2ab) [0x40314ddb]
42: /coolo/KDE/lib/libkio.so.4(_ZN3KIO11TransferJob12slotFinishedEv+0x52) [0x40316b4c]
43: /coolo/KDE/lib/libkio.so.4(_ZN3KIO11TransferJob9qt_invokeEiP8QUObject+0x94) [0x403270a2]
44: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEP15QConnectionListP8QUObject+0x129) [0x417530a7]
45: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEi+0x180) [0x41752f46]
46: /coolo/KDE/lib/libkio.so.4(_ZN3KIO14SlaveInterface8finishedEv+0x39) [0x40305f71]
47: /coolo/KDE/lib/libkio.so.4(_ZN3KIO14SlaveInterface8dispatchEiRK9QMemArrayIcE+0xe7) [0x403046af]
48: /coolo/KDE/lib/libkio.so.4(_ZN3KIO14SlaveInterface8dispatchEv+0x9a) [0x40304318]
49: /coolo/KDE/lib/libkio.so.4(_ZN3KIO5Slave8gotInputEv+0x33) [0x40301e25]
50: /coolo/KDE/lib/libkio.so.4(_ZN3KIO5Slave9qt_invokeEiP8QUObject+0x83) [0x40303851]
51: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEP15QConnectionListP8QUObject+0x129) [0x417530a7]
52: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN7QObject15activate_signalEii+0x1bb) [0x41753419]
53: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN15QSocketNotifier9activatedEi+0x39) [0x41aa8905]
54: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN15QSocketNotifier5eventEP6QEvent+0x48) [0x41773080]
55: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN12QApplication14internalNotifyEP7QObjectP6QEvent+0x259) [0x416f08f5]
56: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x1b8) [0x416efdb2]
57: /coolo/KDE/lib/libkdecore.so.4(_ZN12KApplication6notifyEP7QObjectP6QEvent+0x4cd) [0x4088cf89]
58: /coolo/KDE/lib/libkdeinit_konqueror.so(_ZN12QApplication9sendEventEP7QObjectP6QEvent+0x4d) [0x400746bf]
59: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN10QEventLoop23activateSocketNotifiersEv+0x102) [0x416decba]
60: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN10QEventLoop13processEventsEj+0xbe1) [0x416987c9]
61: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN10QEventLoop9enterLoopEv+0x66) [0x41704aa6]
62: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN10QEventLoop4execEv+0x36) [0x417049c2]
63: /space/prod/qt-copy/lib/libqt-mt.so.3(_ZN12QApplication4execEv+0x2b) [0x416f0a75]
64: /coolo/KDE/lib/libkdeinit_konqueror.so(kdemain+0x1447) [0x4005b51f]
65: konqueror(kdemain+0xf2) [0x804868a]
66: /lib/libc.so.6(__libc_start_main+0xce) [0x4102dd3e]
67: konqueror(kdemain+0x39) [0x80485d1]
]

konqueror: /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:426: void khtml::RenderBlock::layoutBlock(bool): Zusicherung »false« nicht erfüllt.
Comment 2 Stephan Kulow 2004-01-14 18:46:35 UTC
#5  0x4103af3b in __assert_fail () from /lib/libc.so.6
#6  0x4266326d in khtml::RenderBlock::layoutBlock(bool) (this=0x85b956c, relayoutChildren=false)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:426
#7  0x42693ae1 in khtml::RenderTableCell::layout() (this=0x85b956c)
    at /coolo/prod/kdelibs/khtml/rendering/render_table.cpp:1618
#8  0x426921c5 in khtml::RenderTableSection::layoutRows(int) (this=0x85b94ec, toAdd=0)
    at /coolo/prod/kdelibs/khtml/rendering/render_table.cpp:1147
#9  0x4268f01d in khtml::RenderTable::layout() (this=0x85b9450)
    at /coolo/prod/kdelibs/khtml/rendering/render_table.cpp:270
#10 0x42664925 in khtml::RenderBlock::layoutBlockChildren(bool) (this=0x85b93dc, relayoutChildren=true)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:822
#11 0x426635ab in khtml::RenderBlock::layoutBlock(bool) (this=0x85b93dc, relayoutChildren=true)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:500
#12 0x42663194 in khtml::RenderBlock::layout() (this=0x85b93dc)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:418
#13 0x426b258c in khtml::RenderBody::layout() (this=0x85b93dc)
    at /coolo/prod/kdelibs/khtml/rendering/render_body.cpp:92
#14 0x42664925 in khtml::RenderBlock::layoutBlockChildren(bool) (this=0x85b9324, relayoutChildren=true)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:822
#15 0x426635ab in khtml::RenderBlock::layoutBlock(bool) (this=0x85b9324, relayoutChildren=true)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:500
#16 0x42663194 in khtml::RenderBlock::layout() (this=0x85b9324)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:418
#17 0x42664925 in khtml::RenderBlock::layoutBlockChildren(bool) (this=0x85b9240, relayoutChildren=false)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:822
#18 0x426635ab in khtml::RenderBlock::layoutBlock(bool) (this=0x85b9240, relayoutChildren=false)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:500
#19 0x42663194 in khtml::RenderBlock::layout() (this=0x85b9240)
    at /coolo/prod/kdelibs/khtml/rendering/render_block.cpp:418
#20 0x426aadfc in khtml::RenderCanvas::layout() (this=0x85b9240)
    at /coolo/prod/kdelibs/khtml/rendering/render_canvas.cpp:168
#21 0x425b0baa in KHTMLView::layout() (this=0x8565060) at /coolo/prod/kdelibs/khtml/khtmlview.cpp:579
#22 0x426ab49e in khtml::RenderCanvas::close() (this=0x85b9240)
    at /coolo/prod/kdelibs/khtml/rendering/render_canvas.cpp:310
#23 0x426087ea in DOM::DocumentImpl::close() (this=0x843c8a0)
    at /coolo/prod/kdelibs/khtml/xml/dom_docimpl.cpp:1134
#24 0x4263f538 in DOM::HTMLDocumentImpl::close() (this=0x843c8a0)
    at /coolo/prod/kdelibs/khtml/html/html_documentimpl.cpp:292
#25 0x425cddef in KHTMLPart::checkEmitLoadEvent() (this=0x85113c8)
    at /coolo/prod/kdelibs/khtml/khtml_part.cpp:2025
#26 0x425cce32 in KHTMLPart::slotFinishedParsing() (this=0x85113c8)
    at /coolo/prod/kdelibs/khtml/khtml_part.cpp:1792
#27 0x425e2ea2 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x85113c8, _id=20, _o=0xbfffde00)
Comment 3 Dirk Mueller 2004-01-14 20:18:53 UTC
CVS commit by mueller: 

CCMAIL. 72651-done@bugs.kde.org


  M +1 -1      render_table.cpp   1.250


--- kdelibs/khtml/rendering/render_table.cpp  #1.249:1.250
@@ -1145,5 +1145,5 @@ int RenderTableSection::layoutRows( int 
             if (cellChildrenFlex) {
                 cell->setCellPercentageHeight(rHeight);
-                cell->layout();
+                if (!cell->layouted()) cell->layout();
 
                 // Alignment within a cell is based off the calculated