Bug 413488 - Albums/Database inconsistencies digiKam
Summary: Albums/Database inconsistencies digiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Albums (show other bugs)
Version: 6.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-26 19:42 UTC by chasa.imago
Modified: 2019-10-27 16:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chasa.imago 2019-10-26 19:42:55 UTC
SUMMARY

Cleaned up some test albums. Deleted all images from test directory from within digiKam
Then I was unable to delete the created album under 'Album'. The option 'Delete' is greyed out.
They I choose Tools/Maintenance to 'perform database cleaning'.
And a few seconds later digiKam crashed.

version: digiKam-6.4.0-git-20191024T225458-Win64.exe


OBSERVED RESULT
Crash


EXPECTED RESULT
not crash

SOFTWARE/OS VERSIONS

digiKam-6.4.0-git-20191024T225458-Win64.exe
Win 10 pro 64bit
Microsoft Windows [Version 10.0.18362.418]

ADDITIONAL INFORMATION

Now when I start digiKam I'm unable to create a fresh album. I get an error message saying its directory doesn't exist anymore.
Only after recreating it myself, it works again.

I've searched in digikamrc for the Album location, but couldn't find it. Probably it is stored in the database? But Tools/Database management does NOT fix this problem.
And afterwards, if you manually recreate a 'New Album', there are 2 x 'New Album' entries under 'Album'. And when you delete one of them, the actual 'New Album' directory gets deleted from the file system, but in digiKam you can still see another 'New Album' entry (database issue?). You can only get rid of this when manually recreating a 'New Album' directory in the file system and then deleting it again from digiKam (not the other way around). So there is no x-reference check on database entry for physical (file system) locations and entries of virtual albums in digiKam.
This should either correctable with maintenance tools and/or repaired with e.g. database tools.
Because the right mouse-options-entries on a created sub-Album in digiKam do not work as expected.

Fault bucket 1849065716265782745, type 4
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: digikam.exe
P2: 0.0.0.0
P3: 5db20d54
P4: libdigikamgui.dll
P5: 0.0.0.0
P6: 5db20d35
P7: c0000005
P8: 00000000001ecdf8
P9: 
P10: 

Faulting application name: digikam.exe, version: 0.0.0.0, time stamp: 0x5db20d54
Faulting module name: libdigikamgui.dll, version: 0.0.0.0, time stamp: 0x5db20d35
Exception code: 0xc0000005
Fault offset: 0x00000000001ecdf8
Faulting process id: 0x223c
Faulting application start time: 0x01d58c2ed3f33eb6
Faulting application path: C:\Program Files\digiKam\digikam.exe
Faulting module path: C:\Program Files\digiKam\libdigikamgui.dll
Report Id: e8db273c-c85c-4bba-b25e-ec33018ed269
Faulting package full name: 
Faulting package-relative application ID:
Comment 1 Maik Qualmann 2019-10-26 19:56:05 UTC
Delete Album is only grayed out if you have selected a virtual album. You can not delete virtual albums. in the physical Album view, "Delete Album" is never greyed out. Please take a screenshot. Download DebugView from Microsoft and post the messages.

Maik
Comment 2 Maik Qualmann 2019-10-26 20:05:06 UTC
The "root" album of a collection can not be deleted.

Maik
Comment 3 Maik Qualmann 2019-10-27 08:38:41 UTC
Git commit 7c8855f2a0c845424be1a41c9ed327b151e6e1aa by Maik Qualmann.
Committed on 27/10/2019 at 08:38.
Pushed by mqualmann into branch 'master'.

correct menu actions enabled state with non physical albums

M  +18   -16   core/app/main/digikamapp.cpp

https://invent.kde.org/kde/digikam/commit/7c8855f2a0c845424be1a41c9ed327b151e6e1aa
Comment 4 Maik Qualmann 2019-10-27 10:35:50 UTC
Git commit b71beb01df20d58223488814a148fa4f15dde415 by Maik Qualmann.
Committed on 27/10/2019 at 10:35.
Pushed by mqualmann into branch 'master'.

fix possible crash in QList in the clean up database task

M  +2    -5    core/utilities/maintenance/databasetask.cpp
M  +6    -5    core/utilities/maintenance/dbcleaner.cpp

https://invent.kde.org/kde/digikam/commit/b71beb01df20d58223488814a148fa4f15dde415
Comment 5 Maik Qualmann 2019-10-27 10:42:51 UTC
Again for agreement:
You can not delete the root albums under "Album". This is the selected folder or changed name from the collection setup. You can only remove the collection in digiKam Setup. Everything under the root album can be created or deleted. I close the bug, if necessary reopen again.

Maik
Comment 6 chasa.imago 2019-10-27 16:18:58 UTC
(In reply to Maik Qualmann from comment #2)
> The "root" album of a collection can not be deleted.
> 
> Maik

Yes, I know, but I also got the message when trying to delete an album I've created myself, under 'Album'. I don't get any error message and/or confirmation that this action succeeded and/or failed (?)
That's what I was (amongst others) trying to explain. :-)