Bug 426208

Summary: Thumbnails constantly refreshing on Mac version
Product: [Applications] digikam Reporter: graeme.rubble
Component: Thumbs-IconViewAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, lauviss, metzpinguin
Priority: NOR    
Version: 7.1.0   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In: 7.2.0
Sentry Crash Report:

Description graeme.rubble 2020-09-05 10:41:22 UTC
SUMMARY
Thumbnails constantly refreshing on-screen. Some do not even appear (i.e. blank tiles). Preview mode is fine, but each time I switch back to Thumbnails view the whole screen is alive with constant refreshing.

STEPS TO REPRODUCE
1. Load digikam and select Thumbnails view
2. 
3. 

OBSERVED RESULT
Thumbnails constantly refreshing/flickering, with some not even appearing.

EXPECTED RESULT
Static display of all images as thumbnails.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 10.15.6
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.73.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Hardware is 2017 27" Retina 5K iMac with Radeon Pro 580 8GB graphics. Has been happening on all versions of digikam I have used since I discoverering the app just over a year ago.
Collections location /Users/graeme/Pictures/Photos
Database SQLite /Users/graeme/Pictures/digikam/
Comment 1 Maik Qualmann 2020-09-05 17:38:48 UTC
We have the same problem with bug 373839. There are unnecessary events via Qt that cause the thumbnails to be redrawn. Normally the thumbnails should only be preloaded when scrolling the view. Here under KF5 and X-Server there are no events in the idle phase.

Maik
Comment 2 lauviss 2020-09-15 21:23:38 UTC
(In reply to Maik Qualmann from comment #1)
> We have the same problem with bug 373839.

What does it mean? It is a Qt problem?

I have exact the same problem, with an identical system (iMac, ...). It makes me crazy to see the flickering of the thumbnails.

Is there a chance that this will be solved? Is it a general Qt problem on macOS?

Thanks in advance,
lauviss
Comment 3 Maik Qualmann 2020-09-16 07:53:58 UTC
I will temporarily disable the preloading. We'll see if the problem is resolved when Gilles creates a new bundle for MacOS. We could do without preloading the thumbnails, the positive effect is only beneficial when the view is scrolled very quickly.

Maik
Comment 4 caulier.gilles 2020-09-16 08:59:29 UTC
I will rebuild the MacOS PKG 7.2.0-beta1 this evening.

Gilles
Comment 5 Maik Qualmann 2020-09-16 11:01:28 UTC
Git commit 143329aa3cfed6e75871ef624848b9a2e25da180 by Maik Qualmann.
Committed on 16/09/2020 at 11:00.
Pushed by mqualmann into branch 'master'.

disable for a test the thumbnail preloading

M  +2    -1    core/app/items/views/itemcategorizedview.cpp

https://invent.kde.org/graphics/digikam/commit/143329aa3cfed6e75871ef624848b9a2e25da180
Comment 6 lauviss 2020-09-16 13:23:22 UTC
(In reply to Maik Qualmann from comment #3)
> I will temporarily disable the preloading. We'll see if the problem is
> resolved when Gilles creates a new bundle for MacOS. 

Thumb up!
Comment 7 caulier.gilles 2020-09-16 20:09:19 UTC
digiKAm 7.2.0-beta1 MacOS package is now updated with last changes from Maik and available for testing here :

https://files.kde.org/digikam/

Gilles Caulier
Comment 8 graeme.rubble 2020-09-16 21:03:35 UTC
Thanks Maik/Gilles - my initial testing suggests this has resolved the issue! 

I am now able to browse through folders of images in full-screen thumbnail mode without any flickering/refreshing. All thumbnails are loading (no blanks) with no obvious performance issues.

This is great news - thank you so much!
Comment 9 Maik Qualmann 2020-09-17 15:15:10 UTC
Ok, thanks for the feedback, we'll leave it that way for now. If there is no negative feedback, we will clean up the code a bit. In fact, the paint event did not preload the thumbnails, but actually triggered the main thumbnail loading function. My guess is that older Qt versions needed this to redraw the thumbnails when move overlaid windows.

Maik
Comment 10 Maik Qualmann 2020-11-08 06:40:18 UTC
Git commit ea71d3e0a2f1e527300d729bed8dc3f47fc819d7 by Maik Qualmann.
Committed on 08/11/2020 at 06:39.
Pushed by mqualmann into branch 'master'.

remove dead code to update thumbnails when a paint event occurs
Related: bug 373839
FIXED-IN: 7.2.0

M  +5    -3    NEWS
M  +0    -5    core/app/items/delegate/itemdelegate.cpp
M  +0    -5    core/app/items/delegate/itemdelegate.h
M  +1    -6    core/app/items/delegate/itemfacedelegate.cpp
M  +0    -2    core/app/items/delegate/itemfacedelegate.h
M  +0    -15   core/app/items/views/itemcategorizedview.cpp
M  +0    -1    core/app/items/views/itemcategorizedview.h
M  +0    -5    core/libs/models/itemalbumfiltermodel.cpp
M  +0    -3    core/libs/models/itemalbumfiltermodel.h
M  +0    -5    core/showfoto/thumbbar/showfotodelegate.h

https://invent.kde.org/graphics/digikam/commit/ea71d3e0a2f1e527300d729bed8dc3f47fc819d7