APNG crashes: incomplete fix

Bugs and Suggestions in XnView Classic which have been resolved

Moderators: XnTriq, xnview

Post Reply
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

APNG crashes: incomplete fix

Post by DOS386 » Sat Nov 07, 2009 12:07 pm

Fixed:
* APNG - viewtopic.php?f=36&t=17939 & viewtopic.php?f=36&t=18283
* APNG - viewtopic.php?f=36&t=18683
The fix is incomplete. :-|

I can confirm that old versions of XN securely crash on all those 3 and the latest displays them well. Also old NC (unsurprisingly) crashes and the latest survives.

But neither latest XN nor NC can extract frames correctly: the frames are either greyscale, completely black, or contain garbage areas. I tested minimally over 1 year ago here: http://newsgroup.xnview.com/viewtopic.php?f=57&t=15836 and seemed to work, but IIRC I had 2 APNG's available at most at that time.

--------------------------------------------------------------------------------------------------------------------------

Image (no crash)

--------------------------------------------------------------------------------------------------------------------------

Image

--------------------------------------------------------------------------------------------------------------------------

Image

--------------------------------------------------------------------------------------------------------------------------

Image

--------------------------------------------------------------------------------------------------------------------------

Another interesting point is that the 3 "evil" APNG's also securely hang some older APNG-unaware versions of FireFOX, a fact that somewhat defeats the "backward compatibility".
There is indeed no WinZIP under my rock.

User avatar
xnview
Author of XnView
Posts: 31747
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: APNG crashes: incomplete fix

Post by xnview » Sat Nov 07, 2009 1:34 pm

DOS386 wrote:But neither latest XN nor NC can extract frames correctly: the frames are either greyscale, completely black, or contain garbage areas.
'Extract frame' extract the stored frame, not the displayed frame
Pierre.

User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: APNG crashes: incomplete fix

Post by DOS386 » Sat Nov 07, 2009 2:01 pm

xnview wrote:'Extract frame' extract the stored frame, not the displayed frame


This doesn't really resolve the issue. That only "stored frames" or "differential frames" are extracted, is a thing I had discovered and pointed over 1 year ago in the other thread, it's a flaw but not a BUG.

But now I'm getting really bad frames, not just "differential frames". Do you get satisfying results from the 4 APNG's above ?

Of course, being able to select whether to extract "differential frames" or "full frames" would be an enhancement request :-)
There is indeed no WinZIP under my rock.

User avatar
xnview
Author of XnView
Posts: 31747
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: APNG crashes: incomplete fix

Post by xnview » Sat Nov 07, 2009 4:05 pm

Ok, so it's more a suggestion than a bug :-)
Pierre.

User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: APNG crashes: incomplete fix

Post by DOS386 » Sun Nov 08, 2009 4:42 am

xnview wrote:Ok, so it's more a suggestion than a bug :-)
It's both. It's a suggestion (extract full frames) and a BUG :bug: - because currently not even the differential frames are always extracted correctly.
There is indeed no WinZIP under my rock.

MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: APNG crashes: incomplete fix

Post by MaxSt » Sun Nov 08, 2009 8:12 am

xnview wrote:
DOS386 wrote:But neither latest XN nor NC can extract frames correctly: the frames are either greyscale, completely black, or contain garbage areas.
'Extract frame' extract the stored frame, not the displayed frame
But stored frames should be using palette if in mode3, right? Not grayscale?

I'm talking about last two examples.

MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: APNG crashes: incomplete fix

Post by MaxSt » Sun Nov 08, 2009 8:15 am

DOS386 wrote:Another interesting point is that the 3 "evil" APNG's also securely hang some older APNG-unaware versions of FireFOX, a fact that somewhat defeats the "backward compatibility".
Even Firefox 3.5.5 is somewhat buggy. You can see it on Santa's bag.

User avatar
Jaff
Posts: 67
Joined: Fri Dec 07, 2007 8:55 am
Location: Romania
Contact:

Re: APNG crashes: incomplete fix

Post by Jaff » Wed Nov 11, 2009 6:01 pm

MaxSt wrote:Even Firefox 3.5.5 is somewhat buggy. You can see it on Santa's bag.
8) Opera v10.10 browser rules
Imi este indiferent ce cred ceilalti despre mine, caci oricum fiecare crede ce-i convine lui si nu ceea ce e real, doar ca mi-ar fi placut sa ma vada asa cum sint de fapt, nu asa cum poate le-ar placea lor sa creada. Ei au ales deja...

User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: APNG crashes: incomplete fix

Post by DOS386 » Sat Nov 21, 2009 6:59 am

MaxSt wrote:But stored frames should be using palette if in mode3, right? Not grayscale? I'm talking about last two examples.


YES, they should. But to simplify the problem, one could design the AGIF and APNG frame extraction to output always 32bpp BMP RGBA, irrespective how many colors are actually used and whether there is some transparency (full A channel or just trans index) or not. This would avoid the output color conversion mess, reduce bug risk and testing "cost" and allow to reuse existing (?) code working for viewing.
Even Firefox 3.5.5 is somewhat buggy. You can see it on Santa's bag.
I don't see any BAG on Santa's bug ... oops, this is indeed Opera ;-)
There is indeed no WinZIP under my rock.

MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: APNG crashes: incomplete fix

Post by MaxSt » Sat Nov 21, 2009 1:03 pm

Just so it's clear what we are talking about.

Two identical animation, in GIF and in APNG:
xnview_apng.png
xnview_apng.png (16.34 KiB) Viewed 3394 times
xnview_agif.png
xnview_agif.png (15.6 KiB) Viewed 3393 times

Post Reply