Bug 397435 - kphotoalbum failed to create database
Summary: kphotoalbum failed to create database
Status: RESOLVED WORKSFORME
Alias: None
Product: kphotoalbum
Classification: Applications
Component: general (show other bugs)
Version: 5.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-13 21:45 UTC by Manu
Modified: 2018-11-04 20:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manu 2018-08-13 21:45:09 UTC
The error as printed in shell command line

kphotoalbum.Exif: Error running query: create table if not exists settings (keyword TEXT PRIMARY KEY, value TEXT) without rowid
Error was: database is locked Impossible de récupérer la ligne

Then i got many errors by file (i had to clique the button "ok" a lot.
I stopped the prog with CTRL-C

This is reproductible.

The file exif-info.db has a size of 0

Feel free to ask any other informations. Please explain me how i can get them.

$ kphotoalbum -v
kphotoalbum 5.3

$ apt-cache show kphotoalbum
Package: kphotoalbum
Architecture: amd64
Version: 5.3-1
Priority: optional
Section: universe/kde
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 17601
Depends: kio, libc6 (>= 2.14), libexiv2-14 (>= 0.25), libgcc1 (>= 1:3.0), libjpeg8 (>= 8c), libkf5archive5 (>= 4.96.0), libkf5completion5 (>= 4.97.0), libkf5configcore5 (>= 4.97.0), libkf5configwidgets5 (>= 4.98.0), libkf5coreaddons5 (>= 5.2.0), libkf5i18n5 (>= 4.97.0), libkf5iconthemes5 (>= 4.96.0), libkf5jobwidgets5 (>= 4.96.0), libkf5kdcraw5 (>= 4.12.3), libkf5kgeomap10.0.0, libkf5kiocore5 (>= 4.96.0), libkf5kiowidgets5 (>= 5.31.0), libkf5kipi32.0.0 (>= 16.04.0), libkf5service-bin, libkf5service5 (>= 4.96.0), libkf5textwidgets5 (>= 4.96.0), libkf5widgetsaddons5 (>= 4.96.0), libkf5xmlgui-bin, libkf5xmlgui5 (>= 4.98.0), libphonon4qt5-4 (>= 4:4.8.0), libqt5core5a (>= 5.9.0~beta), libqt5dbus5 (>= 5.0.2), libqt5gui5 (>= 5.8.0), libqt5network5 (>= 5.8.0), libqt5sql5 (>= 5.0.2), libqt5widgets5 (>= 5.6.0~beta), libqt5xml5 (>= 5.0.2), libstdc++6 (>= 5.2), phonon4qt5, perl:any, libqt5sql5-sqlite, mplayer
Recommends: khelpcenter, ffmpeg, kipi-plugins
Filename: pool/universe/k/kphotoalbum/kphotoalbum_5.3-1_amd64.deb
Size: 9889572
MD5sum: 14d858b6e9fe87edbd6775fc3053062d
SHA1: b588bd4d59361b9225c75772ad5517640050dea3
SHA256: 70ee29f3622ccc2ba733c0fd853b0c35ab1a95fe940504e94df110d159e7a231
Homepage: http://kphotoalbum.org

$ uname -a
Linux 4.15.0-30-generic #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic
Comment 1 Johannes Zarl-Zierl 2018-08-14 09:30:03 UTC
Thanks for reporting this!

Can you show the file permissions for the exif database ("ls -l exif-info.db")?
Also, is there a stale kphotoalbum process still running on your system which could have locked the file?

Did you already try to remove the file and try again?

Regarding the mass of error messages: I can make this to be less annoying...
Comment 2 Manu 2018-08-14 17:46:48 UTC
Hi,
1st i had to say that i don't have only one error but a lot (thousand of error : 2 or 3 per file). As a result kphotoalbum do not work properly.
I only send the 1st one because i think that every things will be ok when this one is solved.

$ ls -l exif-info.db
-rw-rw---- 1 emmanuel share.photo    0 août  14 00:00  exif-info.db

emmanuel is me and share.photo is the group who can access the photos

Please note that exif-info.db take place on and CIFS mounted drive.
I don't know how to place it somewhere else cause it don't ask it on startup.

There's no stale kphotoalbum process : ps aux | grep kphoto gives only one.

>>> Did you already try to remove the file and try again?
Yes i did, it do not change anything.
Comment 3 Manu 2018-08-14 17:51:34 UTC
Here is other errors if it can help : 
$ kphotoalbum
Icon theme "adwaita" not found.
kphotoalbum.Exif: Error running query: create table if not exists settings (keyword TEXT PRIMARY KEY, value TEXT) without rowid
Error was: database is locked Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: insert or replace into settings (keyword, value) values('DBVersion','3')
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSVersionID int
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSAltitude float
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSAltitudeRef int
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSMeasureMode string
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSDOP float
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSImgDirection float
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSLatitude float
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSLatitudeRef string
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSLongitude float
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSLongitudeRef string
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_GPSInfo_GPSTimeStamp float
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: alter table exif add column Exif_Photo_LensModel string
Error was: Pas de requête Impossible de récupérer la ligne
kphotoalbum.Exif: Error running query: DELETE FROM exif WHERE fileName=?
Error was:  Nombre de paramètres incorrect
kphotoalbum.Exif: Error running query: INSERT OR REPLACE into exif values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
Error was:  Nombre de paramètres incorrect
kphotoalbum.Exif: Error running query: DELETE FROM exif WHERE fileName=?
Error was:  Nombre de paramètres incorrect
kphotoalbum.Exif: Error running query: INSERT OR REPLACE into exif values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
Error was:  Nombre de paramètres incorrect
kphotoalbum.Exif: Error running query: DELETE FROM exif WHERE fileName=?
Error was:  Nombre de paramètres incorrect
kphotoalbum.Exif: Error running query: INSERT OR REPLACE into exif values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
Error was:  Nombre de paramètres incorrect

and it continues this way until the end of photo parsing.
Comment 4 Manu 2018-08-15 23:06:16 UTC
Hi,
i manage to recompile it from latest master.
I got the same error.
But when i added : 
set(CMAKE_BUILD_TYPE RelWithDebInfo)
just after
set(CMAKE_CXX_REQUIRED TRUE)
to the file CMakelists.txt
and rebuild all 
I do not longer have the problem and everything seams to work like a charm
So, there's something really wreid there...
Any idea on how i can find what's wrong ?
Comment 5 Johannes Zarl-Zierl 2018-11-04 20:40:45 UTC
Unfortunately, I can not recreate the problem, even with your additional information.
For now, and mainly because you have found a suitable[1] workaround, I close this bug because it's likely some ephemeral combination of library versions and build flags that will be impossible to track down.


[1] As a side not, "RelWithDebInfo" (or "Release") is usually preferred over the standard "empty" build type.