https://bugs.kde.org/show_bug.cgi?id=492444
Christoph Cullmann <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|https://invent.kde.org/fram |https://invent.kde.org/fram |eworks/sonnet/-/commit/4027 |eworks/sonnet/-/commit/5aca |9f200789708cc045ba02a4cf53a |21f2810758b9291db4dc0c0628f |981aa2225 |4c530ded0 --- Comment #3 from Christoph Cullmann <[email protected]> --- Git commit 5aca21f2810758b9291db4dc0c0628f4c530ded0 by Christoph Cullmann, on behalf of Espen Sandøy Hustad. Committed on 05/10/2025 at 14:50. Pushed by cullmann into branch 'master'. Ensure parent is alive when removing eventfilters Scenario 1: The QTextEdit/QPlainTextEdit parent of the SpellCheckDecorator is destroyed. In that case the q pointer of SpellCheckDecoratorPrivate, m_textEdit, and m_plainTextEdit are already invalid when the SpellCheckDecoratorPrivate destructor are called. This leads to memory corruption when trying to remove eventfilters on the already invalid m_textEdit and m_plainTextEdit. Below are output from a small sample program with QDebug statements in all destructors. TextEdit destructor SpellCheckDecorator destructor SpellCheckDecoratorPrivate destructor corrupted double-linked list Aborted (core dumped) ./scenario1 Scenario 2: The SpellCheckDecorator is destroyed while the parent QTextEdit/QPlainTextEdit lives on. In this case it probably makes sense to remove the event filters, but this should be done while the q pointer is still valid. Without this patch Trojitá crashes when exiting the mail composer when using the Sonnet spellchecker plugin. M +19 -2 src/ui/spellcheckdecorator.cpp https://invent.kde.org/frameworks/sonnet/-/commit/5aca21f2810758b9291db4dc0c0628f4c530ded0 -- You are receiving this mail because: You are watching all bug changes.
