Bug 435188

Summary: Face tag icons not automatically generated, lots of QPixmap::scaled: Pixmap is a null pixmap errors on console
Product: [Applications] digikam Reporter: gessel <gessel>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 7.2.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 7.3.0
Sentry Crash Report:

Description gessel 2021-03-31 14:48:05 UTC
SUMMARY



STEPS TO REPRODUCE
1. Tag faces
2. Hope to see a pretty face tag icon to "make the face workflow more visual" 😊
 

OBSERVED RESULT

Workflow not more visual. 😢

long strings of errors thrown to console like:

QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap

I can't find anything related to this error for digikam and the places where people have noted it were related to KDE plasma icons generally.  Qpixmap is used in so, so many places in the code it is hard for someone as unfamiliar as myself to narrow it down much.

EXPECTED RESULT

Pleasingly visual workflow. :-)
no errors thrown.

Mostly likely a stupid user configuration error; any clue appreciated.

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: 20.04.2 LTS (Focal Fossa) 5.8.0-48-generic 
(available in About System)
KDE Plasma Version: plasmashell 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

mariadb  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2


ADDITIONAL INFORMATION
digikam version 7.2.0
CPU cores: 8
Eigen: 3.3.7
Exiv2: 0.27.3
Exiv2 supports Base Media: No
Exiv2 supports XMP metadata: Yes
HEIF encoding support: Yes
ImageMagick codecs: 6.9.10
KF5: 5.68.0
LensFun: 0.3.2-0
LibCImg: 130
LibJPEG: 80
LibJasper: 2.0.27
LibLCMS: 2090
LibLqr support: Yes
LibPGF: 7.19.03
LibPNG: 1.6.37
LibRaw: 0.21.0
LibTIFF: 4.1.0
Marble: 0.27.20
Parallelized demosaicing: Yes
Qt: 5.12.8
Qt WebEngine support: Yes
Rajce support: Yes
VKontakte support: No
AkonadiContact support: No
Baloo support: Yes
Calendar support: Yes
DBus support: Yes
Database backend: QMYSQL
Database internal server: No
HTML Gallery support: Yes
LibAVCodec: 58.91.100
LibAVFormat: 58.45.100
LibAVUtil: 56.51.100
LibGphoto2: 2.5.25
LibOpenCV: 4.2.0
LibQtAV: 1.13.0
Media player support: Yes
Panorama support: Yes
Comment 1 Maik Qualmann 2021-03-31 15:24:31 UTC
Maybe it would be good if you could fix your database problem first. I am sure that both problems are related. Post the debug log from the console, with the debug variable enabled, as described here:

https://www.digikam.org/contribute/

Maik
Comment 2 gessel 2021-03-31 18:12:04 UTC
Adding the ''@'%' user to the database fixed the database problem - which strongly implies it isn't a database configuration issue since the error thrown to the console after setting 

 export QT_LOGGING_RULES="digikam*=true"

and then launching from the console

 digikam

yielded the error messages posted in bug  #435179 from digikam.  I apologize if it wasn't clear that I'd already set the error flag.  I can tee the error log to a file and attach it, the Qpixmap errors tend to almost instantly blow past the console buffer.

I'm about 91% complete rebuilding the thumbnails database, once that completes, I'll disable face detection and see if the QPixmap errors go away, which would seem likely to validate whether it is purely a face detection issue or some other module.
Comment 3 Maik Qualmann 2021-03-31 20:10:45 UTC
Why don't you post the log so we can get an overview of what's going wrong with you? If you don't want to make it public, send it to my email address.

Many users tested MySQL and digiKam-7.2.0 during the beta phase and had no problems like you did. I use MariaDB during development and have also tested it on Windows with Oracle MySQL. Smaller reported problems were fixed during the beta phase in conjunction with older MariaDB or MySQL servers. All without problems with a normal database and user configuration.

Maik
Comment 4 gessel 2021-03-31 20:49:29 UTC
I'll disable the anon account and generate a file showing that fail.  I just captured one without and got 4,609 instances of "QPixmap::scaled: Pixmap is a null pixmap" so it will be at least easy to see.

Thanks!
Comment 5 Maik Qualmann 2021-04-02 20:59:39 UTC
I have only now found the log in my spam folder. Setting the debug rules only to digikam* would have been better. Could it be that you haven't installed the Breeze Icon Theme?

Maik
Comment 6 gessel 2021-04-02 22:59:03 UTC
Thanks Malik,

I seem to:

breeze-icon-theme is already the newest version (4:5.68.0-0ubuntu1).

Also, it seems the database rebuild was successful - though I can't test quite yet until I get far enough along rebuilding the database that I can find a face I actually remember and haven't yet tagged.  

It is early to reach a conclusion but it seems "QPixmap::scaled: Pixmap is a null pixmap" is a different issue.  It isn't at all clear that the error has anything to do with creating "visual workflow" icons for face tags (still haven't seen those).

-David
Comment 7 gessel 2021-04-03 12:09:05 UTC
Assigning face icons to face tags manually works fine, the automatic function still doesn't seem to happen, but my expectations may be wrong.

I'm still getting a lot of QPixmap errors but there doesn't seem to be any problem with digiKam.  

digikam.database: " ( ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) ) "
digikam.database: Search query:
 "SELECT DISTINCT Images.id, Images.name, Images.album,        Albums.albumRoot,        ImageInformation.rating, Images.category,        ImageInformation.format, ImageInformation.creationDate,        Images.modificationDate, Images.fileSize,        ImageInformation.width,  ImageInformation.height,        ImageTagProperties.value, ImageTagProperties.property, ImageTagProperties.tagid  FROM Images        INNER JOIN ImageTagProperties ON ImageTagProperties.imageid=Images.id        LEFT JOIN ImageInformation ON Images.id=ImageInformation.imageid        INNER JOIN Albums           ON Albums.id=Images.album WHERE Images.status=1 AND (  ( ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND ImageTagProperties.property=?  ) )  );" 
 (QVariant(int, 835), QVariant(int, 835), QVariant(QString, "autodetectedPerson"), QVariant(int, 835), QVariant(int, 835), QVariant(QString, "autodetectedFace"), QVariant(int, 835), QVariant(int, 835), QVariant(QString, "ignoredFace"), QVariant(int, 835), QVariant(int, 835), QVariant(QString, "tagRegion"))
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
digikam.geoiface: ----
digikam.database: Search result: 23
digikam.general: Cancel Main Thread
digikam.general: One job is done
digikam.general: Cancel Main Thread
digikam.general: One job is done
digikam.general: Cancel Main Thread
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
Comment 8 caulier.gilles 2021-04-03 12:26:37 UTC
QPixmap is used to show something is GUI. It will never be used to store thumbnails in database, as we use QImage object instead, which do not depend of video screen.

I suspect something about to show a preview in progress bar. I implemented this feature in the past, but for performance reason i dropped this code. Perhaps it still something active in source code which give a warning from Qt library but not introduce a side effect.

Gilles Caulier
Comment 9 gessel 2021-04-03 14:17:57 UTC
I think it is "ignore" then - at least until there's an update which might have different behavior, then I'm happy to check and see if it is resolved for me.
Comment 10 Maik Qualmann 2021-04-03 19:10:12 UTC
We hardly have any QPixmap::scaled calls in digiKam. I looked at all of them again. Actually only the tag icons come into question. So it would have to be Breeze Icons that don't exist. You see a smile icon ((:-)) for face tags in the tree?

I cannot say for sure that the smiley icon already exists in Breeze-5.68.

Maik
Comment 11 gessel 2021-04-03 21:54:51 UTC
I don't see a smile icon, but I'm not sure where to look.  Happy to attach some screen shots if that would help.

Looking at Synaptic, I have installed:
Breeze                  4:5.18.4.1-0ubuntu1
breeze-cursor-theme     4:5.18.4.1-0ubuntu1
breeze-gtk-theme        5.18.4.1-0ubuntu1
breeze-icon-theme       4:5.68.0-0ubuntu1

I do not have installed
breeze-dev
breeze-icon-theme-rcc

I'll install the latter and see if that helps.
Comment 12 Maik Qualmann 2021-04-04 08:22:52 UTC
Git commit 54e075d5ef6de6b08ca6e9404b1d9aff7dbdc512 by Maik Qualmann.
Committed on 04/04/2021 at 08:22.
Pushed by mqualmann into branch 'master'.

replace missing Breeze icons with a fallback icon
FIXED-IN: 7.3.0

M  +2    -3    NEWS
M  +6    -3    core/libs/album/engine/albumthumbnailloader.cpp

https://invent.kde.org/graphics/digikam/commit/54e075d5ef6de6b08ca6e9404b1d9aff7dbdc512
Comment 13 gessel 2021-04-04 10:48:02 UTC
Cool - I'll recompile when 7.3 releases. 

breeze-icon-theme-rcc didn't solve it - but it does not seem to cause any functional issues.