Bug 427236 - KMail crashes after closing e-mail window
Summary: KMail crashes after closing e-mail window
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: Git (master)
Platform: Debian stable Linux
: VHI critical
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: regression
: 427242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-02 06:00 UTC by Leszek Lesner
Modified: 2020-10-02 13:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.75


Attachments
Debug output kmail (5.69 KB, text/x-log)
2020-10-02 06:00 UTC, Leszek Lesner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leszek Lesner 2020-10-02 06:00:45 UTC
Created attachment 132065 [details]
Debug output kmail

SUMMARY
Opening up a e-mail in a new window crashes KMail when closing this window.

STEPS TO REPRODUCE
1. Double click on a e-mail
2. Wait until the e-mail loads in a new window
3. Close the window via close button or File->Close

OBSERVED RESULT
KMail crashes.

EXPECTED RESULT
E-Mail window closes only. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Git Master (2nd October 2020)
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.15.1 (Git branch with 2nd October 2020 commits)

ADDITIONAL INFORMATION
See attached debug output
Might be related to https://bugs.kde.org/show_bug.cgi?id=403359 though its reported so long ago and I only have this issue since a few days (updating more or less regularly from git master)
Comment 2 Nate Graham 2020-10-02 13:12:47 UTC
Okay, I think I know how to fix this.
Comment 3 Bug Janitor Service 2020-10-02 13:18:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/27
Comment 4 Nate Graham 2020-10-02 13:23:02 UTC
*** Bug 427242 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2020-10-02 13:42:19 UTC
Git commit f431b93e11640b1ef6bf53cf04c8c7a5a4b5e091 by Nate Graham.
Committed on 02/10/2020 at 13:31.
Pushed by ngraham into branch 'master'.

[kmainwindow] Don't delete entries from an invalid kconfiggroup

If for some reason the config group we're trying to delete entries from
doesn't exist, the app will assert in KConfigGroup::deleteEntry in
`Q_ASSERT_X(isValid(), "KConfigGroup::deleteEntry", "accessing an
invalid group");`

So let's guard against that by only deleting the entry from the config
group if the group itself is valid. Maybe it's not, for some reason.
FIXED-IN: 5.75

M  +3    -1    src/kmainwindow.cpp

https://invent.kde.org/frameworks/kxmlgui/commit/f431b93e11640b1ef6bf53cf04c8c7a5a4b5e091