From ce14fc91fb84c51650f57c059396756e1fc3c4cf Mon Sep 17 00:00:00 2001 From: BoiledElectricity Date: Tue, 16 Jun 2026 16:20:02 +0200 Subject: [game_list] fix crash and flashing from the directory watcher (#4099) So the game list watcher could rebuild the content providers (CreateFactories) while the populate worker was still scanning them, and the worker would walk a torn-down RegisteredCache and segfault in OpenFileOrDirectoryConcat. Fixed by stopping and joining the worker before rebuilding. On macOS the watcher also re-armed itself every populate. Re-adding the same paths makes QFileSystemWatcher re-emit directoryChanged (the FSEvent comes in async, so the blockSignals guard misses it), so it just kept refreshing and the list flashed forever. Now it only re-arms when the watched dirs actually changed. Also null-guarded OpenFileOrDirectoryConcat so a torn-down cache cant null-deref there. Related: https://github.com/eden-emulator/Issue-Reports/issues/336 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4099 Reviewed-by: Lizzie Reviewed-by: MaranBr --- src/core/file_sys/registered_cache.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/file_sys/registered_cache.cpp') diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index af41820a36..ebecbaf74f 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -503,6 +503,9 @@ NcaID PlaceholderCache::Generate() { VirtualFile RegisteredCache::OpenFileOrDirectoryConcat(const VirtualDir& open_dir, std::string_view path) const { + if (open_dir == nullptr) { + return nullptr; + } const auto file = open_dir->GetFileRelative(path); if (file != nullptr) { return file; -- cgit v1.2.3