Bug 459906 - Crash when dragging across patterns in Fill Layer menu
Summary: Crash when dragging across patterns in Fill Layer menu
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: 5.1.1
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-10-02 02:42 UTC by tomtomtomreportingin
Modified: 2022-10-24 05:01 UTC (History)
1 user (show)

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


Attachments
Backtrace of thread 1 (15.27 KB, text/plain)
2022-10-02 02:42 UTC, tomtomtomreportingin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomtomreportingin 2022-10-02 02:42:54 UTC
Created attachment 152543 [details]
Backtrace of thread 1

SUMMARY
As of 5.1.0, Krita is likely to crash when dragging across patterns in the Fill Layer interface.

STEPS TO REPRODUCE
1. Select "Add Fill Layer"
2. Select "Pattern"
3. Click and drag across patterns.

OBSERVED RESULT
Krita segfaults.

EXPECTED RESULT
No segfault.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.12.12 (appimage)
Comment 1 tomtomtomreportingin 2022-10-02 02:43:47 UTC
As this only starts occuring in 5.1.0, marking as a regression.
Comment 2 sh_zam 2022-10-12 08:20:29 UTC
Confirming, let's see.
Comment 3 sh_zam 2022-10-12 09:20:38 UTC
Git commit e93ace6bbbbf546e0782a6c705e9057a87ffb01f by Sharaf Zaman.
Committed on 12/10/2022 at 09:19.
Pushed by szaman into branch 'master'.

Fix nullptr dereference in pattern generator

If while dragging we click outside of the window bounds, none of the
pattern is selected resulting in:
widget()->patternChooser->currentResource() pointing to a nullptr. But
with includeHidden flag enabled we can still reference the last selected
pattern. So, this seems like a minor error (i.e operating on only "non
hidden" resource).

M  +1    -1    plugins/generators/pattern/kis_wdg_pattern.cpp

https://invent.kde.org/graphics/krita/commit/e93ace6bbbbf546e0782a6c705e9057a87ffb01f
Comment 4 sh_zam 2022-10-24 05:01:08 UTC
Git commit 0aeed4342ddd76141e6255bf3b27a5ec76f6ba76 by Sharaf Zaman.
Committed on 24/10/2022 at 04:51.
Pushed by szaman into branch 'krita/5.1'.

Fix nullptr dereference in pattern generator

If while dragging we click outside of the window bounds, none of the
pattern is selected resulting in:
widget()->patternChooser->currentResource() pointing to a nullptr. But
with includeHidden flag enabled we can still reference the last selected
pattern. So, this seems like a minor error (i.e operating on only "non
hidden" resource).
(cherry picked from commit e93ace6bbbbf546e0782a6c705e9057a87ffb01f)

M  +1    -1    plugins/generators/pattern/kis_wdg_pattern.cpp

https://invent.kde.org/graphics/krita/commit/0aeed4342ddd76141e6255bf3b27a5ec76f6ba76