Bug 375952 - Gwenview crashes when opening PNG image in folder containing APNG images.
Summary: Gwenview crashes when opening PNG image in folder containing APNG images.
Status: RESOLVED WORKSFORME
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 16.12.0
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 13:35 UTC by Matthias Fauconneau
Modified: 2022-10-22 05:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (5.83 KB, text/plain)
2017-02-06 10:07 UTC, Matthias Fauconneau
Details
attachment-32462-0.html (1.61 KB, text/html)
2017-02-06 12:49 UTC, Matthias Fauconneau
Details
attachment-303-0.html (2.68 KB, text/html)
2017-02-06 12:59 UTC, Matthias Fauconneau
Details
attachment-6366-0.html (1.90 KB, text/html)
2017-12-10 22:51 UTC, Matthias Fauconneau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fauconneau 2017-02-03 13:35:49 UTC
The APNG previews/opens fine in Dolphin/Gwenview.
Opening a (normal) PNG file in the same folder crashes.

libpng error: PNG unsigned integer out of range
QImageReader::read() using format hint "apng" failed: "Unknown error"
A bad Qt image decoder moved the buffer to 74 in a call to canRead()! Rewinding.
Image format is actually "png" not "apng"
Comment 1 Christoph Feck 2017-02-06 03:56:11 UTC
Please add the backtrace of the crash. For more information, please read https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Comment 2 Matthias Fauconneau 2017-02-06 10:07:36 UTC
Created attachment 103860 [details]
Backtrace

Exiv2::PngImage::readMetadata
Comment 3 Christoph Feck 2017-02-06 11:39:17 UTC
The crash is in libexiv2.so.14

If you know the image that it fails with, please report this issue directly to libexiv2 developers via http://dev.exiv2.org/projects/exiv2/issues
Comment 4 Matthias Fauconneau 2017-02-06 12:49:46 UTC
Created attachment 103863 [details]
attachment-32462-0.html

As a workaround, I disabled PNG support in exiv2.
I wonder why when I open an image, Gwenview tries to load metadata of
another one though.

On Mon, Feb 6, 2017 at 12:39 PM, Christoph Feck <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=375952
>
> Christoph Feck <cfeck@kde.org> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>              Status|NEEDSINFO                   |RESOLVED
>          Resolution|BACKTRACE                   |UPSTREAM
>
> --- Comment #3 from Christoph Feck <cfeck@kde.org> ---
> The crash is in libexiv2.so.14
>
> If you know the image that it fails with, please report this issue
> directly to
> libexiv2 developers via http://dev.exiv2.org/projects/exiv2/issues
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 5 Matthias Fauconneau 2017-02-06 12:59:17 UTC
Created attachment 103864 [details]
attachment-303-0.html

Just noticed, this doesnt look like a segfault but an unhandled exception.
It is valid for Exiv2 to abort if it doesnt support APNGs.
So it would seem issues are also Gwenview calling Exiv2 on APNGs and not
catching the exception (in Exiv2ImageLoader::load or
LoadingDocumentImplPrivate::loadMetaInfo), maybe there is a catch further
up the (semantic) call chain, but it cannot be unwinded because of the
intervening QtConcurrent threading ?

On Mon, Feb 6, 2017 at 1:49 PM, Matthias Fauconneau <
matthias.fauconneau@gmail.com> wrote:

> As a workaround, I disabled PNG support in exiv2.
> I wonder why when I open an image, Gwenview tries to load metadata of
> another one though.
>
> On Mon, Feb 6, 2017 at 12:39 PM, Christoph Feck <bugzilla_noreply@kde.org>
> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=375952
>>
>> Christoph Feck <cfeck@kde.org> changed:
>>
>>            What    |Removed                     |Added
>> ------------------------------------------------------------
>> ----------------
>>              Status|NEEDSINFO                   |RESOLVED
>>          Resolution|BACKTRACE                   |UPSTREAM
>>
>> --- Comment #3 from Christoph Feck <cfeck@kde.org> ---
>> The crash is in libexiv2.so.14
>>
>> If you know the image that it fails with, please report this issue
>> directly to
>> libexiv2 developers via http://dev.exiv2.org/projects/exiv2/issues
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>>
>
>
Comment 6 Christoph Feck 2017-02-06 23:35:47 UTC
Okey, maybe someone familar with the Exiv handling in Gwenview can check if it is possible to handle the exceptions that libexiv2 raises. Reopening.
Comment 7 null 2017-12-10 20:35:43 UTC
Matthias: By any chance, could you attach a zip with the minimal needed images / directory structure to crash Gwenview? I can't really reproduce here with both exiv2 version 0.25 and 0.26 and some random APNGs (but they don't contain exiv metadata apparently, either).

Also I noticed the APNGs weren't animated for me at all in Gwenview (in Firefox they were fine), are they for you?
Comment 8 Matthias Fauconneau 2017-12-10 22:51:47 UTC
Created attachment 109304 [details]
attachment-6366-0.html

I don't have those files anymore.
I was opening PNGs. Gwenview crashed scanning for exiv metadata in APNGs in
the same folder. Those files didn't have metadata, exiv was throwing an
uncatched exception as it doesn't support APNG. IIRC.

On Sun, Dec 10, 2017, 21:35 Henrik Fehlauer <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=375952
>
> Henrik Fehlauer <rkflx@lab12.net> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|---                         |WAITINGFORINFO
>                  CC|                            |rkflx@lab12.net
>              Status|UNCONFIRMED                 |NEEDSINFO
>
> --- Comment #7 from Henrik Fehlauer <rkflx@lab12.net> ---
> Matthias: By any chance, could you attach a zip with the minimal needed
> images
> / directory structure to crash Gwenview? I can't really reproduce here with
> both exiv2 version 0.25 and 0.26 and some random APNGs (but they don't
> contain
> exiv metadata apparently, either).
>
> Also I noticed the APNGs weren't animated for me at all in Gwenview (in
> Firefox
> they were fine), are they for you?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 9 null 2017-12-10 22:59:50 UTC
Well, I tested with https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png, which works fine.

Do you have any other way to reproduce, i.e. so exiv throws?
Comment 10 Tom Moebert 2019-05-12 14:49:39 UTC
Cannot reproduce this either. Neither with Wikipedia's bouncing ball nor with my own (a)png files.

Used exiv2 0.27.0 and gwenview 19.07.70 (recent git).
Comment 11 Justin Zobel 2022-09-22 12:29:34 UTC
Thank you for reporting this crash in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the crash with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 12 Bug Janitor Service 2022-10-07 04:51:06 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Bug Janitor Service 2022-10-22 05:01:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!