From kde-devel Sun Jan 17 02:06:54 2021 From: =?UTF-8?Q?Nicol=C3=A1s_Alvarez?= Date: Sun, 17 Jan 2021 02:06:54 +0000 To: kde-devel Subject: Re: Plugin development - old library version keeps being used after recompiling Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=161084926210826 El s=C3=A1b, 16 de ene. de 2021 a la(s) 04:50, David Lerch (alemariusnexus@gmail.com) escribi=C3=B3: > > Hey, > > I'm starting development of a ThumbCreator-based thumbnailer plugin > based on kffmpegthumbnailer > (https://github.com/dirkvdb/ffmpegthumbnailer/tree/master/kffmpegthumbnai= ler) > and ffmpegthumbs (https://invent.kde.org/multimedia/ffmpegthumbs), and > I have managed to get some simple code working in Dolphin. > > The problem is that some part of the system (some kind of KDE service > cache?) seems to be caching my thumbnailer's shared library because > when I change its code and recompile, the new changes don't seem to > come into effect right away. I don't know what triggers it to > eventually load the new version - it seems to just magically happen > after a few minutes. Even if I restart Dolphin, disable and re-enable > the thumbnailer in Dolphin, or run `kbuildsycoca5 --noincremental` - > it doesn't seem to change anything. It's borderline impossible to > develop when I can never be sure if it's running the old or the new > version. > > My current code isn't online anywhere yet, but it's still mostly > identical to kffmpegthumbnailer if that helps. I simply symlinked the > .so-file in /usr/lib/x86_64-linux-gnu/qt5/plugins (so it should always > see the newest version), the .desktop-file for the service in > /usr/share/kservices5 and the .kcfg-file in /usr/share/config.kcfg. > > Can I maybe force KDE to reload the new library, or something similar? KIO plugins run in separate processes, not inside Dolphin. There isn't a "shared library cache", it's just the thumbnailer is still running in the background. The process will be shown as something like "thumbnail.so [kdeinit5] thumbnail", as a child process of either kdeinit5, or of Dolphin (if you used KDE_FORK_SLAVES as Meven suggested). Try "killall thumbnail.so". --=20 Nicol=C3=A1s