Skip to content

Commit

Permalink
Handle symbol lookup errors from zenity
Browse files Browse the repository at this point in the history
- This makes it so the launcher will download the runtime platform when zenity fails due to symbol lookups. In the lutris flatpak beta version, the launcher can fail to download the runtime because of zenity failing lookup a symbol. Specifically, this error message: '/app/bin/zenity: symbol lookup error: /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0: undefined symbol: atk_component_scroll_to'
  • Loading branch information
R1kaB3rN committed Mar 19, 2024
1 parent 9515ce4 commit e66679b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ULWGL/ulwgl_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def enable_reaper(env: Dict[str, str], command: List[str], local: Path) -> List[
return command


def enable_zenity(command: str, opts: List[str], msg: str) -> None:
def enable_zenity(command: str, opts: List[str], msg: str) -> int:
"""Execute the command and pipe the output to Zenity.
Intended to be used for long running operations (e.g. large file downloads)
Expand Down Expand Up @@ -188,4 +188,5 @@ def enable_zenity(command: str, opts: List[str], msg: str) -> None:

# Close the Zenity process's standard input
zenity_proc.stdin.close()
zenity_proc.wait()

return zenity_proc.wait()
10 changes: 9 additions & 1 deletion ULWGL/ulwgl_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ def setup_runtime(root: Path, json: Dict[str, Any]) -> None: # noqa: D103
]

msg: str = "Downloading Runtime, please wait..."
enable_zenity(bin, opts, msg)
ret: int = enable_zenity(bin, opts, msg)

log.debug("Exit code returned from zenity: %s", ret)

# Handle the symbol lookup error from the zenity flatpak in lutris
if ret == 127:
raise FileNotFoundError
if ret != 0:
raise
except TimeoutError:
# Without the runtime, the launcher will not work
# Just exit on timeout or download failure
Expand Down

0 comments on commit e66679b

Please sign in to comment.