Matoking / protontricks

A wrapper that does winetricks things for Proton enabled games, requires Winetricks.
GNU General Public License v3.0
1.66k stars 36 forks source link

Protontricks --gui crashes, but commands without argoments work fine. #110

Closed ThoriumTextile closed 3 years ago

ThoriumTextile commented 3 years ago

Describe the bug When invoking protontricks --gui the program crashes and spits out a report of the crash. (this happens with both the distro, pipx and development version)

To Reproduce Steps to reproduce the behavior:

  1. Run command protontricks --gui
  2. Command fails and error is displayed

Expected behavior protontricks should run the gui with zenity without any further issue (like winetricks).

System (please complete the following information):

Additional context

Crash output:

Traceback (most recent call last):
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/vdf/__init__.py", line 131, in parse
    line += next(fp)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gabri/.local/bin/protontricks", line 8, in <module>
    sys.exit(main())
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/protontricks/cli.py", line 180, in main
    steam_apps = get_steam_apps(
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/protontricks/steam.py", line 916, in get_steam_apps
    steam_app = SteamApp.from_appmanifest(
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/protontricks/steam.py", line 208, in from_appmanifest
    required_tool_appid = _get_required_tool_appid(install_path)
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/protontricks/steam.py", line 236, in _get_required_tool_appid
    tool_manifest = lower_dict(vdf.loads(tool_manifest_content))
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/vdf/__init__.py", line 203, in loads
    return parse(fp, **kwargs)
  File "/home/gabri/.local/pipx/venvs/protontricks/lib64/python3.9/site-packages/vdf/__init__.py", line 134, in parse
    raise SyntaxError("vdf.parse: unexpected EOF (open key quote?)",
  File "<StringIO>", line 1

SyntaxError: vdf.parse: unexpected EOF (open key quote?)
Matoking commented 3 years ago

Looks like one of the toolmanifest.vdf files might be corrupted. I uploaded a small change that prints the path to the corrupted VDF file in the corrupted_vdf branch. You can install it using pipx using the following command:

$ pipx install --force git+https://github.com/Matoking/protontricks.git@corrupted_vdf

You should now be able to run the command again, which should cause a message like this to be printed:

OSError: VDF file at /home/matoking/.steam/steam/steamapps/common/Proton 5.0/toolmanifest.vdf is corrupted

Could you run the command and post the content of the corresponding file? There is also a chance that verifying the installation of the app can fix the issue (right click the app/game in Steam library -> Properties -> Local files -> Verify integrity of tool files...).

ThoriumTextile commented 3 years ago

Could you run the command and post the content of the corresponding file? There is also a chance that verifying the installation of the app can fix the issue (right click the app/game in Steam library -> Properties -> Local files -> Verify integrity of tool files...).

Somehow veryfing the integrity of proton experimental fixed it. Do you still need the command's output? Actually, the gui works fine but it warns me about "bwrap" I'm not sure if it matters, but i'm using proton-ge-custom.

Matoking commented 3 years ago

The bwrap warning can be safely ignored if everything works fine. I added the warning to ensure that bugs related to bwrap would be reported, but I haven't received bug reports related to it in a while. I might remove the warning in the future once it seems that things have stabilized enough.

As for the crash in this issue, I've updated Protontricks to print more helpful messages when similar errors happen in the future, so I'm closing this issue for now. Thanks for the help!