[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Crash when closing a khtml part
From:       Martijn Klingens <martijn () martijn ! homeip ! net>
Date:       2001-10-30 9:50:02
[Download RAW message or body]

On Mon, 29 Oct 2001, David Faure wrote:

> Reason for the crash is obvious: this=0x0 in #2, since the view has been deleted already.
>
> But the real problem is: is it really necessary to create anything
> (a selector here), when destroying stuff ?

Eh ? I don't know, this shouldn't happen :-/

I am currently recompiling kdebase after installing BIC libs (I missed
some of friday's commits during my last compile), so I can't test right
now.

But I have some trouble understanding this backtrace. To me it looks like
KHTML tries to call applyChanges() in the destructor. Which I don't
exactly understand :(

First of all, why is this applychanges() needed in the first place? And
second, what's so special there that it crahses and forgets to check its
pointer?

Ok, the second part I can try to find out... Ah, line 532 (m_styleSelector
= new CSSStyleSelector(this);) is there since revision 1.30 of the file,
that can't be it...

Oh, after Dirk said that mediatype is part of the view I moved it there,
so now the CSSStyleSelector ctor depends on the view. grmbl...

The dirty fix is if( view ) ... else // assume mediatype='screen'
but is that the real solution here???

Dirk, any clue?
> #0  0x40be98b9 in QString::QString (this=0xbfffe4b0, s=@0xb0) at tools/qstring.cpp:12567
> #1  0x415049c6 in KHTMLView::mediaType (this=0x0)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/khtmlview.cpp:879
> #2  0x415ace09 in khtml::CSSStyleSelector::CSSStyleSelector (this=0x850adc8, doc=0x85124a0)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/css/cssstyleselector.cpp:108
> #3  0x415289a8 in DOM::DocumentImpl::applyChanges (this=0x85124a0, force=true)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_docimpl.cpp:532
> #4  0x4152bad6 in DOM::DocumentImpl::createSelector (this=0x85124a0)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_docimpl.cpp:1366
> #5  0x41550b2c in DOM::HTMLLinkElementImpl::detach (this=0x85df9c8)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/html/html_headimpl.cpp:150
> #6  0x41531efe in DOM::NodeBaseImpl::detach (this=0x85c8320)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_nodeimpl.cpp:1458
> #7  0x4153653e in DOM::ElementImpl::detach (this=0x85c8320)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_elementimpl.cpp:566
> #8  0x41531efe in DOM::NodeBaseImpl::detach (this=0x8605b30)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_nodeimpl.cpp:1458
> #9  0x4153653e in DOM::ElementImpl::detach (this=0x8605b30)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_elementimpl.cpp:566
> #10 0x41531efe in DOM::NodeBaseImpl::detach (this=0x85124c8)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_nodeimpl.cpp:1458
> #11 0x415293c5 in DOM::DocumentImpl::detach (this=0x85124a0)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/xml/dom_docimpl.cpp:719
> #12 0x4150a3d2 in KHTMLPart::clear (this=0x8568838)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/khtml_part.cpp:1125
> #13 0x41507868 in KHTMLPart::~KHTMLPart (this=0x8568838, __in_chrg=3)
>     at /mnt/devel/kde/kdecvs/kdelibs/khtml/khtml_part.cpp:577
> #14 0x401718b7 in KParts::Part::slotWidgetDestroyed (this=0x8568838)
>     at /mnt/devel/kde/kdecvs/kdelibs/kparts/part.cpp:263
> #15 0x40172cac in KParts::Part::qt_invoke (this=0x8568838, _id=2, _o=0xbfffe840) at part.moc:106
> #16 0x40173144 in KParts::ReadOnlyPart::qt_invoke (this=0x8568838, _id=2, _o=0xbfffe840)
>     at part.moc:256
> #17 0x4151cd41 in KHTMLPart::qt_invoke (this=0x8568838, _id=2, _o=0xbfffe840) at khtml_part.moc:326
> #18 0x409d5cfc in QObject::activate_signal (this=0x8522948, clist=0x8589a10, o=0xbfffe840)
>     at kernel/qobject.cpp:2023
> #19 0x409d5b08 in QObject::activate_signal (this=0x8522948, signal=0) at kernel/qobject.cpp:1994
> #20 0x40c39969 in QObject::destroyed (this=0x8522948) at .moc/debug-mt/moc_qobject.cpp:101
> #21 0x409d3346 in QObject::~QObject (this=0x8522948, __in_chrg=0) at kernel/qobject.cpp:384
> #22 0x409fc7fb in QWidget::~QWidget (this=0x8522948, __in_chrg=0) at kernel/qwidget.cpp:854
> #23 0x40d0cf79 in QFrame::~QFrame (this=0x8522948, __in_chrg=0) at .moc/debug-mt/moc_qframe.cpp:29
> #24 0x40aa9898 in QScrollView::~QScrollView (this=0x8522948, __in_chrg=0)
>     at widgets/qscrollview.cpp:612
> [...]
>
> This happens all the time when closing "konqueror https://easyweb.tdcanadatrust.com/"
> But I guess it can happen pretty much everywhere ;)
>
> --
> David FAURE, david@mandrakesoft.com, faure@kde.org
> http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
> KDE 3.0: Konquering the Desktops
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic