Bug 392410 - Krita 4.0 sometimes saves large "empty" files
Summary: Krita 4.0 sometimes saves large "empty" files
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-27 12:46 UTC by chris.webb4
Modified: 2018-05-01 07:53 UTC (History)
3 users (show)

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


Attachments
Output viewed in hex editor (42.78 KB, image/png)
2018-03-27 12:46 UTC, chris.webb4
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chris.webb4 2018-03-27 12:46:51 UTC
Created attachment 111681 [details]
Output viewed in hex editor

Krita 4.0 appears to save the file but sometimes writes a null-byte filled file instead. The file size is still correct, but every byte is 0x00.

Example viewed in a hex editor here: https://imgur.com/tPAVu7i

This occurred running on Windows 7 x64. I do not know if it affects other platforms or Windows versions.
Comment 1 Dmitry Kazakov 2018-03-27 12:55:25 UTC
Is it a release blocker though?
Comment 2 Halla Rempt 2018-03-27 14:08:15 UTC
Git commit 9d63ca956a74804141ce93ffbe3653a969e2c5ef by Boudewijn Rempt.
Committed on 27/03/2018 at 14:02.
Pushed by rempt into branch 'master'.

Return an error if QSaveFile cannot commit.
Related: bug 392408

M  +3    -1    libs/ui/KisImportExportManager.cpp

https://commits.kde.org/krita/9d63ca956a74804141ce93ffbe3653a969e2c5ef
Comment 3 chris.webb4 2018-03-27 22:16:08 UTC
I've tried creating lots of big files with lots of layers, saving them, closing Krita, reopening and editing them. Over the space of around 2 hours I have been unable to force it to happen again. It is therefore very intermittant.

I can confirm that the temp file is saved where the file is saved, so it's not an issue with copying from drive to drive/partition to partition.
Comment 4 Halla Rempt 2018-03-28 07:14:51 UTC
I'm not sure about making it a release blocker; I'd first like to be able to confirm the issue.
Comment 5 chris.webb4 2018-03-28 08:11:55 UTC
I've tried capturing it using ProcMon without success. It happened again last night after I'd stopped capturing with ProcMon.

I'll run more tests, see what I can come up with.
Comment 6 Halla Rempt 2018-04-03 11:45:45 UTC
Git commit 00951bc9f919d5d926fbc87000df92da15054ec5 by Boudewijn Rempt.
Committed on 03/04/2018 at 11:16.
Pushed by rempt into branch 'krita/4.0'.

Return an error if QSaveFile cannot commit.
Related: bug 392408
(cherry picked from commit 9d63ca956a74804141ce93ffbe3653a969e2c5ef)

M  +3    -1    libs/ui/KisImportExportManager.cpp

https://commits.kde.org/krita/00951bc9f919d5d926fbc87000df92da15054ec5
Comment 7 Halla Rempt 2018-04-03 15:20:09 UTC
Could you check with a recent nightly build that has the Qt fix?
Comment 8 chris.webb4 2018-04-03 15:28:17 UTC
I've been testing with build #106 and haven't had my issue come up yet. Of course there's always a possibility that my issue is related to something else that was already patched in previous nightly builds.
Comment 9 Halla Rempt 2018-04-28 10:59:10 UTC
Okay, then I think we can close this issue now.
Comment 10 chris.webb4 2018-05-01 07:53:29 UTC
Yes I've been bug free since.

I've donated to the project to say thanks :)