![]() Registered Member ![]()
|
I tried to reopen a saved ".kra" file. The following message was displayed:
This is with Krita 2.9.5, git b23d328, running on Gentoo Linux. |
![]() KDE Developer ![]()
|
Krita files are zip files, so try unzipping and maybe remove layer 4 to recover the other layers?
No idea what is wrong with it, or why it got corrupted though... |
![]() KDE Developer ![]()
|
I'd also like to see the original, broken file to see what's up.
|
![]() Registered Member ![]()
|
Upon unzipping:
Unzipping, removing the three "layer4" layers, and also modifying "maindoc.xml" to not refer to layer4, then rezipping did recover the entire file, except of course for layer 4. Fortunately layer 4 will be easy enough to recreate - the other layers would have taken a lot more work. Possibly related: I encountered a similar error message about not being able to read pixel data, after opening a large tif created by GIMP, then saving the file as a ".kra" file. Krita could open the tiff (even 32f -yeah!) and save it as a ".kra" file, but couldn't reopen it. I tried to recreate the problem with a small tiff, but that didn't cause any problems. I had assumed that the problem was "operator error" and that somehow I'd managed to save a tif with the ".kra" extension. Now I'm not so sure. Could either of these two file opening errors be related to https://bugs.kde.org/show_bug.cgi?id=345217 ? |
![]() Registered Member ![]()
|
Hi Boudewijn, I did upload the file. I sent you the link in an email. |
![]() KDE Developer ![]()
|
Thanks. It's interesting because the file really _is_ corrupted, on the zip level. Either something went wrong when writing out the file (we didn't do enough checking when writing, I fixed that this morning), or the file got corrupted on the hard disk. As Wolthera said, unzipping, editing maindoc.xml to remove the reference to layer4 and then zipping up again is the only possible remedy.
|
![]() KDE Developer ![]()
|
Hah, it was a different problem after all. The tiff file contained a Document entry which we take for the layer name; the name started with a /, which means the lpading code got really confused. Fixed in git.
|
![]() Registered Member ![]()
|
The problem that was fixed in git is the problem with reopening kra files that were created from some tif files that have a particular metadata embedded, namely the "document name" metadata (unless I misread, always possible). I rebuilt Calligra/Krita from git, and indeed Krita can now open the GIMP-saved tiff with the odd "document name " metadata, save the file as a "kra" file, and then close and reopen the saved kra file. However, the Krita "document name" (correct terminology? I mean the text on the tab) is very confusing, at least it seems that way to me: Krita says across the tab of the reopened kra file "/path/to/originally/opened/tif/original-tif-file-name.tif - name-of-kra-file.kra". And when I make changes and close the kra file without saving the changes, Krita says "The document '/path/to/originally/opened/tif/original-tif-file-name.tif' has been modified. Do you want to save it?" But in fact the tif itself hasn't been modified. Only the kra file was modified. This confusing set of messages only happens when the tif file contains metadata that has the original file name embedded (read by exiftool as the "Document Name" tag). Does anyone else find this way of naming some but not all kra files a little confusing? I take it jpegs and pngs and exr files don't have this issue? as the metadata in question is only a tiff field? Anyway, once I open a tif and save it as a kra file, that original tif path and file name doesn't really matter, and to make matters more confusing, it isn't updated when the file is saved to a new place and then opened from the new location. So Krita is currently displaying in the document name/tab a file path and name for a file that isn't there any more, in a folder that isn't there any more, that happens to be embedded in a tif that was opened from an entirely different folder. Bleh, it's confusing even to describe. |
![]() KDE Developer ![]()
|
|
![]() Registered Member ![]()
|
There are probably a zillion other issues that are more important than how Krita picks document names, but should I file a bug report? |
![]() KDE Developer ![]()
|
Yes, files that go corrupt are considered the same priority if not higher as crashes.
|
Registered users: Bing [Bot], Google [Bot]