[Kde-imaging] Should plugins be unloaded before app exit?

Aurélien Gâteau aurelien.gateau at free.fr
Mon Jul 19 09:53:40 CEST 2004


Le dimanche 18 Juillet 2004 18:23, Jesper K. Pedersen a écrit :
> On Sunday 18 July 2004 18:19, Renchi Raju wrote:
> | On Sun, 18 Jul 2004, Jesper K. Pedersen wrote:
> | > I found a crash in the camera client plugin, where the plugin on exit
> | > tries to save its data using KGlobal.
> | >
> | > This is, however, after kimdaba has started deleting itself (I guess),
> | > the error was:
> | > #9  0x410ed178 in qFatal (
> | >     msg=0x4099ef20 "Fatal error: you need to have a KInstance object
> | > before\nyou do anything that requires it! Examples of this are
> | > config\nobjects, standard directories or translations.") at
> | > tools/qglobal.cpp:574
> | > #10 0x408db81d in KGlobal::dirs ()
> | >     at /packages/kde-src/kdelibs/kdecore/kglobal.cpp:55
> | >
> | > Now my question is:
> | > Should we either requested from the host apps that they properly
> | > unloads plugins before existing, or should we instead tell plugins not
> | > to implement anything in their destructors?
> |
> | for added safety, it might be advisable to unload the plugins. on the
> | other hand, its wrong for a plugin to do stuff in its destructor. a
> | plugin's config can be changed only if its run. say, user runs the camera
> | plugin, it loads up the window and when its finished (operation
> | completed/window closed), it should save the config then (if modified),
> | and not it in its destructor.
>
> I agree with Renchi here.
> (I'm bad with names, sorry)
> Whoever, made maintains the camera plugin, will you please fix.

I agree too.
Tudor, seems like a little job for you :-)

Aurélien


More information about the Kde-imaging mailing list