Bug 408246

Summary: Safe assert in Frame Data Serializer
Product: [Applications] krita Reporter: Tiar <tamtamy.tymona>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.2.0   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Safe assert dialog

Description Tiar 2019-06-03 10:04:39 UTC
Created attachment 120516 [details]
Safe assert dialog

SUMMARY
Recently I used an external drive as a both working file and a swap file location. When I unplug the drive, there is an assert that shows up and says:

SAFE ASSERT (krita): "framesDir.isValid()" in file /home/tymon/kritadev/krita/libs/ui/KisFrameDataSerializer.cpp, line 34

STEPS TO REPRODUCE
1. Have an external drive with an animation file.
2. Set up swap file to be located there as well (most probably not needed, but just for completeness).
3. Render frames and animation to the external drive.
4. Close Krita.
5. Unplug the external drive.
6. Open Krita.
7. Open or create a file.


OBSERVED RESULT
There is a dialog with the safe assert.

EXPECTED RESULT
No dialog like that; there might be a warning that the frames directory doesn't exists or something, but only when I'm actually trying to render it; otherwise it just scares people.

SOFTWARE/OS VERSIONS
Linux Mint
(available in About System)
Qt Version: 5.12
Comment 1 Halla Rempt 2019-06-03 13:38:53 UTC
Git commit 93a588362027b35654ab2d881a3c25b28e628930 by Boudewijn Rempt.
Committed on 03/06/2019 at 13:37.
Pushed by rempt into branch 'master'.

Check whether the folder still exists before creating the temp dir

If the tempdir isn't valid, then it's pretty likely it used to be
on a disk that's no longer mounted, which we should handle by going
back to the default.

M  +4    -3    libs/ui/KisFrameDataSerializer.cpp

https://invent.kde.org/kde/krita/commit/93a588362027b35654ab2d881a3c25b28e628930
Comment 2 Halla Rempt 2019-06-04 15:21:30 UTC
Git commit 7519c5d1cee8c7fceda826c3fc6eb49f4465550d by Boudewijn Rempt.
Committed on 04/06/2019 at 15:19.
Pushed by rempt into branch 'krita/4.2'.

Check whether the folder still exists before creating the temp dir

If the tempdir isn't valid, then it's pretty likely it used to be
on a disk that's no longer mounted, which we should handle by going
back to the default.

M  +4    -3    libs/ui/KisFrameDataSerializer.cpp

https://invent.kde.org/kde/krita/commit/7519c5d1cee8c7fceda826c3fc6eb49f4465550d