Bug 336521

Summary: filelight crashes when deleting current directory
Product: [Applications] filelight Reporter: maxtram95
Component: generalAssignee: Martin Sandsmark <martin.sandsmark>
Status: RESOLVED FIXED    
Severity: crash CC: maxtram95
Priority: NOR    
Version: 1.20   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Stacktrace

Description maxtram95 2014-06-20 19:53:54 UTC
When I delete current directory in filelight using context menu, it segfaults.

Reproducible: Always

Steps to Reproduce:
1. Scan some directory.
2. After scanning was finished, right-click on current directory (white circle in center) and click Delete.
3. After deleting was finished, filelight crashes with SIGSEGV.
Actual Results:  
Filelight terminates with segmentation fault.

Expected Results:  
Filelight should not crash.
Comment 1 Christoph Feck 2014-07-20 19:34:15 UTC
If the crash still happens with a recent KDE version (4.12.5 or 4.13), please add the backtrace. For more information, see http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 maxtram95 2014-07-20 19:53:58 UTC
Created attachment 87839 [details]
Stacktrace

The stacktrace after segmentation fault.
Comment 3 maxtram95 2014-07-20 19:54:55 UTC
(In reply to Christoph Feck from comment #1)
> If the crash still happens with a recent KDE version (4.12.5 or 4.13),
> please add the backtrace. For more information, see
> http://techbase.kde.org/Development/Tutorials/Debugging/
> How_to_create_useful_crash_reports

My KDE version is 4.13.2, the crash still happens, and I attached the stacktrace.
Comment 4 Martin Sandsmark 2014-07-24 00:01:37 UTC
Git commit 9ae710a82c288c02b82d043a0f6e83bdbbac987b by Martin T. H. Sandsmark.
Committed on 24/07/2014 at 00:00.
Pushed by sandsmark into branch 'master'.

Don't let users delete the current root folder.

This is a kind of a quick fix to avoid crashing when the root is deleted
in memory. A more permanent solution needs to involve updating the cache
when deleting.

M  +5    -3    src/part/radialMap/widgetEvents.cpp

http://commits.kde.org/filelight/9ae710a82c288c02b82d043a0f6e83bdbbac987b
Comment 5 Martin Sandsmark 2014-07-24 00:03:53 UTC
Git commit 1af4660ec0ee84db439dd39d70d7d21991169f78 by Martin T. H. Sandsmark.
Committed on 24/07/2014 at 00:00.
Pushed by sandsmark into branch 'KDE/4.14'.

Don't let users delete the current root folder.

This is a kind of a quick fix to avoid crashing when the root is deleted
in memory. A more permanent solution needs to involve updating the cache
when deleting.

M  +5    -3    src/part/radialMap/widgetEvents.cpp

http://commits.kde.org/filelight/1af4660ec0ee84db439dd39d70d7d21991169f78
Comment 6 Martin Sandsmark 2014-07-24 00:04:11 UTC
Git commit 1ca3a121d496fe20dd2195c3a6d2989929cdb4a2 by Martin T. H. Sandsmark.
Committed on 24/07/2014 at 00:00.
Pushed by sandsmark into branch 'KDE/4.13'.

Don't let users delete the current root folder.

This is a kind of a quick fix to avoid crashing when the root is deleted
in memory. A more permanent solution needs to involve updating the cache
when deleting.

M  +5    -3    src/part/radialMap/widgetEvents.cpp

http://commits.kde.org/filelight/1ca3a121d496fe20dd2195c3a6d2989929cdb4a2
Comment 7 Martin Sandsmark 2014-07-24 00:09:45 UTC
Thanks for the very concise bug report! I didn't have time to fix it "properly" tonight, so I just disabled the ability to delete the folder you're currently in.

I'm not entirely sure what to show when a user has deleted the current folder (go back to the summary screen, maybe).