Summary: | [test case] another crash with <DL compact> | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Josh Metzler <joshdeb> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | test case |
Description
Josh Metzler
2004-06-25 19:54:25 UTC
*** This bug has been marked as a duplicate of 75806 *** I don't get it. This is the very same crash as all the other duplicates, but this one is crashing while all the others are fixed ;( Created attachment 6478 [details]
test case
konqueror: /home/coolo/prod/kdelibs/khtml/rendering/render_block.cpp:434: void
khtml::RenderBlock::layoutBlock(bool): Zusicherung »minMaxKnown()« nicht
erfüllt.
I did some debugging of this crash. When the layout is being calculated, m_minMaxKnown ends up set for every node. The problem occurs later, when actually laying out the nodes. We get to the COMPACT node and then in render_block.c:750, removeChildNode() gets called. This calls setMinMaxKnown(false) on both the child node and the current node. Neither recalcMinMaxWidths() nor calcMinMaxWidth() are ever called again before the crash. So, I don't see how this could ever work. don't know HTML very well, or what COMPACT is supposed to do, but it looks like it would almost always cause this crash. While debugging, I came across a couple of possible small logic simplifications: render_object.c:1715 right before returning, recalcMinMaxWidths() calls calcMinMaxWidth() which sets m_minMaxKnown to true right before returning, so the check here should be unnecessary. render_block.c:2164 the !child->isRenderInline() could be moved inside the previous block where we already know that !child->isText() is true. The else if (child->isText()) could then be just an else for the earlier if. This eliminates 3 calls in the istext() case and 1 or 2 otherwise. I'm not sure where this is set, but a text node has m_minMaxKnown = true and m_recalcMinMaxWidth = true, but it has no children and is inline. So, since m_recalcMinMaxWidth is true, recalcMinMaxWidths() is called on it, but for an inline object with no children, all this does is set m_recalcMinMax to false. It seems to me that a lot of time could be saved on each text node if m_recalcMinMaxWidth were set to false to start with. fixed in CVS. re #4: thanks for the investigation. We ended up changing the implementation of display:compact to something more reliable (i.e: not inlining the compact block). fixed as in FIXED |