Page 1 of 1

APNG crashes: incomplete fix

Posted: Sat Nov 07, 2009 12:07 pm
by DOS386
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".

Re: APNG crashes: incomplete fix

Posted: Sat Nov 07, 2009 1:34 pm
by xnview
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

Re: APNG crashes: incomplete fix

Posted: Sat Nov 07, 2009 2:01 pm
by DOS386
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 :-)

Re: APNG crashes: incomplete fix

Posted: Sat Nov 07, 2009 4:05 pm
by xnview
Ok, so it's more a suggestion than a bug :-)

Re: APNG crashes: incomplete fix

Posted: Sun Nov 08, 2009 4:42 am
by DOS386
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.

Re: APNG crashes: incomplete fix

Posted: Sun Nov 08, 2009 8:12 am
by MaxSt
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.

Re: APNG crashes: incomplete fix

Posted: Sun Nov 08, 2009 8:15 am
by MaxSt
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.

Re: APNG crashes: incomplete fix

Posted: Wed Nov 11, 2009 6:01 pm
by Jaff
MaxSt wrote:Even Firefox 3.5.5 is somewhat buggy. You can see it on Santa's bag.
8) Opera v10.10 browser rules

Re: APNG crashes: incomplete fix

Posted: Sat Nov 21, 2009 6:59 am
by DOS386
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 ;-)

Re: APNG crashes: incomplete fix

Posted: Sat Nov 21, 2009 1:03 pm
by MaxSt
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 3499 times
xnview_agif.png
xnview_agif.png (15.6 KiB) Viewed 3498 times