Bug 433652 - Krita *crashes* when adding an unsupported file format as file layer
Summary: Krita *crashes* when adding an unsupported file format as file layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.4.2
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-26 11:46 UTC by brah.rah
Modified: 2021-02-26 13:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Popup that appears (40.02 KB, image/png)
2021-02-26 11:46 UTC, brah.rah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brah.rah 2021-02-26 11:46:41 UTC
Created attachment 136191 [details]
Popup that appears

SUMMARY
I picked an .asprite file instead of the .png. The popup I've added as attachment opened up. When closed it reopens infinitely. Krita can't be used nor closed, I had to force close krita via task manager to get rid of the bug.

STEPS TO REPRODUCE
1. drag and drop an .asprite file or maybe even any file that isn't supported
2. select insert as new file layer

OBSERVED RESULT
Popup opens that krita can't parse the file format and the popup reopens when closed.

EXPECTED RESULT
Popup stays closed and file is is not added as layer/or removed not sure how krita handles adding wrong files normally.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Halla Rempt 2021-02-26 12:58:22 UTC
Git commit 5d53748bbf0685d54d27921a741601316a11c0e3 by Halla Rempt.
Committed on 26/02/2021 at 12:57.
Pushed by rempt into branch 'krita/4.3'.

If loading the image fails for too often, stop retrying
(cherry picked from commit 20a40ef938f5dd4f85fce105f0d3e86ade676fb5)

M  +10   -2    libs/ui/kis_safe_document_loader.cpp
M  +1    -0    libs/ui/kis_safe_document_loader.h

https://invent.kde.org/graphics/krita/commit/5d53748bbf0685d54d27921a741601316a11c0e3
Comment 2 Halla Rempt 2021-02-26 12:58:27 UTC
Git commit e200336f9fb3fe1ac8bac16869502de33224518b by Halla Rempt.
Committed on 26/02/2021 at 12:57.
Pushed by rempt into branch 'master'.

If loading the image fails for too often, stop retrying

M  +10   -2    libs/ui/kis_safe_document_loader.cpp
M  +1    -0    libs/ui/kis_safe_document_loader.h

https://invent.kde.org/graphics/krita/commit/e200336f9fb3fe1ac8bac16869502de33224518b
Comment 3 Halla Rempt 2021-02-26 13:06:25 UTC
In master, you don't get the dialog at all anymore, in 4.3, three times... But then it stops.