[kmail2] [Bug 486283] crash when opening an e-mail which failed to be sent

Fabian Vogt bugzilla_noreply at kde.org
Tue Aug 6 18:36:04 BST 2024


https://bugs.kde.org/show_bug.cgi?id=486283

Fabian Vogt <fabian at ritter-vogt.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/pim/ |https://invent.kde.org/pim/
                   |kmail/-/commit/ba6572b9b902 |kmail/-/commit/ca222e9e98bb
                   |9a1431333bc52109011a4382ae0 |aba4f9841a1bc0b4bc324ff95ba
                   |2                           |b

--- Comment #4 from Fabian Vogt <fabian at ritter-vogt.de> ---
Git commit ca222e9e98bbaba4f9841a1bc0b4bc324ff95bab by Fabian Vogt.
Committed on 06/08/2024 at 17:29.
Pushed by fvogt into branch 'release/24.05'.

Fix crash due to deleteLater() + nested event loop

KMEditItemCommand::execute creates a connection that does deleteLater(),
but also calls KMComposerWin::setMessage which creates a nested QEventLoop
in Kleo::KeyCache::Private::ensureCachePopulated. This nested event loop
thus deletes KMEditItemCommand within KMEditItemCommand::execute, causing
a crash.

Fix this by creating the connection for deleteLater as late as possible
and also call setDeletesItself(true) for good measure.
(cherry picked from commit ba6572b9b9029a1431333bc52109011a4382ae02)

M  +6    -5    src/kmcommands.cpp

https://invent.kde.org/pim/kmail/-/commit/ca222e9e98bbaba4f9841a1bc0b4bc324ff95bab

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list