Bug 116599 - Konqueror crashes after visiting www.apple.com and closing konqueror
Summary: Konqueror crashes after visiting www.apple.com and closing konqueror
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: Maksim Orlovich
URL:
Keywords:
: 85057 117116 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-18 02:07 UTC by Ismail Donmez
Modified: 2005-11-30 23:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch (429 bytes, patch)
2005-11-18 02:42 UTC, Maksim Orlovich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ismail Donmez 2005-11-18 02:07:45 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.4 
OS:                Linux

Only "sliding ipod ad" is causing it.

Here is the backtrace:

#7  0xb6689c36 in __assert_fail () from /lib/libc.so.6
#8  0xb618875a in khtml::Cache::clear () at loader.h:174
#9  0xb604cf3c in ~KHTMLFactory (this=0x8377390)
    at /home/cartman/KDE-SVN/kdelibs/khtml/khtml_factory.cpp:98
#10 0xb604ca38 in KHTMLFactory::deref ()
    at /home/cartman/KDE-SVN/kdelibs/khtml/khtml_factory.cpp:139
#11 0xb604ce47 in ~KHTMLFactory (this=0x85264a0)
    at /home/cartman/KDE-SVN/kdelibs/khtml/khtml_factory.cpp:103
#12 0xb75980ac in ~KLibrary (this=0x852a9b0)
    at /home/cartman/KDE-SVN/kdelibs/kdecore/klibloader.cpp:131
#13 0xb7599567 in KLibLoader::close_pending (this=0x8199268, wrap=0x847c898)
    at /home/cartman/KDE-SVN/kdelibs/kdecore/klibloader.cpp:516
#14 0xb759abb4 in ~KLibLoader (this=0x8199268)
    at /home/cartman/KDE-SVN/kdelibs/kdecore/klibloader.cpp:328
#15 0xb7596f18 in KLibLoader::cleanUp ()
    at /home/cartman/KDE-SVN/kdelibs/kdecore/klibloader.cpp:298
#16 0xb74cca93 in ~KApplication (this=0xbfde83c0)
    at /home/cartman/KDE-SVN/kdelibs/kdecore/kapplication.cpp:1610
#17 0xb7f3b795 in ~KonquerorApplication (this=0xbfde83c0)
    at /home/cartman/KDE-SVN/kdebase/konqueror/konq_main.cc:58
#18 0xb7f3b2bb in kdemain (argc=2, argv=0xbfde8554)
    at /home/cartman/KDE-SVN/kdebase/konqueror/konq_main.cc:221
#19 0x08048702 in main (argc=2, argv=0xbfde8554) at kdeinit_konqueror.cpp:2
Comment 1 Maksim Orlovich 2005-11-18 02:10:12 UTC
This is the getComputedStyle leak.

Testcase:
<script type="text/javascript" language="javascript">

function scrollinator() {
    var imgs = document.getElementsByTagName('a');
    for (i=0;i<imgs.length;i++) {
            imgs[i].w = parseInt(document.defaultView.getComputedStyle(imgs[i], '').getPropertyValue("width"));
    }
}

</script></head>

<body onload="scrollinator()">

<a>
<img src="http://www.kde.org/media/images/kde_gear_64.png" id="img">
</a>

Comment 2 Maksim Orlovich 2005-11-18 02:42:33 UTC
Created attachment 13526 [details]
patch

The setting of parent is what leaks it, since there is nothing to reset it back
to 0; and it appears useless...
Comment 3 Tommi Tervo 2005-11-18 08:48:23 UTC
*** Bug 85057 has been marked as a duplicate of this bug. ***
Comment 4 Maksim Orlovich 2005-11-27 01:13:41 UTC
*** Bug 117116 has been marked as a duplicate of this bug. ***
Comment 5 Maksim Orlovich 2005-11-30 23:01:16 UTC
SVN commit 484467 by orlovich:

Don't leak getComputedStyle info. Fixes one cause of this:
kdelibs/khtml/misc/loader.cpp:1314: static void khtml::Cache::clear(): Assertion `it.current()->canDelete()' failed.
BUG:116599


 M  +0 -2      dom2_viewsimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/xml/dom2_viewsimpl.cpp #484466:484467
@@ -45,8 +45,6 @@
         return 0;
 
     CSSStyleDeclarationImpl* style = new RenderStyleDeclarationImpl( elt );
-    style->setParent( elt->getDocument()->elementSheet() );
-
     return style;
 }
 
Comment 6 Maksim Orlovich 2005-11-30 23:02:14 UTC
SVN commit 484468 by orlovich:

Regression test for #116599
CCBUG:116599


 A             baseline/unsorted/116599.html-dom  
 A             baseline/unsorted/116599.html-render  
 M  +1 -0      baseline/unsorted/svnignore  
 A             tests/unsorted/116599.html  


--- trunk/tests/khtmltests/regression/baseline/unsorted/svnignore #484467:484468
@@ -41,3 +41,4 @@
 112653.html-dump.png
 110036.html-dump.png
 116325.html-dump.png
+116599.html-dump.png