[Digikam-devel] Weird image rating returned by IO slave?

Andrew Coles andrew.i.coles at googlemail.com
Thu Jan 27 13:37:57 GMT 2011


Hi all,

(I was in two minds whether to put this through bugs.kde.org given it's a
little obscure.)

Yesterday evening, digiKam 2 from the SVN started hanging for two minutes
when switching to the People tags section at the left.  It turns out that:

ImagePropertiesTab::setRating(int rating)

...is being called with rating=4390960.  So, it was concatenating 4390960
star characters, and passing this to d->labelRating->setText(), which gave
Qt the two-minute job of working out how to render that.

This rating came from an ImageInfo object that was created from an
ImageListerRecord that was created in:

ImageAlbumModel::slotData(KIO::Job*, const QByteArray& data)

...from the data it was given.  I've checked the database, and there are no
ratings greater than 5, and the imageId associated with that rating is bogus
too.

At this point, I took a look at where the data was coming from - the IO
slaves - and got a bit stuck, hence coming to the mailing list.  Any
suggestion as to what might be happening?

As a temporary work-around, I patched my copy of setRating to set the label
to ' e r r o r ' if the rating was greater than 5.  I haven't seen this on
screen once yet, though if I put a breakpoint at this line it's definitely
being used.  Does a similar patch need committing to the SVN? (maybe not
setting a label at all if it's junk?)

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20110127/e75cced8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagepropertiestab.cpp.patch
Type: text/x-diff
Size: 464 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20110127/e75cced8/attachment.patch>


More information about the Digikam-devel mailing list