Bug 465954 - Krita fails manual saves silently with no space left in home directory
Summary: Krita fails manual saves silently with no space left in home directory
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.1.5
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-17 18:19 UTC by Andrea Montagna
Modified: 2023-02-17 23:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Montagna 2023-02-17 18:19:50 UTC
SUMMARY

As per title, when there is no space left on krita's home directory partition all manual saves fails silently, meaning without warning or user-directed messages. Error is present in the logs but it is impossible to know the saves failed at all unless the user checks them out themselves.

Autosaves still work, unless the file is not saved in which case the autosave fails too with a short lived message at the bottom of the window.

It is important to note that it is missing space in the home directory and not in the saved file directory (if different) that creates this bug.

Main problem here is that the user should be notified of the problem directly, ideally with a halting popup as the problem is very urgent and requires instant action, instead of keeping the errors hidden in the log. Failing to do so means that the user thinks the saves are working as intended when in fact they are not.

STEPS TO REPRODUCE
1. Create ~600MB empty file, format it as ext4 and mount it
2. Place Krita appimage in mounted file with name "krita"
3. Create "krita.home" directory (to use as home directory)
4. Launch Krita 
5. Fill remaining disk space in the krita partition with data
6. Settings -> Configure Krita -> General -> File Handling -> Backup File Location set to "User Folder"
7. Create a new kra file, add content to make it large enough to not be saved
8. Save the file outside of the mounted directory
9. Edit image, then manually click the save button or hit the save shortcut

OBSERVED RESULT
The save fails silently

EXPECTED RESULT
The program should notify the user that the save failed and prompt them to free space in the home directory's partition

SOFTWARE/OS VERSIONS
Linux: Xubuntu 22.04.1 LTS
Qt Version: 5.12.12
Comment 1 Andrea Montagna 2023-02-17 18:22:51 UTC
Forgot to mention this (even if obvious): the fails happen due to Krita being unable to create backup files for the kra file when saving due to lack of space
Comment 2 Bug Janitor Service 2023-02-17 22:36:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1743
Comment 3 Invent Merge Service 2023-02-17 23:30:04 UTC
Git commit d5b4b778cec8f1d15265caef571f3d2e0b43e8f0 by Merge Service, on behalf of Agata Cacko.
Committed on 17/02/2023 at 23:29.
Pushed by merge-service into branch 'master'.

Show error message if backup file saving fails

Before this commit, Krita wouldn't show an error message
if the backup file saving procedure failed.
This commit ensures the error message will be shown.

Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1743>

M  +2    -0    libs/ui/KisDocument.cpp

https://invent.kde.org/graphics/krita/commit/d5b4b778cec8f1d15265caef571f3d2e0b43e8f0