ioslave terminating mechanism

Malte Starostik malte at kde.org
Thu Apr 18 10:40:13 BST 2002


Am Thursday 18 April 2002 00:05 schrieb aleXXX:
> On Wednesday 17 April 2002 17:11, Malte Starostik wrote:
> > Hi,
> >
> > kio_thumbnail sometimes keeps hanging around after receiving SIGTERM and
> > has to be KILLed. This happens when a HTML preview is being generated
> > while the slave is killed, e.g. when you go to somewhere else in konq
> > during preview generation.
> > I've seen different bt's, mostly:
> > * KHTMLPart's dtor result in XFlush() due to the (actually already hidden
> > widget being hidden) => ~90% CPU, most of it system
>
> The following code ?
>
> HTMLCreator::~HTMLCreator()
> {
>     delete m_html;
> }
>
> bool HTMLCreator::create(const QString &path, int width, int height, QImage
> &img)
> {
>     if (!m_html)
>     {
>         m_html = new KHTMLPart;
>
> You create a qobject with parent 0 and delete it in the dtor of the class
> which owns the pointer. I did the same and always had a crash in the dtor
> when I tried to hide() (or was it delete ?) the widgets when exiting the
> app normally (i.e. not due to signals). So deleting or accessing 0-parent
> widgets in the dtor of the owning class when exiting the app seems to be a
> bad idea, not only in ioslaves.
Every toplevel widget is created and destroyed somehow like this. Or am I 
missing something?

-- 
Malte Starostik
PGP: 1024D/D2F3C787 [C138 2121 FAF3 410A 1C2A  27CD 5431 7745 D2F3 C787]





More information about the kde-core-devel mailing list