[dolphin] [Bug 479596] Dolphin crashes after terminal is closed with "exit" and Dolphin is then closed

Akseli Lahtinen bugzilla_noreply at kde.org
Wed Jan 10 09:22:50 GMT 2024


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

Akseli Lahtinen <akselmo at akselmo.dev> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REPORTED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/syst
                   |                            |em/dolphin/-/commit/1a59905
                   |                            |027e578e396216b1f11831c80ec
                   |                            |87db4f

--- Comment #1 from Akseli Lahtinen <akselmo at akselmo.dev> ---
Git commit 1a59905027e578e396216b1f11831c80ec87db4f by Akseli Lahtinen.
Committed on 10/01/2024 at 10:22.
Pushed by akselmo into branch 'master'.

terminalpanel.cpp: Set m_konsolePart to nullptr during exit signal

If Dolphin terminal is open, and one types `exit` there and then closes
Dolphin, Dolphin crashes due to a dangling pointer.

Konsole KPart is deleting itself when Konsole session exits, but Dolphin tracks
it as a child of the Terminal Panel. 
The Terminal Panel doesn't get destroyed when Konsole KPart does, and it tries
to double free during children clean up.
(Thanks @sitter !) 

Setting `m_konsolePart` to `nullptr` during exit signal fixes this, since there
is already check in place for that in the destructor.

M  +1    -0    src/panels/terminal/terminalpanel.cpp

https://invent.kde.org/system/dolphin/-/commit/1a59905027e578e396216b1f11831c80ec87db4f

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list