You are not logged in.

#1 2013-11-30 20:26:19

Stormcrow
Member
Registered: 2013-11-29
Posts: 5

[SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

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:

gimp –verbose

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 valgrind gimp 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 –enable-gc-friendly 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!
__________
P.S.

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)

Offline

#2 2013-12-01 22:39:59

Stormcrow
Member
Registered: 2013-11-29
Posts: 5

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

Update:
__________
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...

Offline

#3 2013-12-05 21:26:17

laemplein
Member
Registered: 2013-12-05
Posts: 7

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

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) smile

Offline

#4 2013-12-06 14:32:44

buster3
Member
Registered: 2013-12-06
Posts: 1

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

I also can confirm the Problem. I tried to open large panoramic images, too.

Up to now i have no solution.

Kind regards

Last edited by buster3 (2013-12-06 14:33:56)

Offline

#5 2013-12-06 19:34:18

Stormcrow
Member
Registered: 2013-11-29
Posts: 5

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

Update:
__________
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.

Added

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 1343 layers). 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...

Offline

#6 2013-12-07 02:43:34

desktopfan
Member
Registered: 2013-12-07
Posts: 1

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

Hi

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.

Thanks

Offline

#7 2013-12-11 00:04:29

MonkeyWrench32
Member
Registered: 2013-04-12
Posts: 2

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

Reducing the title cache size to 896 MB also worked for me. Thank you!

Offline

#8 2013-12-14 07:24:37

whilealive
Member
Registered: 2012-09-04
Posts: 17

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

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?

Offline

#9 2013-12-15 03:41:37

frankspace
Member
Registered: 2009-09-19
Posts: 14

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

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.

Offline

#10 2013-12-17 09:49:04

sekret
Member
Registered: 2013-07-22
Posts: 283

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

Did you guys report this to the gimp devs?

Offline

#11 2013-12-17 15:08:23

frankspace
Member
Registered: 2009-09-19
Posts: 14

Re: [SOLVED] GIMP 2.8.8 crashes while open files with 300+ layers

...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.

Offline

Board footer

Powered by FluxBB