khtml still getting asserts on www.novinky.cz
Pavel Troller
patrol at sinus.cz
Wed Dec 14 06:37:27 GMT 2005
Hi!
It seems that www.novinky.cz is a really nasty site... Current 3.5 branch
khtml has big problems on it again. It is stated in about 3 bugzilla entries
but all are currently marked as RESOLVED/CLOSED. However, the problems with
this site continue...
In principle some pages are loading OK, while others catch asserts, mostly
coming from attempts to attach already attached DOM node/element (sorry for
maybe vague description, but I'm not trained nor experienced in this area
:-) ).
Because I had to make this site working, I tried to patch the code to return
and do nothing instead of crashing on assert. Of course I don't want such
a patch being accepted, it was just my personal test. After patching one
function, the assert moved a bit to another one (from NodeImpl to ElementImpl
etc.). I had to patch a lot of functions. The resulting diff is attached for
your information. And finally, after patching all this, konq started to
display all the pages on www.novinky.cz "correctly" (from the user's point
of view) and stopped to crash on them.
I noticed, that on pages which formerly crashed, the loading progress
indicator goes forward to about 80% and then skips back to about 20% and
refills. I think the moment of skipping back was the point of asserts being
hit.
It would be nice to get this REALLY fixed.
Should I make a new bugzilla entry for it ?
With regards, Pavel Troller
-------------- next part --------------
Index: html/html_imageimpl.cpp
===================================================================
--- html/html_imageimpl.cpp (revision 488116)
+++ html/html_imageimpl.cpp (working copy)
@@ -224,6 +224,7 @@
void HTMLImageElementImpl::attach()
{
+ if (attached() || m_render) return; //SIN to prevent crash on novinky.cz
assert(!attached());
assert(!m_render);
assert(parentNode());
Index: xml/dom_nodeimpl.cpp
===================================================================
--- xml/dom_nodeimpl.cpp (revision 488116)
+++ xml/dom_nodeimpl.cpp (working copy)
@@ -799,6 +799,7 @@
void NodeImpl::attach()
{
+ if (attached()) return; //SIN to prevent crash on novinky.cz
assert(!attached());
assert(!m_render || (m_render->style() && m_render->parent()));
if (m_render && m_rendererNeedsClose) {
@@ -889,6 +890,7 @@
return;
#endif
+ if (attached() || m_render) return; //SIN to prevent crash on novinky.cz
assert(!attached());
assert(!m_render);
Index: xml/dom_elementimpl.cpp
===================================================================
--- xml/dom_elementimpl.cpp (revision 488116)
+++ xml/dom_elementimpl.cpp (working copy)
@@ -503,6 +503,7 @@
void ElementImpl::attach()
{
+ if (attached()) return; //SIN to prevent crash on novinky.cz
assert(!attached());
assert(!m_render);
assert(parentNode());
More information about the kfm-devel
mailing list