Bug 290421

Summary: digiKam should inform users when kio-slave fail to load
Product: [Applications] digikam Reporter: Ilya Potapov <danaivehr>
Component: Database-AlbumsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, Deep-Sea, sine.nomine
Priority: NOR    
Version: 4.3.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.7.0

Description Ilya Potapov 2012-01-02 17:38:48 UTC
Version:           2.4.1 (using Devel) 
OS:                Linux

There is no thumbnails in main view, as if there is no photos in every album. That area is completely empty.

Reproducible: Always

Steps to Reproduce:
Launch digikam, click on any non-empty album.

Actual Results:  
Album seems to be empty.

Expected Results:  
There should be thumbnails of photos from album.

OS: Linux (i686) release 3.2.0-6-generic (Ubuntu 12.04, KDE 4.7.95)
Compiler: gcc
Comment 1 Martin Klapetek 2012-01-02 17:40:59 UTC
Can you run digikam from console? Just open up Konsole, type digikam and hit enter. Then check if it complains about some missing "kio_digikamalbums" or something similar. Or better yet - attach the whole output you will get on the console ;)
Comment 2 Ilya Potapov 2012-01-02 17:45:50 UTC
here is output during digikam launch:
http://pastebin.com/ESsSRheM
Comment 3 Martin Klapetek 2012-01-02 17:50:39 UTC
Thanks, looks like your installation is broken. Did you compile from source or did you install from package?

Also please never use pastebins for attaching log outputs in bugzilla, always use the "Add an attachment" link down below ;)

For future reference, I'm pasting the log here:

QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
digikam(3336): couldn't create slave: "Unable to create io-slave:
klauncher said: Error loading 'kio_digikamdates'.
" 
digikam(3336)/digikam (core) Digikam::AlbumManager::slotDatesJobResult: Failed to list dates 
digikam(3336): couldn't create slave: "Unable to create io-slave:
klauncher said: Error loading 'kio_digikamalbums'.
" 
digikam(3336)/digikam (core) Digikam::ImageAlbumModel::slotResult: Failed to list url:  "Could not start process Unable to create io-slave:
klauncher said: Error loading 'kio_digikamalbums'.
." 
QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-169028576' is still in use, all queries will cease to work.
Comment 4 Ilya Potapov 2012-01-02 17:56:35 UTC
Thank you.

I installed from ubuntu precise repositories, there is KDE 4.8 RC1 (4.7.95), and digikam 2.4.1

I searched all "*kio*" packages in aptitude, but it seems to be okay with that. What additional information can i provide?
Comment 5 Martin Klapetek 2012-01-03 11:10:18 UTC
That missing "kio" is part of the digikam installation itself, it seems that digikam can't find those files. Are you running your own environment (like kde devel for example)? And have you had any other digikam version previously installed (both manually or from package)?
Comment 6 Ilya Potapov 2012-01-03 20:20:55 UTC
I had full upgrade from ubuntu oneiric to precise, all kde and digikam parts were from oficial repositories, as now. Upgrade was from kde 4.7.4 to kde 4.7.95, but i cann't remember previous digikam version. I use digikam very often, and there no such bug in previous version.

What files should i search for to find out what is wrong with digikam?
Comment 7 Martin Klapetek 2012-01-04 09:49:44 UTC
I would just suggest to remove digiKam (use purge/completely remove) and reinstall. It's just that digiKam libs are not properly registered with your KDE Workspace installation and therefore it fails to load.

Try simply reinstalling it.
Comment 8 Ilya Potapov 2012-01-06 12:46:09 UTC
Unfortunatly, purging and then installing again does not help.

I purged digikam (with kipi plugins by dependency), then installed it again, but file digikamrc remained, so digikam starts with old collection. Then i purged again and manually deleted digikamrc, so digikam starts as new, with wizard, i set new collection, and problem has not been resolved. It still remains.
Comment 9 Ilya Potapov 2012-01-06 12:48:58 UTC
Oh, and the output during digikam launch is the same.
Comment 10 Martin Klapetek 2012-01-06 12:55:02 UTC
Ok, can you please check .xsession-errors file in your home directory? It's hidden but you can open it from terminal -- kate ~/.xsession-errors

Look for lines related to digiKam and kio and post it here (no pastebin ;). Btw. it's still your installation issues, not much digiKam can do about :/
Comment 11 Ilya Potapov 2012-01-06 13:11:34 UTC
here it is:

Could not open library '/usr/lib/kde4/kio_digikamalbums.so'.
Cannot load library /usr/lib/kde4/kio_digikamalbums.so: (/usr/lib/libkgeomap.so.1: undefined symbol: _ZN6Marble12MarbleWidget14geoCoordinatesEiiRdS1_NS_18GeoDataCoordinates4UnitE)
digikam(16043): couldn't create slave: "Unable to create io-slave:
klauncher said: Error loading 'kio_digikamalbums'.
" 
digikam(16043)/digikam (core) Digikam::ImageAlbumModel::slotResult: Failed to list url:  "Could not start process Unable to create io-slave:
klauncher said: Error loading 'kio_digikamalbums'.
." 
Could not open library '/usr/lib/kde4/kio_digikamalbums.so'.
Cannot load library /usr/lib/kde4/kio_digikamalbums.so: (/usr/lib/libkgeomap.so.1: undefined symbol: _ZN6Marble12MarbleWidget14geoCoordinatesEiiRdS1_NS_18GeoDataCoordinates4UnitE)
digikam(16043): couldn't create slave: "Unable to create io-slave:
klauncher said: Error loading 'kio_digikamalbums'.
" 
digikam(16043)/digikam (core) Digikam::ImageAlbumModel::slotResult: Failed to list url:  "Could not start process Unable to create io-slave:
klauncher said: Error loading 'kio_digikamalbums'.
." 

And here is output of 
# ls -l /usr/lib/kde4/kio_digikamalbums.so 
-rw-r--r-- 1 root root 55180 Dec 25 02:56 /usr/lib/kde4/kio_digikamalbums.so

Is it normal, that date is Dec 25?
Comment 12 Ilya Potapov 2012-01-06 13:17:49 UTC
And it seems to be something wrong with marble...
Comment 13 caulier.gilles 2012-01-06 13:56:18 UTC
yes, binary compatibility is broken with libmarblewidget. Please try to update this shared lib.

Gilles Caulier
Comment 14 Martin Kyral 2012-01-06 13:59:44 UTC
I am facing the very same issue - same logs, same symptoms, only difference is my distribution - Arch. I noticed that things broke after upgrade to kde 4.7.95 (now I have 4.7.97) with digikam 2.3.0. Update of digikam to 2.5.0 didn't help, deleting the image and thumb DB and regeneration it didn't help either.
All the Marble packages have version 4.7.97 just like the rest of KDE SC. 
Below are the timestamps of kio_digikamalbums.so and /usr/lib/libkgeomap.so.1

:) [mates@archbook ~]$ ls -l /usr/lib/kde4/kio_digikamalbums.so 
-rwxr-xr-x 1 root root 56408 05.01.2012 20:28 /usr/lib/kde4/kio_digikamalbums.so*

:) [mates@archbook ~]$ ls -l /usr/lib/libkgeomap.so.1
lrwxrwxrwx 1 root root 19 05.01.2012 20:30 /usr/lib/libkgeomap.so.1 -> libkgeomap.so.1.0.0*
Comment 15 Martin Klapetek 2012-01-06 14:36:22 UTC
It has nothing to do with image database, it's simply a libraries mismatch issue. You can see it in the xsession-errors - "/usr/lib/libkgeomap.so.1: undefined symbol...". That means that our library is looking for something, which is not present in marblewidget library, but was there when the devs were writing code using that library.

I'm not sure what advice to give you as it is a packaging/distro issue, sorry :/

Anyway, I think if digiKam fails to load the kio libs, it /should/ inform the user, not fail silently and let user delete their image db. Therefore I'm marking this as a valid bug, though it's not technically digiKam's fault, but digiKam should handle this case.
Comment 16 Martin Kyral 2012-01-06 15:37:46 UTC
I filled a bug report against Marble: https://bugs.kde.org/show_bug.cgi?id=290805
Comment 17 Ilya Potapov 2012-01-06 18:11:46 UTC
(In reply to comment #16)
> I filled a bug report against Marble:
> https://bugs.kde.org/show_bug.cgi?id=290805

And now it is closed, because digikam should be recompiled against libmarblewidget13 rather then 12.
It is packaging issue and i should report it to kubuntu packagers, am i right?
Comment 18 Martin Klapetek 2012-01-07 00:46:22 UTC
Pretty much, yes :)
Comment 19 Martin Klapetek 2012-01-08 12:10:57 UTC
*** Bug 290962 has been marked as a duplicate of this bug. ***
Comment 20 caulier.gilles 2013-11-25 17:27:36 UTC
Ilya,

Binary compatibility problem on your computer are solved now ?

Gilles Caulier
Comment 21 caulier.gilles 2013-11-25 17:28:40 UTC
Marcel,

There is a way to have a quick feedback after KIOSlave initialization to prompt user is a problem occurs ?

Gilles Caulier
Comment 22 Marcel Wiesweg 2013-11-25 18:22:33 UTC
I would expect that the KIO Job fails, and this error could be used to  report such errors. I dont know if we get a specific error though.
Comment 23 caulier.gilles 2013-11-25 19:26:59 UTC
Marcel,

I can take a look. Where digiKam KIOSlave instances are created exactly in digiKam ? At the first time to use it ? We don't have a pre-creation stage ?

Gilles
Comment 24 Marcel Wiesweg 2013-11-26 20:55:47 UTC
The most relevant location is ImageAlbumModel::startListJob.
I would expect the error in the slotResult which is connected here.

(There are some other places calling ImageLister::startListJob(url) which is where the KIO job is created, but not handled any further.)
Comment 25 caulier.gilles 2014-08-25 10:03:28 UTC
Git commit 235bb6e3945cdc42c0f890d3ad3adf1eea001179 by Gilles Caulier.
Committed on 25/08/2014 at 10:02.
Pushed by cgilles into branch 'master'.

New notification event sent when digiKam KIO-slave cannot be started.
Related: bug 289872
FIXED-IN: 4.3.0

M  +4    -1    NEWS
M  +21   -2    digikam/album/albumlabelstreeview.cpp
M  +1    -0    digikam/album/albumlabelstreeview.h
M  +17   -0    digikam/album/albummanager.cpp
M  +7    -0    libs/models/imagealbummodel.cpp
M  +2    -1    libs/widgets/common/knotificationwrapper.cpp
M  +1    -1    libs/widgets/common/knotificationwrapper.h
M  +10   -6    utilities/gpssearch/gpsmarkertiler.cpp
M  +14   -2    utilities/maintenance/duplicatesfinder.cpp
M  +1    -1    utilities/maintenance/duplicatesfinder.h
M  +9    -3    utilities/maintenance/imageinfojob.cpp
M  +1    -1    utilities/maintenance/imageinfojob.h

http://commits.kde.org/digikam/235bb6e3945cdc42c0f890d3ad3adf1eea001179
Comment 26 caulier.gilles 2017-07-25 10:39:52 UTC
This problem is relevant of digiKam KIO slaves which are dropped since version 5.0.0 in favor of a multithreaded interface to query the database. It will not reproducible.