From 494311e8df4acce43adc2de1a60b663f43f750e5 Mon Sep 17 00:00:00 2001 From: u-alexandru Date: Tue, 7 Jul 2026 12:08:40 +0300 Subject: [PATCH 1/3] fix: prevent stuck launch dialog when history file is missing update_history_file() opened dzg.history in read mode without handling a missing file. dzg.history is only created the first time it is written, so on a fresh install the very first server connection raised FileNotFoundError inside the post-launch cleanup callback: _destroy_on_idle -> _add_to_history_and_return -> update_history_file The exception propagated out of the GLib idle callback before destroy_dialog() ran, orphaning the "Waiting for DayZ to launch" modal so it could never be closed from the UI and its Cancel button was unresponsive. Treat a missing history file as an empty history so the first connection records history normally instead of crashing the cleanup callback. --- dzgui/managers/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dzgui/managers/config.py b/dzgui/managers/config.py index 7c87b3f..d2bdb87 100644 --- a/dzgui/managers/config.py +++ b/dzgui/managers/config.py @@ -55,8 +55,11 @@ class ConfigManager: self.update_config(Preferences.IP_LIST, ips) def update_history_file(self, fqip: str) -> None: - with open(self.prefs.paths.history, "r") as f: - ips = [line.rstrip() for line in f.readlines()] + try: + with open(self.prefs.paths.history, "r") as f: + ips = [line.rstrip() for line in f.readlines()] + except FileNotFoundError: + ips = [] seen = set() ips.append(fqip) From a2a39e9927bb5bc08a714dcb63a2cc3da653c0bb Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 12 Jul 2026 10:15:58 +0900 Subject: [PATCH 2/3] fix: backport fixes from feat/shortcuts --- dzgui/api/steam.py | 47 +++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index 21acd26..37bf569 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -15,6 +15,7 @@ from dzgui.const.constants import ( APPID_DAYZ, APPID_DAYZ_EXP, APP_NAME, + DAYZ_BINARY, DEBIAN_STEAM_PATH, DEFAULT_STEAM_PATH, FLATPAK_STEAM_PATH, @@ -309,21 +310,25 @@ def get_running_app() -> int | None: PROC_NAME = "steam" SUBPROC_NAME = "reaper" FLAG = "AppId" - - for proc in psutil.process_iter(): - if proc.name() == PROC_NAME: - subprocs = proc.children() - filtered = (proc for proc in subprocs if proc.name() == SUBPROC_NAME) - try: - proc = next(filtered) - except StopIteration: - return None - args = proc.cmdline() - appid = (row for row in args if FLAG in row) - try: - return int(next(appid).split("=")[1]) - except StopIteration: - return None + # NOTE: may cause conflicts if multiple apps are running + try: + for proc in psutil.process_iter(): + if proc.name() == PROC_NAME: + subprocs = proc.children() + filtered = (proc for proc in subprocs if proc.name() == SUBPROC_NAME) + try: + proc = next(filtered) + except StopIteration: + return None + args = proc.cmdline() + appid = (row for row in args if FLAG in row) + try: + return int(next(appid).split("=")[1]) + except StopIteration: + return None + except Exception as e: + logger.debug(e) + return None return None @@ -368,8 +373,16 @@ def get_client_allows_downloads(path: Path) -> bool: def is_dayz_running() -> bool: - appid = get_running_app() - return appid in (APPID_DAYZ, APPID_DAYZ_EXP) + """Subprocesses spawned from Steam will not show up in regular process tree""" + procs = [] + substring = DAYZ_BINARY + for proc in psutil.process_iter(): + try: + procs.append(proc.cmdline()) + except Exception as e: + logger.warning(e) + continue + return any(substring in item for sublist in procs for item in sublist) def get_app_path(folders_path: Path, appid: int) -> Path: From 1760e6e92820ecef4249b916632a31e2e904f1d5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 12 Jul 2026 10:21:06 +0900 Subject: [PATCH 3/3] chore: cleanup --- dzgui/api/steam.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index 37bf569..02f4718 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -39,19 +39,16 @@ logger = logging.getLogger(APP_NAME) class AppNotInstalledError(Exception): """App not present in user's libraryfolders""" - pass class AppMovedError(Exception): """VDF points to a nonexistent location on disk""" - pass class VDFLoadError(Exception): """Malformed VDF or JSON conversion""" - pass @@ -328,7 +325,6 @@ def get_running_app() -> int | None: return None except Exception as e: logger.debug(e) - return None return None