Bug 191459 - infinite recursion in khtml layouts
Summary: infinite recursion in khtml layouts
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.2.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2009-05-03 13:03 UTC by Michal Vaner
Modified: 2014-10-20 18:57 UTC (History)
2 users (show)

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 Michal Vaner 2009-05-03 13:03:31 UTC
Version:            (using KDE 4.2.2)
Compiler:          gcc (Gentoo 4.3.3-r2 p1.1, pie-10.1.5) 4.3.3 CFLAGS="-Os -march=pentium-m -pipe -ggdb"
OS:                Linux
Installed from:    Gentoo Packages

On some pages (for example http://ksp.mff.cuni.cz/sksp/2009J/zazitky.html), konqueror freezes, with 100% CPU. When interrupted under gdb, I get an infinite (well, I got bored after getting to 600th frame) backtrace of recursion. This is the beginning:

#0  khtml::InlineBox::isInlineFlowBox (this=0x889e054)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_line.h:69
#1  0xb511394d in khtml::InlineFlowBox::computeLogicalBoxHeights (this=0x889e07c, maxPositionTop=@0xbf84cca8, maxPositionBottom=@0xbf84cca4, 
    maxAscent=@0xbf84cca0, maxDescent=@0xbf84cc9c, strictMode=true)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_line.cpp:645
#2  0xb5113a0b in khtml::InlineFlowBox::verticallyAlignBoxes (this=0x889e07c, heightOfBlock=@0x875be20)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_line.cpp:550
#3  0xb50ba1cc in khtml::RenderBlock::computeVerticalPositionsForLine (this=0x875bdf8, lineBox=0x889e07c)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/bidi.cpp:816
#4  0xb50bde92 in khtml::RenderBlock::layoutInlineChildren (this=0x875bdf8, relayoutChildren=true, breakBeforeLine=0)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/bidi.cpp:1526
#5  0xb50c59f6 in khtml::RenderBlock::layoutBlock (this=0x875bdf8, relayoutChildren=false)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:833
#6  0xb50c5dea in khtml::RenderBlock::layout (this=0x875bdf8)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:736
#7  0xb5109aaa in khtml::RenderListItem::layout (this=0x875bdf8)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_list.cpp:196
#8  0xb50c754a in khtml::RenderObject::layoutIfNeeded (this=0xbf84cca0)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_object.h:477
#9  0xb50c543a in khtml::RenderBlock::layoutBlockChildren (this=0x875b950, relayoutChildren=true)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:1563
#10 0xb50c5a05 in khtml::RenderBlock::layoutBlock (this=0x875b950, relayoutChildren=false)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:835
#11 0xb50c5dea in khtml::RenderBlock::layout (this=0x875b950)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:736
#12 0xb50c754a in khtml::RenderObject::layoutIfNeeded (this=0xbf84cca0)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_object.h:477
#13 0xb50c543a in khtml::RenderBlock::layoutBlockChildren (this=0x875b780, relayoutChildren=true)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:1563
#14 0xb50c5a05 in khtml::RenderBlock::layoutBlock (this=0x875b780, relayoutChildren=false)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:835
#15 0xb50c5dea in khtml::RenderBlock::layout (this=0x875b780)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:736
#16 0xb5109aaa in khtml::RenderListItem::layout (this=0x875b780)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_list.cpp:196
#17 0xb50c754a in khtml::RenderObject::layoutIfNeeded (this=0xbf84cca0)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_object.h:477
#18 0xb50c543a in khtml::RenderBlock::layoutBlockChildren (this=0x875b678, relayoutChildren=true)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:1563
#19 0xb50c5a05 in khtml::RenderBlock::layoutBlock (this=0x875b678, relayoutChildren=false)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:835
#20 0xb50c5dea in khtml::RenderBlock::layout (this=0x875b678)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:736
#21 0xb50c754a in khtml::RenderObject::layoutIfNeeded (this=0xbf84cca0)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_object.h:477
#22 0xb50c543a in khtml::RenderBlock::layoutBlockChildren (this=0x875b4a8, relayoutChildren=true)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:1563
#23 0xb50c5a05 in khtml::RenderBlock::layoutBlock (this=0x875b4a8, relayoutChildren=false)
    at /usr/src/debug/kde-base/kdelibs-4.2.2-r1/kdelibs-4.2.2/khtml/rendering/render_block.cpp:835

I guess if I left it running longer, it would crash on stack overrun.

I do not have much spare time to debug it, but if there is some kind of information that could help (like a coredump, information about my environment, …), please, ask.

It might be related to bug #177091, but the backtrace looks a little different, so I guess it is another one.

Thank you very much
Comment 1 Dario Andres 2009-06-21 02:11:26 UTC
Here using:

Qt: 4.5.1 (qt-copy  971295)
KDE: 4.2.92 (KDE 4.2.92 (KDE 4.3 >= 20090617))
kdelibs svn rev. 984425 / kdebase svn rev. 984427
on ArchLinux i686 - Kernel 2.6.29.4

I can't reproduce the hang. The page is loaded quickly and it can be browsed properly too.

Did the site changed?

Thanks
Comment 2 Michal Vaner 2009-06-21 11:51:49 UTC
No, this page is the same. However, there are things I noticed that might be related to it. I have two screens (trough xrandr), one (primary) is 1024x768, second 1280x1024. The second is below the first (from the point of software, in reality, they are side by side), which means the primary has a blind area on the right side of it. When konqueror is run on the first one, it freezes. When on the second, it does not. When the second is turned off, it still freezes.

I use xmonad window manager, which causes the window to be true fullscreen (no borders, title bar, taskbar, etc).

So, some wild guesses of what may cause it: the blind area, different sizes of the screen when asked by core X protocol or by xinerama, or it might happen only with some resolutions, fonts and so on. Maybe the page gets almost full, adds a scrollbar, then it realligns, makes it smaller somehow (different wrapping?), removes the scrollbar again? But as I say, this is just a wild guess.

My current version is:
Qt: 4.5.1
KDE: 4.2.4 (KDE 4.2.4)
Konqueror: 4.2.4 (KDE 4.2.4)
Comment 3 Andrea Iacovitti 2014-10-20 18:57:52 UTC
I can not reproduce with the test url provided in comment #0 using KDE 4.14.2 then closing. Feel free to reopen if you can still reprocude.