Problem: cairo-libpng16.patch, introduced in #465044, is probably causing every PNG image to fail to load with libpng-1.6.2, as libpng emits an error "info change after png_start_read_image or png_read_update_info". (But that patch is indeed necessary for cairo to work with libpng-1.6.1.) Lifting the patch fixes the issue here. Background: After upgrading to libpng-1.6.2, fcitx segfaults after start. Debugging shows fcitx failed to load a PNG image with cairo_image_surface_create_from_png(), and it isn't handling this correctly. I looked further and found seemingly cairo failed to load each and every PNG image, returning CAIRO_STATUS_NO_MEMORY, because it received the following error from libpng: ---- #0 png_simple_error_callback (png=0x555555d74f10, error_msg=0x7ffff59e2200 "info change after png_start_read_image or png_read_update_info") at cairo-png.c:134 ---- I tried with a test program from here < http://permalink.gmane.org/gmane.comp.lib.cairo/23741 >, to load a few random PNG images, exactly the same issue, so it isn't only a problem with fcitx, but in cairo. When I look at the bug about libpng-1.6 on cairo side < https://bugs.freedesktop.org/show_bug.cgi?id=63487 >, I found them claiming the issue is fixed on libpng-1.6.2 already, so I removed cairo-libpng16.patch when compiling cairo, and the problem immediately goes away. Reproducible: Always
Ben, this looked serious enough to go for non-maintainer commit for fast fix. I hope you don't mind. +*cairo-1.12.14-r1 (27 Apr 2013) + + 27 Apr 2013; Samuli Suominen <ssuominen@gentoo.org> +cairo-1.12.14-r1.ebuild: + Stop applying bogus -libpng16.patch wrt #467426 by Richard Grenville