Bug 443134 - Krita is not able to re-save document with some characters, dataloss
Summary: Krita is not able to re-save document with some characters, dataloss
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.0.0-beta2
Platform: macOS (DMG) macOS
: NOR critical
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-09-29 20:04 UTC by anno2300
Modified: 2023-03-30 13:34 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-14848-0.html (795 bytes, text/html)
2021-09-30 10:02 UTC, Wojciech Kosowicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anno2300 2021-09-29 20:04:58 UTC
SUMMARY
Krita can't “fast save” to files with certain characters after the document is opened in a new session (second session). The tested characters are ä, ü, ö. Also overwriting with “save as” doesn’t work. Krita doesn’t show an error message, but there is no save bar at the bottom, i you recognize. Also on normal app exit when krita asks if you want to save the change and you say yes, it doesn’t save and krita exit normaly. And all the progress can be lost from this session, this is critical in my opinion because on this normal exit the autosave file is also deleted.

STEPS TO REPRODUCE
1. Create a new krita file that countains ä, ü or ö in the filename. 
2. Save a few times after small edits. It should work in the first session (most of the time)
3. Exit krita completely, start krita, open the file again
4. Try to save with the shortcut cmd+s, or save or save as
5. In most cases the first save works, then it doesn't work for all later save, never

Other special charakters aren't tested, only ä ü ö.
Tested with Krita 5.0.0-beta1 and krita-nightly_96794d1
I don't know if this is really only for the special charakters, i only tested a few files.

OBSERVED RESULT
Without a message from krita and a normal exit of a program, you think that the changes are saved. but then the whole session os gone. And cause krita exits normal, the autosave is also deleted.

EXPECTED RESULT
It should work.

SOFTWARE/OS VERSIONS
macOS Big Sur 11.6
Comment 1 anno2300 2021-09-29 20:11:22 UTC
It looks like krita doesn't exit always if you say yes and was not able to save. But it looks like there is also no autosave file for this kind of files.
Comment 2 anno2300 2021-09-29 20:22:02 UTC
It is not only for ö ü ä, also for é à è

All the following letters are okay in my tests:
a-z A-Z - _ .
Comment 3 Tiar 2021-09-29 23:56:10 UTC
Does it happen in Krita 4.4.8?
Comment 4 anno2300 2021-09-30 07:10:00 UTC
In Krita 4.4.8 it works fine.
Comment 5 Halla Rempt 2021-09-30 08:08:10 UTC
Do you mean with those characters in the filename? That works for me on my macbook pro with big sur, with the locale set to US English.
Comment 6 anno2300 2021-09-30 09:45:56 UTC
Yes exactly. I can reproduce it with 100% accuracy, also if i delete all and reinstall it, 4.4.8 works fine, beta1 and nightly not. Even if i create a new user it is the same (just for all cases).

If the filename contains one of these charakters, krita can't overwrite it after you reopen it, only in the first session.
Comment 7 anno2300 2021-09-30 09:49:26 UTC
Which locale do you mean exactly? macOS language is set to Swiss German. Krita is in english
Comment 8 Wojciech Kosowicz 2021-09-30 10:02:25 UTC
Created attachment 142025 [details]
attachment-14848-0.html

czw., 30 wrz 2021, 11:49 użytkownik <bugzilla_noreply@kde.org> napisał:

> https://bugs.kde.org/show_bug.cgi?id=443134
>
> --- Comment #7 from varg86@gmx.ch ---
> Which locale do you mean exactly? macOS language is set to Swiss German.
> Krita
> is in english
>
> --
> You are receiving this mail because:
> You are watching all bug changes.
>
>
Comment 9 Halla Rempt 2021-09-30 10:49:37 UTC
The macOS setting -- maybe there's something weird going on with filenames if the OS isn't us-english.
Comment 10 Halla Rempt 2021-09-30 12:01:52 UTC
Hm, no... Not even if I change the language in my mac can I reproduce this issue :-(
Comment 11 wolthera 2021-09-30 17:41:46 UTC
perhaps the key problem here isn't just the file name itself, but also the title being set in the new document window? Because there's also bug #429925, where the title of the document also leads to trouble (though it's subtly different), maybe the title taken from the document title doesn't get converted properly?
Comment 12 anno2300 2021-09-30 18:49:40 UTC
I figured out maybe a important thing.
I always set backup files up to 5. And it looks like this problem with the charakter in the filesystem effects the overwriting process for the backup files maybe? Cause if i set it to 1 backup file, there is only the autosave and the save, and not one backup file. It is the default setting and with it i was not able to reproduce the bug. But after i set it up to 2, the bug apperars after a new session if there are backup files.
Comment 13 anno2300 2021-09-30 19:10:06 UTC
Title in the file name is empty.
Comment 14 anno2300 2021-09-30 19:10:51 UTC
Oh sorry... i mean that the title in the file document name was always empty.
Comment 15 anno2300 2021-10-12 11:44:10 UTC
Just wanted to say that the bug is also in beta2. Can you also reproduce it now when you increase backup files to 2 or more?
Comment 16 Halla Rempt 2022-06-28 08:25:06 UTC
Sorry for the really late reply. I tried this, but I still cannot reproduce the issue. I've set the ui langage to german, enabled the swiss german keyboard, created a file ü.kra, saved, closed Krita, started Krita again, opened the file and saved it succesfully five times :-(
Comment 17 vanyossi 2022-06-28 23:53:49 UTC
Using krita 5.0.6, I tested this on macOS 12.4 (21F79) extensively, I have the UI set to spanish and made a filename called "ñaイスoló.kra" I created the file, painted a little and saved afterwards I closed and reopened it a few times while saving incremental backups, incremental versions and some save as commands.

There was no combination of events that led to the file not saving. however I did encounter some times were pan and right click were not working after saving an incremental backup. Even on those rare situations saving was never skipped or not performed.
Comment 18 Halla Rempt 2022-09-16 08:07:06 UTC
Um, I might have missed a small detail: the number of backups was set to 5. That enters a different codepath in kbackup, and I already fixed one problem with that yesterday. I'll check this right now.
Comment 19 Halla Rempt 2022-09-16 08:08:13 UTC
okay, not a problem on linux in any case.
Comment 20 Halla Rempt 2022-09-16 08:45:44 UTC
No, I have tried this on my mac as well, with 5.1.1 and with 5 backups, and no problems. I really cannot do anything about this :-(
Comment 21 Dmitry Kazakov 2022-09-16 15:19:15 UTC
I cannot reproduce the problem here on Linux either
Comment 22 Halla Rempt 2023-03-30 13:34:45 UTC
I'm sorry, we're going to have to close this now. It's not reproducible :-(