Hi! On Wed, Jun 26, 2002 at 07:55:22AM +0200, Matthias Welwarsky wrote: Content-Description: signed data > On Tuesday 25 June 2002 12:14, Malte Starostik wrote: > > My suspicion is that something is wrong with the event loop (just had a > > glance over kdelibs/arts/kde and saw event loop magic in there ;-) > > Just to fill you in, some words about the "event loop magic". The main problem > is that you cannot reliably figure what playobject to use unless you look at > the content of the stream. In order not to clobber the interface, the lookup > has to be done in the call context of createPlayObject(). But, as you cannot > simply enter an endless while() loop until the iojob emitted the mime type of > the stream (would stop signal processing), I did that enter_loop() trick. The > loop is exited again once the signal from the iojob arrives. 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 ;). Cu... Stefan _______________________________________________ kde-multimedia mailing list kde-multimedia@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-multimedia