Bug 344519 - KMimeTypeTrader::query() returns both Qt4-based and Qt5-based plugins
Summary: KMimeTypeTrader::query() returns both Qt4-based and Qt5-based plugins
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kservice
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.1.0
Platform: Slackware Linux
: NOR crash
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-24 10:06 UTC by Pawel Smolinski
Modified: 2018-11-30 04:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Dolphin log (29.69 KB, text/x-log)
2015-02-24 10:06 UTC, Pawel Smolinski
Details
Konqueror log (34.91 KB, text/x-log)
2015-02-24 10:06 UTC, Pawel Smolinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Smolinski 2015-02-24 10:06:38 UTC
Created attachment 91262 [details]
Dolphin log

Happens both in Dolphin (version 14.11.97) and Konqueror (KDE 4.14.5).
When in file manager I'll right-click on any file, applications are crashing.
Attaching GDB logs for both applications
Comment 1 Pawel Smolinski 2015-02-24 10:06:59 UTC
Created attachment 91263 [details]
Konqueror log
Comment 2 Pawel Smolinski 2015-02-24 10:08:03 UTC
It is crashing only when I'll try to open context menu on files, it works correctly with directories.
Comment 3 Christoph Feck 2015-02-24 11:39:53 UTC
Pawel, on your system is a "kdeconnectfiletiemaction.so" plugin installed, which is linked to Qt5. Dolphin and Konqueror, however, are linked to Qt4. For now, I suggest to downgrade to the KDE 4 version of kdeconnect.

I am completely unsure who needs to ensure mixed versions are not allowed in the plugins. It could be a Dolphin issue, or some KService issue. Reassigning to Dolphin developers for now.

Albert, please note the wrong .so name, it should be "kdeconnectfileitemaction.so"
Comment 4 Pawel Smolinski 2015-02-24 14:14:19 UTC
Christoph, I've upgraded to KDE 5 in order to catch & report bugs and won't  downgrade :)
Comment 5 Albert Vaca Cintora 2015-02-25 05:17:57 UTC
Dolphin 4 shouldn't be loading the KDE Connect 5 plugin. It looks like a problem in the path where KDE Connect is installed (it looks like you compiled it manually, so maybe some CMake option caused this) and/or with how Dolphin handles the plugins.
Comment 6 Pawel Smolinski 2015-02-25 08:47:17 UTC
I'm actually using packages from here: http://taper.alienbase.nl/mirrors/alien-kde/current/testing/ and as advised I've uninstalled whole KDE4 packages installed previously.
Comment 7 Albert Vaca Cintora 2015-02-26 06:03:59 UTC
You haven't uninstalled KDE 4 completely, because the version of Konqueror and Dolphin you have are from KDE 4.
Comment 8 Frank Reininghaus 2015-03-05 22:28:41 UTC
This is how Dolphin and other applications get the context menu plugins:

const KService::List pluginServices = KMimeTypeTrader::self()->query(commonMimeType, "KFileItemAction/Plugin", "exist Library");

I don't see any way how one could tell the "query" function about the version, so this looks like a KService issue from my point of view. (And it's probably better to implement this version check in KService than in every application that uses it - KService should know if it's the Qt4 or the Qt5 version after all).

I'll reassign to the KService framework, but actually, it would be desirable to have this fixed in kdelibs 4.x too.
Comment 9 David Faure 2015-05-14 23:36:42 UTC
Well you can extend the constraint to say something like
    and [X-KF-Version]=5

and add X-KF-Version=5 to the plugin desktop files.

Alternatively (probably better), the plugins should use just json (no desktop file) and the kf5 based dolphin should use KPluginLoader to load these plugins (from a specific subfolder of the plugins dir, no trader query needed). Qt's builtin version check will then take care of the qt5 vs qt6 issue next time :)
Comment 10 Andrew Crouthamel 2018-10-31 04:06:54 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2018-11-15 10:51:35 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2018-11-30 04:04:13 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!