Bug 379889 - Crash when opening XCF file (Problematic file is available by link).
Summary: Crash when opening XCF file (Problematic file is available by link).
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 3.1.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-16 08:14 UTC by Evgeny
Modified: 2017-05-16 19:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny 2017-05-16 08:14:17 UTC
Krita crashes when trying to open an XCF file.
Problematic file: https://drive.google.com/file/d/0B6NW7LP-fpbxaWZVNl9hVl91d0E/view?usp=sharing
---
Kubuntu 17.04 (amd64) with latest updates.
Comment 1 Halla Rempt 2017-05-16 10:12:57 UTC
Gimp 2.8 cannot load that file either: did you save it with Gimp 2.9?
Comment 2 Halla Rempt 2017-05-16 10:21:59 UTC
Git commit abe8e00f57031d6f560b373fe48063e07e417965 by Boudewijn Rempt.
Committed on 16/05/2017 at 10:21.
Pushed by rempt into branch 'master'.

Don't try to load version 3 XCF files made with Gimp 2.9

Finally Gimp 2.9's file format has changed so much that xcftools
cannot load the tiles anymore. Until someone, somewhere updates
xcftools to support the new file format, Krita won't load Gimp
2.9 files.

M  +1    -1    plugins/impex/xcf/kis_xcf_import.cpp

https://commits.kde.org/krita/abe8e00f57031d6f560b373fe48063e07e417965
Comment 3 Halla Rempt 2017-05-16 10:22:51 UTC
Git commit 62327b36653bc878acda87d0597b82b1c1f1b5bb by Boudewijn Rempt.
Committed on 16/05/2017 at 10:22.
Pushed by rempt into branch 'krita/3.1'.

Don't try to load version 3 XCF files made with Gimp 2.9

Finally Gimp 2.9's file format has changed so much that xcftools
cannot load the tiles anymore. Until someone, somewhere updates
xcftools to support the new file format, Krita won't load Gimp
2.9 files.

M  +1    -1    plugins/impex/xcf/kis_xcf_import.cpp

https://commits.kde.org/krita/62327b36653bc878acda87d0597b82b1c1f1b5bb
Comment 4 Halla Rempt 2017-05-16 14:13:12 UTC
Okay, it's worse than I thought. The new gimp 2.9 file format is now incompatible with XCF v0003, but the Gimp developers haven't increased the version number, so that cannot be detected. Both gimp 2.8 and krita think that this is a gimp file, but cannot load it. Krita aborts on this file because the xcftools library aborts the process if it encounters a malformed xcf file, instead of returning an error code.

This really should be reported as a bug with the gimp project, because changing the file format but then not changing the version number is really bad.
Comment 5 Halla Rempt 2017-05-16 14:30:33 UTC
Git commit 6ee65e54c6d3fe7ff3074e1e065554da0e6fa31b by Boudewijn Rempt.
Committed on 16/05/2017 at 14:28.
Pushed by rempt into branch 'master'.

Don't abort if the tile directory has the wrong size

This allows us to at least load the file referenced in

which is incomaptible with xcf version v0003, but still carries
that version number. Now it loads in krita... But no guarantees
about 2.9 files. Mostly, they will still crash krita because
the xcftools library aborts hard on encountering a problem, which
we cannot prevent.

M  +12   -11   plugins/impex/xcf/3rdparty/xcftools/pixels.c

https://commits.kde.org/krita/6ee65e54c6d3fe7ff3074e1e065554da0e6fa31b
Comment 6 Halla Rempt 2017-05-16 14:30:49 UTC
Git commit 9d5df13605bae1329a8e6d2140cff6b134f99e09 by Boudewijn Rempt.
Committed on 16/05/2017 at 14:30.
Pushed by rempt into branch 'krita/3.1'.

Don't abort if the tile directory has the wrong size

This allows us to at least load the file referenced in

which is incomaptible with xcf version v0003, but still carries
that version number. Now it loads in krita... But no guarantees
about 2.9 files. Mostly, they will still crash krita because
the xcftools library aborts hard on encountering a problem, which
we cannot prevent.

M  +12   -11   plugins/impex/xcf/3rdparty/xcftools/pixels.c

https://commits.kde.org/krita/9d5df13605bae1329a8e6d2140cff6b134f99e09
Comment 7 Evgeny 2017-05-16 19:31:15 UTC
(In reply to Boudewijn Rempt from comment #4)
> Okay, it's worse than I thought. The new gimp 2.9 file format is now
> incompatible with XCF v0003, but the Gimp developers haven't increased the
> version number, so that cannot be detected. Both gimp 2.8 and krita think
> that this is a gimp file, but cannot load it. Krita aborts on this file
> because the xcftools library aborts the process if it encounters a malformed
> xcf file, instead of returning an error code.
> 
> This really should be reported as a bug with the gimp project, because
> changing the file format but then not changing the version number is really
> bad.

My knowledge of english is hardly enough to describe the problem to the GIMP developers.
Thanks for the help ;)