From be3b78838000be6667e8ae1a012882a39760dfb3 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 21 Oct 2016 11:31:11 -0400 Subject: [PATCH] core/playlists/system: Don't read 6.4.x playlists in new idle tasks Track database defragmenting can happen before the new tasks are ever scheduled, causing a crash when we try to find tracks with changed IDs. After the crash, the Favorites and Hidden playlist data appears to be lost. Signed-off-by: Anna Schumaker --- CHANGELOG | 1 + core/playlists/system.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 72ea356d..ebbf395d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ - Fix showing the first playlist in the list - Fix memory leaks in core/ - Fix theme parsing errors +- Fix crash while reading 6.4.x playlists 6.5.0-rc: - Convert to CMake/CTest diff --git a/core/playlists/system.c b/core/playlists/system.c index 73b42bf8..072c00c2 100644 --- a/core/playlists/system.c +++ b/core/playlists/system.c @@ -422,10 +422,10 @@ static bool __sys_pl_load_new() gchar *name; if (!file_open(&sys_pl_file, OPEN_READ)) { - idle_schedule(IDLE_SYNC, __sys_pl_load, NULL); - idle_schedule(IDLE_SYNC, sys_pl_collection_load, NULL); - idle_schedule(IDLE_SYNC, sys_pl_queued_load, NULL); - idle_schedule(IDLE_SYNC, __sys_pl_update_save, NULL); + __sys_pl_load(); + sys_pl_collection_load(); + sys_pl_queued_load(); + __sys_pl_update_save(); return true; }