#1168 Build fails under Mono due to KeePass/Resources/Images/*.png


Hi, some PNGs released with KeePass have problems with the combination of recent versions of Cairo and libpng (which are used by Mono). This leads to a crash when building KeePass with Mono. The bug in cairo is quite subtle and it's being fixed, but the solution might not come in the near future. In the meantime it would be very helpful to produce a version of those images that don't raise the issue with cairo/libpng.

The PNGs are those under "KeePass/Resources/Images/", the others work fine.
The workaround we found is to run pngcrush on each image as follows:

pngcrush -ow -c 6 image.png

The "-ow" parameter overwrites the original file and "-c 6" change the color_type to ARGB, while they currently are RGB. There are probably other tools available to do the same thing. Note that although this fixes the problem, other RGB only images work fine (e.g. KeePass/Resources/Nuvola_Client/C67_Certificate.png).

On the Gentoo bug tracker you can find additional information on the problem (such as references to cairo bug tracker) and this temporary solution.

Thanks in advance.


  • Dominik Reichl

    Dominik Reichl - 2013-10-21
    • status: open --> closed
  • Dominik Reichl

    Dominik Reichl - 2013-10-21

    Thanks for the analysis and info.

    I've now applied pngcrush with the settings you suggested to all images in the 'Images' folder (within 'Resources').

    Here's a package containing all folders (with the new files) of the KeePass/Resources folder:

    It would be great if you could confirm whether building works fine for you now.

    Best regards,

  • Alessandro Di Federico

    I can confirm it works now on 2.22.

    On 2.23 I get the same problem (and same fix seems to work) with these two images:


    Can you provide a new archive with these two images fixed and leave it somewhere at least until next release so we can reference it?


  • Dominik Reichl

    Dominik Reichl - 2013-10-22

    I've converted the two images using pngcrush now, too.

    The new resource package is here:

    Does building with these files work fine now?

    I'll keep the resource packages alive for a while (at least until KeePass 2.24 is released, which will then include the new PNG files of course).

    Thanks and best regards,

  • Alessandro Di Federico

    It works. Thanks a lot.

  • Dominik Reichl

    Dominik Reichl - 2013-10-24

    Great, thanks again for your help!

  • Dominik Reichl

    Dominik Reichl - 2013-10-27

    Just FYI: I'm planning to release KeePass 2.24 in about one week.

    Best regards,

  • Alessandro Di Federico



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks