Bug 281937

Summary: Digikam 2.10 failed - Reinstalling 1.90 is failing too - Database issue
Product: [Applications] digikam Reporter: ultrajej
Component: Database-SqliteAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: 1.9.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.2.0
Sentry Crash Report:

Description ultrajej 2011-09-13 13:10:14 UTC
Version:           1.9.0 (using KDE 4.7.0) 
OS:                Linux

I am running Kubuntu 11.04 using KDE 4.7.0 from backport.
Digikam 1.9.0 was working fine but I wanted the update to 2.10 from Philip backport

The install went through to point it is scanning my Photo folders (on NTFS drive). It never opened. As I will install 11.10 when its ready I decided to reinstall 1.90. This one is not opening anymore both from shortcut and console.

Having something like that:
----------------------------------------
KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work 
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE2 QSQLITE3 QMYSQL3 QMYSQL QODBC3 QODBC QPSQL7 QPSQL QTDS7 QTDS
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(9275)/digikam (core): Error while opening the database. Error details [ QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
QSqlDatabase:  driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE2 QSQLITE3 QMYSQL3 QMYSQL QODBC3 QODBC QPSQL7 QPSQL QTDS7 QTDS
QSqlDatabase:  driver not loaded
...
----------------------------------------------
I always as to kill the task manually

I tried some solutions from current threads without success. I finally tried something (bad for Linux users):
I typed: sudo digkam
It cannot save my folders when I restart but it is opening Digikam. That a temporary workaround.

How can I fix that for my user with 1.90?

By the way the error with 2.10 was
-----------------------------
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Aucun fichier ou dossier de ce type
QFileSystemWatcher: failed to add paths: /home/jerome/.config/ibus/bus
QLayout: Cannot add null widget to QVBoxLayout/
Application asked to unregister timer 0x4e000019 which is not registered in this thread. Fix application.
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(10077) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam: symbol lookup error: digikam: undefined symbol: _ZN11KExiv2Iface14AltLangStrEdit15setLinesVisibleEj 

Reproducible: Always

Steps to Reproduce:
Open Digikam

Actual Results:  
Process for Digikam on but the application cannot open

Expected Results:  
Digikam should open
Comment 1 Christoph Feck 2011-09-14 21:15:16 UTC
> undefined symbol

You are mixing incompatible repositories.
Comment 2 ultrajej 2011-09-15 08:46:30 UTC
(In reply to comment #1)
> > undefined symbol
> 
> You are mixing incompatible repositories.

Thanks for that info but I already guessed that. My question is what can I do to fixed that? 
I already removed Philips ppa.

I am really tired of trying to move from Windows to Linux as nothing is easy and believe me I really like the KDE windows manager. Digikam is THE software who made me to move to the Linux world.
Just to entertain you a bit more (I am not looking for support for that). It is impossible to make Peazip QT working on Kubuntu but the GTK version is working (not perfectly of course).
Can it be kubuntu?
Comment 3 ultrajej 2011-09-19 14:02:16 UTC
I was able to workaround my issue.

1) I will use 1.90.

2) As root "sudo digikam" produced for me the database files that I deleted before.
I saved them in some location.
digikam4.db
thumbnails-digikam.db
I made a copy of those to my /home/image folder after having changed privileges on it.

3) Using the info from the Bug 281767
https://bugs.kde.org/show_bug.cgi?id=281767

Edit ~/.kde/share/config/digikamrc, the section [Database Settings]
should contain only the following:
[Database Settings]
Database Connectoptions=
Database Hostname=
Database Name=/a/path/to/dir
Database Name Thumbnails=/a/path/to/dir
Database Password=
Database Port=0
Database Type=QSQLITE
Database Username=
Internal Database Server=false

no Image* or Thumbnails*, if these are present remove them
also check that values in there are correct.
Of course /a/path/to/dir was replaced by my /home/image directory

4) Restarted Digikam and voila! It is working back.




NB: The next release will wait until I will install another distribution.
Unfortunately I tried to compile unsuccessfully the latest release (digikam-2.1.1.tar.bz2). 
Having that error
---------------
First try at finding OpenCV...
CMake Warning at extra/libkface/CMakeLists.txt:58 (FIND_PACKAGE):
  Could not find module FindOpenCV.cmake or a configuration file for package
  OpenCV.
---------------