Bug 337443 - SETUP : digikam hangs when opening the preferences window on the collection page using MySQL database
Summary: SETUP : digikam hangs when opening the preferences window on the collection p...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Setup-Database (show other bugs)
Version: 4.11.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-14 15:40 UTC by Mathias Homann
Modified: 2020-08-26 03:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Homann 2014-07-14 15:40:49 UTC
I can't add a collection to digikam, it freezes up when i try to open the preferences window.

The prefs window shows up, is responsive for a few seconds, then the whole app freezes solid.

Reproducible: Always

Steps to Reproduce:
1. start digikam
2. open the preferences window
3. wait a few seconds
Actual Results:  
The app freezes, no changes on the settings can be made, even though the app windows are not "dead", they redraw properly when you move them around or bring them to the background and back.

Expected Results:  
"The app should be usable".

strace shows this when attaching it to the "dead" app:

brk(0xb32a000)                          = 0xb32a000
brk(0xb34b000)                          = 0xb34b000
brk(0xb36c000)                          = 0xb36c000
brk(0xb38d000)                          = 0xb38d000
brk(0xb3ae000)                          = 0xb3ae000
brk(0xb3cf000)                          = 0xb3cf000
brk(0xb3f0000)                          = 0xb3f0000
brk(0xb411000)                          = 0xb411000
brk(0xb432000)                          = 0xb432000
brk(0xb453000)                          = 0xb453000
brk(0xb474000)                          = 0xb474000
brk(0xb495000)                          = 0xb495000
brk(0xb4b6000)                          = 0xb4b6000
brk(0xb4d7000)                          = 0xb4d7000
brk(0xb4f8000)                          = 0xb4f8000
brk(0xb519000)                          = 0xb519000
brk(0xb53a000)                          = 0xb53a000
brk(0xb55b000)                          = 0xb55b000
brk(0xb57c000)                          = 0xb57c000
brk(0xb59d000)                          = 0xb59d000
brk(0xb5be000)                          = 0xb5be000
brk(0xb5df000)                          = 0xb5df000
brk(0xb600000)                          = 0xb600000
brk(0xb621000)                          = 0xb621000
brk(0xb642000)                          = 0xb642000
brk(0xb663000)                          = 0xb663000
brk(0xb684000)                          = 0xb684000
brk(0xb6a5000)                          = 0xb6a5000
brk(0xb6c6000)                          = 0xb6c6000
brk(0xb6e7000)                          = 0xb6e7000
brk(0xb708000)                          = 0xb708000
brk(0xb729000)                          = 0xb729000
brk(0xb74a000)                          = 0xb74a000
brk(0xb76b000)                          = 0xb76b000
Comment 1 caulier.gilles 2014-07-14 15:55:08 UTC
This report is not suitable. Please run digiKam into GDB as explained here :

https://www.digikam.org/contrib

Gilles Caulier
Comment 2 Christian 2014-07-23 05:42:37 UTC
(In reply to Mathias Homann from comment #0)
> I can't add a collection to digikam, it freezes up when i try to open the
> preferences window.

I suffer from the same symptom using OpenSuse 13.1 with digikam build 14.1.0-1.11. Sometimes I can open further dialogs if I act quickly, but there is no way to select the folder I want to use. Seems to be a broken build - hangs in Qt calls. Same problem in all other dialogs of the digikam settings.

I solved this by using an older kde settings file with collection information included. But whenever I enter the settings digikam slows down and freezes apr. 30 seconds later.

In the generated db the settings table is filled with some "prealpha" settings ... all other tables are empty.

I remember  there where similar problems with 3.x versions - but I was able to finish setup many attempts and by hacking the settings-file. After that I reused the settings on all workstations where digikam is installed. Unfortunately I have to do a clean install for 4.1.0 now.

Questions that might help me with a similar bug:
- what is the source of your digikam package (Status beta?) 
- do you use mysql or mariadb ?
- what distro ?
- nvidia native driver?
- large filesystems (> 1 TB) with many folders?
- do you use high resolution mode (> 1920x1080) or multiple monitors?
Comment 3 Pierre Choffet 2014-11-06 01:41:57 UTC
This bug should be reopened because still present in Digikam 4.4. I currently can 100% reproduce it on two computers using ArchLinux packages.

When opening any tab from preferences dialog, after a few seconds CPU usage increases to 100%. The application GUI then stops responding to user inputs and has to be killed.
Comment 4 caulier.gilles 2015-06-24 16:16:54 UTC
New digiKam 4.11.0 is available :

https://www.digikam.org/node/740

Can you reproduce the problem with this release ?

Gilles Caulier
Comment 5 Pierre Choffet 2015-06-24 18:02:54 UTC
Absolutely, I currently can reproduce this bug on two computers running Digikam 4.11 as provided in ArchLinux packages.
Comment 6 caulier.gilles 2015-06-24 18:45:48 UTC
from a console, run kdebugdialog and turn on digiKAm debug space. After, run digiKam from the console and report debug statement printed.

Look here for details :

https://www.digikam.org/contrib

Gilles Caulier
Comment 7 Pierre Choffet 2015-06-24 21:09:24 UTC
Here is the kdebug log after the Preferences window is opened.
QLayout: Cannot add null widget to QVBoxLayout/
digikam(16089)/digikam (core) Digikam::DImg::load: "/usr/share/apps/digikam/data/sample-aix.png"  : PNG file identified
digikam(16089)/digikam (core) Digikam::DMetadata::getImageHistory: Loading image history  ""
digikam(16089)/KEXIV2 KExiv2Iface::KExiv2::getImageDateTime: DateTime => Exif.Photo.DateTimeOriginal =>  QDateTime("mar. juil. 27 06:40:05 2010")
libpng warning: iCCP: known incorrect sRGB profile
digikam(16089)/digikam (core) Digikam::AlbumFilterModel::setSearchTextSettings: new search text settings:  "" : hasResult =  true , validRows =  16

→At this point the UI is frozen. The log continues after:

digikam(16089)/digikam (core) Digikam::CollectionManager::updateLocations: location for  "/mnt/Digikam"  is available  true
"/org/freedesktop/UDisks2/block_devices/sdc1" lost interfaces: ("org.freedesktop.UDisks2.Partition", "org.freedesktop.UDisks2.Filesystem", "org.freedesktop.UDisks2.Block") 
digikam(16089)/digikam (core) Digikam::CollectionManager::updateLocations: location for  "/mnt/Digikam"  is available  true
"/org/freedesktop/UDisks2/block_devices/sdc" lost interfaces: ("org.freedesktop.UDisks2.PartitionTable", "org.freedesktop.UDisks2.Block") 
"/org/freedesktop/UDisks2/drives/WDC_WD10_JPVX_75JC3T0_0000000000006121" lost interfaces: ("org.freedesktop.UDisks2.Drive") 
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16134 ( "digikamtags://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16136 ( "digikamalbums://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16135 ( "digikamdates://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16079 ( "file://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16143 ( "file://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16144 ( "file://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16080 ( "file://" )
digikam(16089)/kio (Slave) KIO::Slave::kill: killing slave pid 16066 ( "file://" )
… nothing very exciting here.

I ran some additional tests, and it seems it's closely tied to the network collections and/or MySQL database: if I deactivate, it seems the Preferences dialog is working as expected. Also Christian (in comment #2) suggests he uses external database too.
Comment 8 caulier.gilles 2015-11-20 15:15:42 UTC
Git commit 4a5e7cef1f15d62701a6fa7c1366f3303a687616 by Gilles Caulier.
Committed on 20/11/2015 at 14:54.
Pushed by cgilles into branch 'master'.

New database setup config widget with more details about Mysql initial configuration and more help to tune settings.
The MySQl Internal is now handle as a main database type config.
Screenshots :

https://www.flickr.com/photos/digikam/23121578776
https://www.flickr.com/photos/digikam/23147681465
https://www.flickr.com/photos/digikam/22851871180
Related: bug 233762, bug 262321, bug 342124

FIXED-IN: 5.0.0

M  +2    -2    CMakeLists.txt
M  +4    -2    app/main/digikamapp.cpp
M  +7    -7    libs/album/albummanager.cpp
M  +3    -3    libs/database/coredb/coredbschemaupdater.cpp
M  +1    -1    libs/database/engine/dbenginebackend.cpp
M  +1    -1    libs/database/engine/dbengineguierrorhandler.cpp
M  +32   -32   libs/database/engine/dbengineparameters.cpp
M  +7    -7    libs/database/engine/dbengineparameters.h
M  +239  -134  libs/database/utils/dbsettingswidget.cpp
M  +22   -10   libs/database/utils/dbsettingswidget.h
M  +2    -2    libs/settings/applicationsettings.h
M  +6    -6    libs/settings/applicationsettings_database.cpp
M  +1    -1    tests/database/testdatabase.cpp
M  +14   -18   utilities/setup/setupdatabase.cpp

http://commits.kde.org/digikam/4a5e7cef1f15d62701a6fa7c1366f3303a687616
Comment 9 kde-bugs 2015-12-21 21:57:52 UTC
I don't know if what I have is the same or if I should file a new bug. Digikam hangs for me every time I open the settings window. I am using a MySQL database. It does not matter which pane is open, as soon as I open the settings window, digikam is slowly (within 4-5 seconds) using more and more CPU until it hits 100% CPU usage (only one CPU is at 100%). Then it becomes harder to close the settings window. Within about 10 seconds it's still possible, but slow, but after that, it's too unresponsive.

digiKam Version 4.14.0 Using KDE Development Platform 4.14.15

Digikam debug log only says:
----
digikam(2767)/digikam (core) Digikam::DImg::load: "/usr/share/apps/digikam/data/sample-aix.png"  : PNG file identified
digikam(2767)/digikam (core) Digikam::DMetadata::getImageHistory: Loading image history  ""
digikam(2767)/KEXIV2 KExiv2Iface::KExiv2::getImageDateTime: DateTime => Exif.Photo.DateTimeOriginal =>  QDateTime("Tue Jul 27 06:40:05 2010")
libpng warning: iCCP: known incorrect sRGB profile
digikam(2767)/digikam (core) Digikam::AlbumFilterModel::setSearchTextSettings: new search text settings:  "" : hasResult =  true , validRows =  21
----
(at this point the settings dialog is open and starts to use CPU)
----
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
digikam(2767) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
----
(these last lines only come when I manage to close the settings dialog).