Bug 436074 - Invalid file type can be drag-drop imported as a File Layer
Summary: Invalid file type can be drag-drop imported as a File Layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: sh_zam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-23 03:28 UTC by Benjamin Round
Modified: 2021-08-09 12:03 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Round 2021-04-23 03:28:27 UTC
SUMMARY


STEPS TO REPRODUCE
1. dragging in and importing mp3 as a new file layer
2. Then you will perpetually get a warning sign
3. If you save during this which I did it still occurs when re-opening file, causing it to be unusable.

OBSERVED RESULT
Stuck in loop of warnings

EXPECTED RESULT
A warning sign that this wouldn't work once and it not re popping up with the warning every second.

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

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2021-04-23 06:02:01 UTC
The title has been edited to make it more appropriate.

The continuous error message loop happens with version 4.3.0 for all forms of drag-drop import.

Testing with the Apr 23 5.0.0-prealpha (git e7bd37) shows that this error loop has been fixed.
However, it is still possible to drag drop an invalid file type onto the canvas and then select Insert As New File Layer which results in three error notices followed by acceptance of the file as a File Layer.
This was tested with an .mp3 file and an .mp3 file renamed as a .png file.

Normal editing and saving can be done.
Then there are error message complications when the saved .kra file is reopened.
Comment 2 Eoin O'Neill 2021-04-28 22:14:52 UTC
I also can confirm this happens, but it's not really an animation specific issue, so I'm relocating this bug to the `Layer Stack` component.
Comment 3 sh_zam 2021-08-09 12:03:45 UTC
Git commit b7109b22653d4525b53f333f29da034d6e1d0b45 by Sharaf Zaman.
Committed on 09/08/2021 at 12:01.
Pushed by szaman into branch 'master'.

Bugfix: Don't add FileLayer if file format is invalid

M  +17   -0    libs/ui/utils/KisClipboardUtil.cpp

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