[filelight] [Bug 507656] Filelight crash when using smb or sftp

Harald Sitter bugzilla_noreply at kde.org
Sat Aug 2 19:21:07 BST 2025


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

Harald Sitter <sitter at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/util |https://invent.kde.org/util
                   |ities/filelight/-/commit/15 |ities/filelight/-/commit/61
                   |c8385da937047b516fd51eb07be |e4afbb76c491240a9bc1042dc33
                   |c8d9d76ad9e                 |7d5d8c490bf

--- Comment #7 from Harald Sitter <sitter at kde.org> ---
Git commit 61e4afbb76c491240a9bc1042dc337d5d8c490bf by Harald Sitter.
Committed on 01/08/2025 at 10:52.
Pushed by sitter into branch 'release/25.08'.

memory: prefer shared_ptr for qobject + deleteLater on them

introduce a new make_shared_qobject helper that creates a shared_ptr
with deleteLater semantics. this notably improves safety when used as
class members (that may be used in slot invocations) to prevent
use-after-free scenarios.

unique_ptr has the disadvantage that its deleter signature matters to
the type. it results in very noisy code and complicates assignment of
nullptr_ts. shared_ptr meanwhile does not care. as such it seems
preferrable.

this fixes a crash where we deleted the RemoteLister through resetting
it to nullptr in the updateRunning lambda. this would then delete the
kdirlister and its internals, leaving the signal call chain in an
inconsistent state and crashing when returning the call chain to
KCoreDirListerPrivate::CachedItemsJob::done (which was then working with
an already deleted this)


(cherry picked from commit 15c8385da937047b516fd51eb07bec8d9d76ad9e)

Co-authored-by: Harald Sitter <sitter at kde.org>

A  +22   -0    src/memory.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +2    -1    src/radialMap/map.cpp
M  +1    -1    src/radialMap/map.h
M  +4    -3    src/scan.cpp
M  +3    -3    src/scan.h

https://invent.kde.org/utilities/filelight/-/commit/61e4afbb76c491240a9bc1042dc337d5d8c490bf

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


More information about the Unassigned-bugs mailing list