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

List:       kde-multimedia
Subject:    Re: kaboodle embedding == crash
From:       Matthias Welwarsky <matze () stud ! fbi ! fh-darmstadt ! de>
Date:       2002-06-26 8:50:08
[Download RAW message or body]

On Wednesday 26 June 2002 09:14, Stefan Westerfeld wrote:
>
> Well, the usual problem that occurs with that is that objects get deleted
> during the reentrant mainloop. For instance, it could be that during the
> mime-type-figureout-thing, the user hits some button (i.e. back) which
> causes konqueror to load another page, which causes it to delete kaboodle,
> which causes it to delete the very KPlayObjectFactory that is still busy
> figuring out the mime type, which causes for instance a trivial line like
>
> 	if (m_mimeType == "application/x-zerosize")
> 		return new KPlayObject();
>
> to segfault, as m_mimeType is an access to an already deleted object. And
> even if you now fix your code to handle this case, you will also make sure
> that kaboodle can live with being deleted at the point where it calls
> createPlayObject. Reentrant mainloops are really evil ;).

So the solution would be to open a new, local event loop, like a modal dialog 
does?

regards,
	matze
-- 
Matthias Welwarsky
Fachschaft Informatik FH Darmstadt
Email: matze@stud.fbi.fh-darmstadt.de

"all software sucks equally, but some software is more equal"

[Attachment #3 (application/pgp-signature)]
_______________________________________________
kde-multimedia mailing list
kde-multimedia@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-multimedia

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

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