Bug 995862

Summary: Problem loading png image
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: boswarsAssignee: Hans de Goede <hdegoede>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alekcejk, bruno, hdegoede, phracek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-13 09:20:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Wolff III 2013-08-11 15:05:18 UTC
Description of problem:
boswars errors out while trying to load a png image in rawhide.

Version-Release number of selected component (if applicable):
boswars-2.7-2.fc20.i686

How reproducible:
Seems to happen 100% of the time.

Steps to Reproduce:
1.boswars -d /usr/share/boswars

Actual results:
bash-4.2$ boswars -d /usr/share/boswars
Can't open file 'preferences.lua': No such file or directory
Bos Wars V2.7.0, (c) 1998-2013 by the Bos Wars and Stratagus Project.
  written by Lutz Sammer, Fabrice Rossi, Vladi Shabanski, Patrice Fortier,
Jon Gabrielson, Andreas Arens, Nehal Mistry, Jimmy Salmon, Francois Beerten and others.
	(http://www.boswars.org)
Compile options VORBIS THEORA 

Bos Wars may be copied only under the terms of the GNU General Public License
which must be distributed with this program.

DISCLAIMER:
This software is provided as-is.  The author(s) can not be held liable for any
damage that might arise from the use of this software.
Use it at your own risk.

libpng warning: iCCP: known incorrect sRGB profile
libpng error: IDAT: invalid distance too far back
Error reading the PNG file.
Can't load the graphic `graphics/ui/ui_minimap.png'

Additional info:
I have boswars-addons installed.

Comment 1 Hans de Goede 2013-08-12 13:31:17 UTC
This works fine for me with the same png on F-19, so this is likely caused by the new libpng15, now it may very well be that this png indeed has some issues, but libpng15 can load it just fine. It would be nice if libpng16 would not regress and load it too. Complaining is fine, not loading not so much. Changing component to libpng.

In the mean time as a workaround you can try opening the png with gimp (will likely need to be done on F-19, and then exporting the img as a png in gimp, so that it gets re-written.

Comment 2 Petr Hracek 2013-08-12 14:12:24 UTC
I have found that the issue was already discussed on the another forums like 
http://savannah.nongnu.org/bugs/?39610
https://bugs.gentoo.org/show_bug.cgi?id=475764

the PNG images should be updated.

Comment 3 Hans de Goede 2013-08-13 09:20:40 UTC
(In reply to Petr Hracek from comment #2)
> I have found that the issue was already discussed on the another forums like 
> http://savannah.nongnu.org/bugs/?39610
> https://bugs.gentoo.org/show_bug.cgi?id=475764
> 
> the PNG images should be updated.

Ok, I've done a new build of boswars for rawhide fixing this.

p.s.

I still think this is a bad idea, as boswars is very unlikely to be the only one with png files impacted by this.

Comment 4 Petr Hracek 2013-08-13 10:14:29 UTC
By the way I will soon upgrade libpng 1.6.2->1.6.3 where should be some utility
for updating PNG graphics.

Discussion about the issue is here:
http://www.marshut.com/tkhmv/problem-with-libpng-file-delivered-by-boswars-1-6-2.html

Comment 5 Petr Hracek 2013-08-13 10:16:02 UTC
Upps, I forgot to add the name of utility.
It should be a part of new package called libpng-tools
Utility will have the name pngfix.

Comment 6 nucleo 2013-10-03 22:06:49 UTC
Sorry that asking here, I found this bug when searched "libpng error: IDAT: invalid distance too far back".
So now every png file needs to be fixed in Fedora 20 if it have such problem with libpng16?
See yet one example https://git.reviewboard.kde.org/r/110314/ ("optipng -quiet -force -fix irc_normal.png" can help only if run it with older libpng, in F19).
And how pngfix actually works?