[Okular-devel] [Bug 230282] Crash (reproducible) in PagePainter::scalePixmapOnImage()

Sami Liedes sliedes at cc.hut.fi
Fri Mar 12 01:41:17 CET 2010


https://bugs.kde.org/show_bug.cgi?id=230282





--- Comment #9 from Sami Liedes <sliedes cc hut fi>  2010-03-12 01:41:13 ---
Per IRC discussion before you ping timeouted, the problem is the
canReturnNull=true argument to KIconLoader::loadIcon() in
GuiUtils::loadStamp().

However this fix is not enough:

184 pixmap = il->loadIcon( name, KIconLoader::User, minSize,
KIconLoader::DefaultState, QStringList(), &path, true );
185 if ( path.isEmpty() || pixmap.isNull() )
186     pixmap = il->loadIcon( name, KIconLoader::NoGroup, minSize );
187 return pixmap;

apparently because the loadIcon call in 186 can't find an unknown icon for size
1660.

I use the oxygen theme. Oxygen (and indeed all other themes I have installed
besides crystalsvg) only seems to have mimetype/unknown.png icons with preset
sizes (and no svgs):

$ find /usr/share/icons/ -name unknown\*
[...]
/usr/share/icons/oxygen/32x32/mimetypes/unknown.png                     
/usr/share/icons/oxygen/128x128/mimetypes/unknown.png                   
/usr/share/icons/oxygen/22x22/mimetypes/unknown.png                     
/usr/share/icons/oxygen/256x256/mimetypes/unknown.png
/usr/share/icons/oxygen/16x16/mimetypes/unknown.png
/usr/share/icons/oxygen/16x16/apps/unknownapp.png
/usr/share/icons/oxygen/64x64/mimetypes/unknown.png
/usr/share/icons/oxygen/48x48/mimetypes/unknown.png

I don't know enough to tell if loadIcon() should scale the 256x256 icon to size
1660, in any case it fails to find an icon (it outputs "Warning: could not find
\"Unknown\" icon for size = 1660" into kDebug(264)) and returns a null QPixmap,
even with canReturnNull=false, which okular cannot handle
(kiconloader.cpp:1137).

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Okular-devel mailing list