Strange png error, empty metadata fields crash the png plugin

Here’s a screenshot:
Screenshot_20230619_174406
I am using arch linux on the lts kernel, with gimp 2.10.34. I mostly use gimp to edit PNG files from my scanner, but that has become a problem since something updated and now anything larger than 26MiB crashes the png plugin. I know it isn’t a ram problem, I can open and edit a 1GB .tif image with no problems. Unfortunately any solution I have been able to find for this kind of problem has been a recommendation to allocate more ram, but I have 32gb which should be way more than enough to load a png, especially on the smaller side. Does anyone know what’s happening? Thanks

I can create (and reload) a 200MB PNG (10000x10000px filled with “Plasma”) with Gimp 2.10.34.

AFAIK Gimp calls libpng for most of the work, so it could be a problem with your version of libpng. In Gimp 2.10.34, the minimum level for libpng is 1.6.25. The version on my system is 1.6.37 (I run Kubuntu 22.04.02, by the way).

If you start Gimp in a terminal you may have additional information about the crash…

I found the problem, I think it has to do with one of the gimp packages not recognizing windows xp PNG metadata. I use a virtual machine for my scanner’s outdated drivers, so I believe they are the culprit. Here’s the gimp bug tracker thread: PNGs above a certain size crash the file-png plugin (#9629) · Issues · GNOME / GIMP · GitLab

someone else told me it could be related to glib2, but I haven’t narrowed it down entirely.

Welcome!

If the flatpak is using the latest exiv2 0.28.0, this (the empty PNG metadata fields) sounds like it could coming from Uncaught exception: Overflow in Exiv2::DataBuf::c_data · Issue #2650 · Exiv2/exiv2 · GitHub

P.S. It’s fixed in the repo btw, but there is no eta on the next release…

1 Like

thank you! downgrading exiv2 libgexiv2 as recommended in this comment was the solution!