RSS/Atom feed Twitter
Site is read-only, email is disabled

Not saving resolution information - "XCF: This file is corrupt!"

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

CJ Kucera
2007-11-06 19:31:05 UTC (about 17 years ago)

Not saving resolution information - "XCF: This file is corrupt!"

Hello list.

I should probably preface this by saying that I *am* running Gentoo Linux on the box that's having this problem, so it's entirely possible that my problems are related to that somehow. My system's pretty vanilla, though, and it doesn't look like Gentoo's doing any patching on the 2.4.1 Gimp build.

Anyway, I'm using Gimp 2.4.1, and I've encountered a problem where Gimp isn't saving the layer dimensions in its .XCF files, so that when the file is opened, Gimp gives the error:

XCF: This file is corrupt! I have loaded as much of it as I can, but it is incomplete.

I haven't yet figured out exactly what causes this to happen - some images I have don't exhibit this behavior, though most do.

I've gone so far as to open up a file that I had created with an older version of Gimp and re-save it without any edits. When I compare the two files, there are only a few bytes that differ, and it turns out that it's the dimensions which are showing up as "0" instead of the proper dimensions. You can see that at this URL: http://apocalyptech.com/media/gimp/

* goinonboat.xcf is a file I had created in an earlier version of Gimp * goinonboat2.xcf is the file I re-saved. * dimension.png contains all of the binary differences between the two. The file is 640x480 (which in hex is 0x0280 by 0x01E0).

I had been experiencing this issue on Gimp 2.4.0 as well. I had been using the 2.3 versions as well, for awhile, and it may have been occurring then without me noticing.

I've been looking around mailing list archives and forums, and I haven't seen anybody else with this problem, so I assume that it's something particular to my system.

Also, if I open up one of these corrupt files which only has one layer, I get the following on the console:

(gimp:9090): Gimp-Core-CRITICAL **: gimp_layer_new: assertion `width > 0' failed

Specifying --verbose when running gimp doesn't produce any extra relevant output.

If anyone's got any ideas, I'm all ears.

Thanks! -CJ

Sven Neumann
2007-11-07 11:42:01 UTC (about 17 years ago)

Not saving resolution information - "XCF: This file is corrupt!"

Hi,

On Tue, 2007-11-06 at 12:31 -0600, CJ Kucera wrote:

Anyway, I'm using Gimp 2.4.1, and I've encountered a problem where Gimp isn't saving the layer dimensions in its .XCF files, so that when the file is opened, Gimp gives the error:

XCF: This file is corrupt! I have loaded as much of it as I can, but it is incomplete.

I haven't yet figured out exactly what causes this to happen - some images I have don't exhibit this behavior, though most do.

I've gone so far as to open up a file that I had created with an older version of Gimp and re-save it without any edits. When I compare the two files, there are only a few bytes that differ, and it turns out that it's the dimensions which are showing up as "0" instead of the proper dimensions. You can see that at this URL: http://apocalyptech.com/media/gimp/

* goinonboat.xcf is a file I had created in an earlier version of Gimp * is the file I re-saved.
* dimension.png contains all of the binary differences between the two. The file is 640x480 (which in hex is 0x0280 by 0x01E0).

I can reproduce the problem loading "goinonboat2.xcf". But I can load "goinonboat.xcf" without a problem, then save it again and the result seems to be just fine.

Are you using any unusual compiler settings? Since you are using Gentoo, we are likely going to attempt to blame you for this problem. So you better try to convince me that your compiler settings are sane...

Sven

CJ Kucera
2007-11-07 19:57:37 UTC (about 17 years ago)

Not saving resolution information - "XCF: This file is corrupt!"

Sven Neumann wrote:

I can reproduce the problem loading "goinonboat2.xcf". But I can load "goinonboat.xcf" without a problem, then save it again and the result seems to be just fine.

Yeah, I had a feeling that reproduction would be difficult on this one.

Are you using any unusual compiler settings? Since you are using Gentoo, we are likely going to attempt to blame you for this problem. So you better try to convince me that your compiler settings are sane...

No, my CFLAGS are just "-mtune=athlon-xp -O2 -pipe" which I think are pretty conservative. I suppose I should try just building it up by hand to see if that has any bearing - I'll give that a go.

-CJ

CJ Kucera
2007-11-07 23:52:16 UTC (about 17 years ago)

Not saving resolution information - "XCF: This file is corrupt!"

CJ Kucera wrote:

Anyway, I'm using Gimp 2.4.1, and I've encountered a problem where Gimp isn't saving the layer dimensions in its .XCF files, so that when the file is opened, Gimp gives the error:

Oh, now THIS is interesting... It looks like this is only happening when I'm working on files that are being served over NFS. I've got a central fileserver at home where I mount /home from, which is where most of my Gimp files are contained. The couple that I had tried that had worked were outside /home but I didn't think to see if that was the causative case or not.

I'll be digging around more to see if I can figure out what's going on more specifically, but it'd be nice to see if anyone else can reproduce it by saving to an NFS share.

-CJ

CJ Kucera
2007-11-08 23:36:39 UTC (about 17 years ago)

Not saving resolution information - "XCF: This file is corrupt!"

CJ Kucera wrote:

Anyway, I'm using Gimp 2.4.1, and I've encountered a problem where Gimp isn't saving the layer dimensions in its .XCF files, so that when the file is opened, Gimp gives the error:

I know everyone's been waiting with bated breath to find out how this turns out, but just FYI, it turns out that the root of the problem was this bug in the kernel:

http://bugzilla.kernel.org/show_bug.cgi?id=9315

... once I applied that patch, Gimp (and, as it turns out, various other programs which use sparse files) started working just fine.

So, anyone using NFS, Gimp, and recent 2.6.23 kernels may want to take a look at that to make sure that you're not getting bitten by the same thing.

-CJ