Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198284 - media-gfx/gimp-2.4.1 not saving layer dimensions in XCF, resulting in "XCF: This file is corrupt!"
Summary: media-gfx/gimp-2.4.1 not saving layer dimensions in XCF, resulting in "XCF: T...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Hanno Böck
URL: http://apocalyptech.com/media/gimp/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 18:02 UTC by CJ Kucera
Modified: 2007-11-10 01:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
goinonboat.xcf (goinoninboat.xcf,564.35 KB, application/octet-stream)
2007-11-06 18:04 UTC, CJ Kucera
Details
goinonboat2.xcf (goinoninboat2.xcf,564.35 KB, application/octet-stream)
2007-11-06 18:04 UTC, CJ Kucera
Details
dimension.png (dimension.png,3.18 KB, image/png)
2007-11-06 18:05 UTC, CJ Kucera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CJ Kucera 2007-11-06 18:02:50 UTC
Using Gimp 2.4.1, 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 the URL above ( 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'll also attach those files to the bug, in case that URL becomes inaccessible at some time.

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.

Reproducible: Always

Steps to Reproduce:
1. Open previous XCF
2. Re-save as a different filename
3. Attempt to open the new file




Portage 2.1.3.16 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.23.1 i686)
=================================================================
System uname: 2.6.23.1 i686 AMD Athlon(tm)  2000+
Timestamp of tree: Tue, 06 Nov 2007 16:30:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/s
hare/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mtune=athlon-xp -O2 -pipe"
DISTDIR="/usr/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.mirrors.tds.net/gentoo ftp://ftp.rhnet.is/pub/gentoo/ http://ftp.isu.edu.tw/pub/Linux/Gentoo"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-afte
r --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/vmware /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib acpi aim alsa apache apm asf audiofile bash-completion berkdb bitmap-fonts bzip2 
calendar cdparanoia cdr cli cracklib crypt cups curl curlwrappers dbus dedicated dga directfb dri dts dv dvb dvd dvdr dvdre
ad encode exif expat fbcon ffmpeg fftw firefox flac flash fluidsynth foomaticdb fortran ftp gd gdbm ggi gif glut gnome gnut
ls gphoto2 gpm graphviz gstreamer gtk gtk2 hal iconv imagemagick imap imlib innodb isdnlog jabber jack java javascript joys
tick jpeg jpeg2k ladspa lash ldap libcaca libwww lm_sensors lzo mad maildir mailwrapper mbox mcal mhash midi mikmod mime mi
ng mmap mmx mmxext mng mp3 mpeg msn mudflap musepack mysql ncurses nis nls nptl nptlonly nsplugin nvidia odbc offensive ofx
 ogg openal opengl openmp osc oss pam pcntl pcre pdf perl php png portaudio ppds pppd python quicktime readline real reflec
tion samba sasl sdl session shorten slang sndfile snmp socks5 sox speex spell spl sse ssl svg svga tcl tcltk tcpd theora ti
ff tk tokenizer truetype truetype-fonts type1-fonts unicode usb v4l vcd vdr vorbis win32codecs wmf wxwindows x264 x86 xine 
xinetd xml xorg xpm xprint xv xvid xvmc yahoo zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare
 dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvo
l" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm0
01 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLA
GS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 CJ Kucera 2007-11-06 18:04:03 UTC
Created attachment 135350 [details]
goinonboat.xcf

Here's an original XCF, created on a previous version of Gimp, which works fine.
Comment 2 CJ Kucera 2007-11-06 18:04:48 UTC
Created attachment 135351 [details]
goinonboat2.xcf

Here's the same file, but saved with Gimp 2.4.1.  Nothing else was done to the file, just Open -> Save As.
Comment 3 CJ Kucera 2007-11-06 18:05:53 UTC
Created attachment 135353 [details]
dimension.png

Here's a graphic with all of the binary differences between the two files.  Note that apart from a few other stray bytes, the difference is essentially that the resolution information is missing.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-11-06 22:04:44 UTC
And, this is a Gentoo-specific bug exactly why?
Comment 5 CJ Kucera 2007-11-06 22:29:36 UTC
Well, I don't know if it is, but given that I haven't seen anybody else with this problem (Gimp mailing lists, forums, etc), it seems like something which is somehow specific to the way my system is set up, which seems more likely to be related to my distro, instead of the software itself.  I can't imagine that this is a common issue, or they'd be getting tons of bugreports on it.

Additionally, I've always thought that the distro should be the frontline reporting bugs like this, especially for "unique" distros like Gentoo.

If you don't feel this belongs here, I'll just send it over their way instead.  I had thought this was the proper place for it, though.
Comment 6 CJ Kucera 2007-11-08 22:48:41 UTC
Hello again...

FYI, after a bunch of tracing around, it turns out that this is actually a kernel-level bug which can affect any application which uses sparse files over NFS (not just Gimp), more details of which (and a patch to rectify the behavior) can be found here:

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

I use vanilla-sources (yes, I know that's unsupported), and it looks like the gentoo-sources folks already know about it (I see the relevant patch in genpatches-2.6.23-2.base.tar.bz2) so this should probably be closed out as INVALID or something.
Comment 7 Hanno Böck gentoo-dev 2007-11-10 01:11:12 UTC
Marking invalid as reporter requested.