[kmail2] [Bug 463083] Crash when switching emails

Daniel Vrátil bugzilla_noreply at kde.org
Wed Sep 27 22:13:29 BST 2023


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

Daniel Vrátil <dvratil at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/pim/ |https://invent.kde.org/pim/
                   |messagelib/-/commit/624cee4 |messagelib/-/commit/938fab6
                   |1de9780e73951913282eceb376f |22b7eb258f89f9b1492a3a264c2
                   |d34788                      |60be58

--- Comment #5 from Daniel Vrátil <dvratil at kde.org> ---
Git commit 938fab622b7eb258f89f9b1492a3a264c260be58 by Daniel Vrátil.
Committed on 27/09/2023 at 23:13.
Pushed by dvratil into branch 'release/23.08'.

Fix crash when switching signed/encrypted emails very fast

Kleo::KeyCache internally uses a QEventLoop to block until it
finishes initializing. The initialization happens the first
time the user opens a signed or encrypted email. If they switch
to another email before the KeyCache is done initializing it
leads to a crash in MessageViewer, since message pointers change
while MessageViewer is still "blocked" in OTP.

To avoid the crash, and running a nested event loop in general,
this change introduces KeyCacheMemento, which allows to wait for
the KeyCache to initialize asynchronously before the MessagePart
queries it.

(cherry picked from commit 624cee41de9780e73951913282eceb376fd34788
from 23.04 branch, because I forgot to merge it to master, so it did
not merge it to 23.08)

M  +4    -0    mimetreeparser/src/CMakeLists.txt
A  +61   -0    mimetreeparser/src/memento/compositememento.cpp     [License:
GPL(v2.0+)]
A  +60   -0    mimetreeparser/src/memento/compositememento.h     [License:
GPL(v2.0+)]
A  +50   -0    mimetreeparser/src/memento/keycachememento.cpp     [License:
GPL(v2.0+)]
A  +40   -0    mimetreeparser/src/memento/keycachememento.h     [License:
GPL(v2.0+)]
M  +55   -16   mimetreeparser/src/messagepart.cpp
M  +9    -1    mimetreeparser/src/messagepart.h

https://invent.kde.org/pim/messagelib/-/commit/938fab622b7eb258f89f9b1492a3a264c260be58

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


More information about the Kdepim-bugs mailing list