Bug 483844 - kontact segfaults on startup
Summary: kontact segfaults on startup
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: mail (show other bugs)
Version: 6.0.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-17 16:15 UTC by Andreas Schneider
Modified: 2024-03-18 08:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 24.02.1


Attachments
kontact.gdb.log (108.03 KB, text/x-log)
2024-03-17 16:15 UTC, Andreas Schneider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2024-03-17 16:15:37 UTC
Created attachment 167372 [details]
kontact.gdb.log

SUMMARY
I've wrote a mail in kontact and then closed kontact (the new mail still open). I realized that I didn't send the mail and tried to start kontact again. Now it segfaults on start. Backtrace attached.

STEPS TO REPRODUCE
1. Start writing a new mail
2. Close kontact
3. Try to start it again

OBSERVED RESULT
Segafult

EXPECTED RESULT
Kontact starting up

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.2.2

kmail-24.02.0-1.1.x86_64
Comment 1 Andreas Schneider 2024-03-17 16:30:17 UTC
(gdb) f 1
#1  0x00007fff8c822a44 in KMMainWidget::updateFolderMenu (this=0x555557191b90) at /usr/src/debug/kmail-24.02.0/src/kmmainwidget.cpp:4069
4069        mFolderMailingListPropertiesAction->setEnabled(folderWithContent && !mCurrentFolderSettings->isSystemFolder());
(gdb) l
4064            QTimer::singleShot(1s, this, &KMMainWidget::updateFolderMenu);
4065            return;
4066        }
4067
4068        const bool folderWithContent = mCurrentFolderSettings && !mCurrentFolderSettings->isStructural() && mCurrentFolderSettings->isValid();
4069        mFolderMailingListPropertiesAction->setEnabled(folderWithContent && !mCurrentFolderSettings->isSystemFolder());
4070
4071        QList<QAction *> actionlist;
4072        if (mCurrentCollection.id() == CommonKernel->outboxCollectionFolder().id() && (mCurrentCollection).statistics().count() > 0) {
4073            qCDebug(KMAIL_LOG) << "Enabling send queued";
(gdb) p mFolderMailingListPropertiesAction
$1 = (QAction *) 0x0
Comment 2 Laurent Montel 2024-03-18 06:02:13 UTC
Git commit 6f61ea119e882b1221bd9ec7dcd0c88f77e3ac45 by Laurent Montel.
Committed on 18/03/2024 at 06:00.
Pushed by mlaurent into branch 'release/24.02'.

Fix 483844: kontact segfaults on startup

I can't reproduce it but I can avoid it.
I prefere fix real bug but without reproducing it...
FIXED-IN: 24.02.1

M  +3    -0    src/kmmainwidget.cpp

https://invent.kde.org/pim/kmail/-/commit/6f61ea119e882b1221bd9ec7dcd0c88f77e3ac45
Comment 3 Andreas Schneider 2024-03-18 08:29:49 UTC
Thank you very much for the quick fix.

I wanted to send a email to the package maintainer at openSUSE. So in konsole I right clicked on the mail choose "Send EMail To". This opened a new mail dialog, but also the opened mail I didn't send out yesterday. I've sent both mails and after that kmail/kontact started  without the segfault.