Bug 389119 - segfault when switching to unscanned partition
Summary: segfault when switching to unscanned partition
Status: RESOLVED FIXED
Alias: None
Product: filelight
Classification: Applications
Component: general (show other bugs)
Version: 17.12.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
: 404840 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-17 16:21 UTC by Jan Wiele
Modified: 2019-03-12 09:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (3.07 KB, text/x-log)
2018-01-17 16:21 UTC, Jan Wiele
Details
Full backtrace with log (17.81 KB, text/plain)
2018-07-11 12:29 UTC, Janus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Wiele 2018-01-17 16:21:34 UTC
Created attachment 109942 [details]
backtrace

When I open filelight (17.12.1) and select / for scanning everything is fine. 

When I then want to scan /home by entering the path into the textfield in the top right and start the scan with <enter>, filelight crashes. 

Scanning /home right at the start works fine.

I have attached a backtrace.
Comment 1 Janus 2018-07-11 12:29:29 UTC
Created attachment 113887 [details]
Full backtrace with log

I have attached full backtrace. Filelight and qt5 had been compiled with debug symbols.
Comment 2 Christoph Feck 2018-08-02 20:03:40 UTC
I get no crash when selecting a different partition via the URL textline, but just an empty "0B" circle. Then hitting "Rescan" works.
Comment 3 Harald Sitter 2019-03-04 16:12:34 UTC
Git commit 4cc7c44589f07f0f5294f8ed6f0b71d20699cd1e by Harald Sitter, on behalf of Szymon Janus.
Committed on 04/03/2019 at 16:12.
Pushed by sitter into branch 'Applications/18.12'.

Fix use after free in RadialMap::Widget::invalidate()

Summary:
Emit aboutToEmptyCache to invoke RadialMap::Widget::invalidate(),
so folder can be safely deleted.

If "Scan across system boundaries" isn't set and there is mountpoint B
contained in another mountpoint A, user may trigger segfault if scan of
A and then B is requested. It is caused by call of MainWindow class to
m_map->invalidate() method, which is invoked after m_map's m_tree member
is deleted during ScanManager::start method.

This fix causes that RadialMap::Widget::invalidate() is called twice in
fact, however second call is fine, because "invalidate" is guarded by
"isValid" method.

Reviewers: sitter, sandsmark

Reviewed By: sitter

Subscribers: kde-utils-devel

Differential Revision: https://phabricator.kde.org/D11188

M  +1    -0    src/scan.cpp

https://commits.kde.org/filelight/4cc7c44589f07f0f5294f8ed6f0b71d20699cd1e
Comment 4 Christoph Feck 2019-03-12 09:46:56 UTC
*** Bug 404840 has been marked as a duplicate of this bug. ***