| Summary: | Juk crashed while deleting playlists | ||
|---|---|---|---|
| Product: | [Applications] juk | Reporter: | Tony <jodr666> |
| Component: | general | Assignee: | Scott Wheeler <wheeler> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | mpyne |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/juk/e8c2dbbfce00765335d079bca86abc7e2147f3e6 | Version Fixed/Implemented In: | 17.12.2 |
| Sentry Crash Report: | |||
|
Description
Tony
2018-01-18 19:47:44 UTC
Thanks for the report and the detailed backtrace. I think this is due to some kind of race condition. It's been awhile since I have been through this code but it seems to me that when we're updating the playlists after removing some of the music tracks, the list of "siblings" in a dynamic playlist (which happens when multiple playlists are selected in JuK) can be cached (at dynamicplaylist.cpp:155) and then only when the event loop begins again will those cached siblings be used. But the events being handled in between in the event loop may delete items in that cached list, leading to a crash later when it comes time to actually delete them. Git commit e8c2dbbfce00765335d079bca86abc7e2147f3e6 by Michael Pyne. Committed on 19/01/2018 at 03:18. Pushed by mpyne into branch 'Applications/17.12'. Immediately update dynamic/search playlist items upon a change. This is as opposed to recording the new list of PlaylistItems and then effecting the change after draining the event loop (an attempt at keeping GUI responsive if many updates are happening). Otherwise it is possible to - Generate a list of PlaylistItems to read from (when updating the playlist) and push to end of event loop - Delete some of those PlaylistItems due to already-queued events to delete playlist items - Finally try to use the list of PlaylistItems and run into a segfault from trying to access a deleted PlaylistItem. I think this should fix a crash when you delete multiple playlists. FIXED-IN:17.12.2 M +3 -5 dynamicplaylist.cpp https://commits.kde.org/juk/e8c2dbbfce00765335d079bca86abc7e2147f3e6 |