Whenever I attempt to load file with relatively large amount of layers (besides it doesn't matter native .xcf or .psd file it is) it crashes with following:
(gimp:741): GLib-ERROR **: gmem.c:110: failed to allocate 16384 bytes
(script-fu:748): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error
Trace/breakpoint trap (core dumped)
Full output of:
do not gives anything interesting or suspicious at all...
What was attempted to solve problem:
Deleting ~/.gimp2.8 and re-installing GIMP.
Compiling from source GIMP 2.8.10
Compiling from source GIMP 2.8.6
During my searches for similar problems some suggested that GTK theme might be responsible for that (however in my case it seems rather doubtful, besides I am using qt-curve). Nevertheless changing to oxygen-gtk2 or using Adwaita did not solve it. I even installed Gnome and tried it under it with no success.
Somewhere on Ubuntu forums there were suggestion to remove script-fu from /lib/gimp/2.0/plug-ins/ . It did get rid of script-fu error (which is I am certain related to GLib error in my case) yet GIMP still crashes.
Rather interesting but when I run it is possible to open such images. Those big files also opens without any trouble with GIMP 2.8.6 under LiveISO Linux Mint 16 Petra RC where GLib is 2.38.0 compared to 2.38.2 on Arch. After reading a little about GLib it seems (as far as I figured out) that Valgrind utilize something similar to configuration option for GLib compilation.
So as far as I could tell there is a couple options to fix a problem:
Downgrade GLib to version 2.38.0
Compile GLib from source with extra configuration options (since they can only be used during compilation - or am I wrong here?)
With this being said I actually doubt that it is necessary - there has to be another way... there is also huge possibility I am wrong altogether... and also with whole GTK depending on GLib I kinda afraid that it is possible to screw system big time this way.
Any help/ideas with resolving that issue will be highly appreciated!
I can easy enough run GIMP 2.8.8 under Wine... yet it feels just so wrong even thinking about it...
Last edited by Stormcrow (2013-12-07 15:54:02)
More steps were attempted to solve problem:
Compile from source glib-2.39.1
Compile from source glib-2.38.0
Compile from source gegl-0.2.0
Neither of the attempts resolved problem - GIMP still crash with former error. Considering nature of the error (e.g. memory allocation) could the problem somehow be kernel related? Anyhow I am running low on the ideas what else could I do in order to solve it.
Although really doubtful it will help I'll much likely attempt full system re-install and then see what happens...
same problem here! when i try to open a large panoramic image (40 mp or more) gimp crashes. sometimes i can open it, but as soon as i start cropping the pogramm just dies.
my idea was, that it hast to do with the last system update. 2 weeks ago everything was fine and i was able to work on the panoramic images. i tried downgrading poppler-glib and a few others, but nothing worked out. for now i am running out of ideas.
thanks by the way for the tip wit valgrind! at least i can do some work (even if slooooow)
I also can confirm the Problem. I tried to open large panoramic images, too.
Up to now i have no solution.
Last edited by buster3 (2013-12-06 14:33:56)
Managed to solve problem... however first more steps which I attempted before actually met with success:
Re-installed Arch, then installed twm (for the purity of the experiment) and on top of it GIMP. However unfortunately GIMP crashes with the same error.
ulimits -m unlimited
to ~/.bashrc and ~/.bash_profile
However GIMP still crashes...
Then I decided to think in opposite way (e. g. instead of trying give GIMP more memory – give it less). Inside GIMP I set “Tile cache size” to 128MB, relaunched GIMP and then such big files loaded without a problem (maximum image I attempted to open before I stopped testing had following properties: XCF image with 4800x2700 pixels 300ppi file size of 115.8MB ). However if I increase “Tile cache size” more then 896MB then GIMP will crash... Funny enough this way (e. g. with 896MB of tile cache size and when I had image with 1343 layers opened) GIMP uses only about 1GB of RAM and runs rather smooth... also it almost do not utilize swap partition however sometime using about 4-16MB there...
Rather interesting however with said image GIMP under Linux Mint 16 live ISO (for example) perform quite differently... It utilize about 6GB of swap and well RAM usage is somewhat comparable...
I am not sure if my solution will work for everyone... so check it and if it does then I'll mark it as solved.... However it still puzzles me why it behaves this way under Arch...
Been struggling with this for the past day when working with large images. Your fix of reducing the "Tile Cache Size" works perfect, not had any crashes since.
Reducing the title cache size to 896 MB also worked for me. Thank you!
Had the same problem when opening too many images (more than 12 to 15). Your workaround solved it for me, too. However, as you said, Gimp doesn't seem to use more than 1GB of RAM now. Looks like there is a bug somewhere, no?
I compiled Gimp 2.8.10 from source and the problem is still there. Reducing the tile cache size to very tiny amounts does, however, still allow Gimp to work. I'm not working with files that have oodles of layers, but rather files that are simply very large.
Did you guys report this to the gimp devs?
...no, I suppose I should, but I have a habit of assuming by default that whatever went wrong is my own fault. However, after searching through existing bugs, I want to test a different kernel just to see if maybe it isn't bug 719619.