Bug 438463 - Filter Dialog which is not connected with image makes Krita crash.
Summary: Filter Dialog which is not connected with image makes Krita crash.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.4.5
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: sh_zam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-11 12:13 UTC by Kwanji
Modified: 2021-06-16 07:55 UTC (History)
2 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 Kwanji 2021-06-11 12:13:09 UTC
SUMMARY
Filter Dialog which is not connected with any image makes Krita crash.

STEPS TO REPRODUCE
1. Launch Krita
2. Create new image
3. Open Level Filter Dialog(Ctrl+L) and keep it opening
4. Close the image
5. Create new image again
6. Close the image
7. Close the Level Filter Dialog
8. Krita crashes

In fact Krita crashes even if the dialog above is not of a Level filter.

OBSERVED RESULT
The steps above always make Krita crash.

EXPECTED RESULT
I think the filter dialog which is not connected with any image should be closed automatically, or prevent the image from being closed by user while the dialog opening.

SOFTWARE/OS VERSIONS
Windows: Windows10 x86_x64 10.0.19043
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.12.9
Comment 1 Deif Lou 2021-06-11 12:26:50 UTC
This may be related to: https://bugs.kde.org/show_bug.cgi?id=427534
Comment 2 sh_zam 2021-06-14 18:03:19 UTC
It seems that my patch of parenting was reverted, so window managers can work properly: https://invent.kde.org/graphics/krita/commit/e9be59ae9d5344b087e111dd81d0b509055a7fe0
Comment 3 Bug Janitor Service 2021-06-15 16:48:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/913
Comment 4 Halla Rempt 2021-06-16 07:55:40 UTC
Git commit 09a2da056a43f9633ccc4cd6dff48d071cc0c214 by Halla Rempt, on behalf of Sharaf Zaman.
Committed on 16/06/2021 at 07:55.
Pushed by rempt into branch 'master'.

Crashfix: Filter Dialog after the canvas is closed

KisDlgFilter depends on canvasBase for cleaning its state. We can't rely
on QCloseEvent & DeleteOnClose, since it can arrive after the canvas has
been destroyed, causing a crash.

M  +3    -0    libs/ui/kis_filter_manager.cc

https://invent.kde.org/graphics/krita/commit/09a2da056a43f9633ccc4cd6dff48d071cc0c214