lutris / lutris

Lutris desktop client
https://lutris.net
GNU General Public License v3.0
7.75k stars 684 forks source link

Crash on start when importing Half Life Blue Shift from Steam #337

Closed ckorn closed 8 years ago

ckorn commented 8 years ago

There is a crash coming from lutris/util/steam.py

It seems to occur when importing Half Life Blue Shift (appid 130) from my steam library.

Added some debug code to the function:

$ lutris 
steamapps_paths: {'windows': [], 'linux': ['/home/korn/.steam/steam/steamapps', '/media/korn/Data/Steam/steamapps']}
steam_games_in_lutris: [{'steamid': 228280, 'executable': None, 'configpath': u'baldurs-gate-enhanced-edition-1472337434', 'name': u"Baldur's Gate: Enhanced Edition", 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 1, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'baldurs-gate-enhanced-edition'}, {'steamid': 248800, 'executable': None, 'configpath': u'dysfunctional-systems-learning-to-manage-chaos-1472337434', 'name': u'Dysfunctional Systems: Learning to Manage Chaos', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 2, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'dysfunctional-systems-learning-to-manage-chaos'}, {'steamid': 320, 'executable': None, 'configpath': u'half-life-2-deathmatch-1472337434', 'name': u'Half-Life 2: Deathmatch', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 3, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'half-life-2-deathmatch'}, {'steamid': 380, 'executable': None, 'configpath': u'half-life-2-episode-one-1472337434', 'name': u'Half-Life 2: Episode One', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 4, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'half-life-2-episode-one'}, {'steamid': 48000, 'executable': None, 'configpath': u'limbo-1472337434', 'name': u'LIMBO', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 5, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'limbo'}, {'steamid': 400, 'executable': None, 'configpath': u'portal-1472337434', 'name': u'Portal', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 6, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'portal'}, {'steamid': 220, 'executable': None, 'configpath': u'half-life-2-1472337434', 'name': u'Half-Life 2', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 7, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'half-life-2'}, {'steamid': 250820, 'executable': None, 'configpath': u'steamvr-1472337434', 'name': u'SteamVR', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 8, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'steamvr'}, {'steamid': 227300, 'executable': None, 'configpath': u'euro-truck-simulator-2-1472337434', 'name': u'Euro Truck Simulator 2', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 9, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'euro-truck-simulator-2'}, {'steamid': 620, 'executable': None, 'configpath': u'portal-2-1472337434', 'name': u'Portal 2', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 10, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'portal-2'}, {'steamid': 365300, 'executable': None, 'configpath': u'transmissions-element-120-1472337434', 'name': u'Transmissions: Element 120', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 11, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'transmissions-element-120'}, {'steamid': 20920, 'executable': None, 'configpath': u'the-witcher-2-assassins-of-kings-enhanced-edition-1472337434', 'name': u'The Witcher 2: Assassins of Kings Enhanced Edition', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 12, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'the-witcher-2-assassins-of-kings-enhanced-edition'}, {'steamid': 209080, 'executable': None, 'configpath': u'guns-of-icarus-online-1472337434', 'name': u'Guns of Icarus Online', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 13, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'guns-of-icarus-online'}, {'steamid': 264380, 'executable': None, 'configpath': u'narcissu-1st-2nd-1472337434', 'name': u'Narcissu 1st & 2nd', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 14, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'narcissu-1st-2nd'}, {'steamid': 214340, 'executable': None, 'configpath': u'deponia-1472337434', 'name': u'Deponia', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 15, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'deponia'}, {'steamid': 420, 'executable': None, 'configpath': u'half-life-2-episode-two-1472337434', 'name': u'Half-Life 2: Episode Two', 'runner': u'steam', 'lastplayed': None, 'installer_slug': None, 'updated': None, 'id': 16, 'platform': None, 'year': None, 'directory': None, 'parent_slug': None, 'installed': 1, 'slug': u'half-life-2-episode-two'}]
,steamids_in_lutris: set(['228280', '620', '227300', '420', '264380', '250820', '20920', '209080', '380', '320', '248800', '365300', '400', '48000', '214340', '220'])
appmanifests: ['appmanifest_228280.acf']
steamid: 228280
appmanifests: ['appmanifest_248800.acf', 'appmanifest_320.acf', 'appmanifest_380.acf', 'appmanifest_48000.acf', 'appmanifest_400.acf', 'appmanifest_220.acf', 'appmanifest_250820.acf', 'appmanifest_227300.acf', 'appmanifest_620.acf', 'appmanifest_365300.acf', 'appmanifest_20920.acf', 'appmanifest_209080.acf', 'appmanifest_264380.acf', 'appmanifest_214340.acf', 'appmanifest_420.acf', 'appmanifest_130.acf', 'appmanifest_70.acf', 'appmanifest_50.acf', 'appmanifest_550.acf', 'appmanifest_243730.acf', 'appmanifest_8870.acf', 'appmanifest_215160.acf']
steamid: 248800
steamid: 320
steamid: 380
steamid: 48000
steamid: 400
steamid: 220
steamid: 250820
steamid: 227300
steamid: 620
steamid: 365300
steamid: 20920
steamid: 209080
steamid: 264380
steamid: 214340
steamid: 420
steamid: 130
appmanifest_path: /media/korn/Data/Steam/steamapps/appmanifest_130.acf
Traceback (most recent call last):
  File "/usr/games/lutris", line 208, in <module>
    lutris.run(int(time.time()))
  File "/usr/lib/python2.7/dist-packages/lutris/util/service.py", line 31, in run
    self.lutris_window = LutrisWindow(service=self)
  File "/usr/lib/python2.7/dist-packages/lutris/gui/lutriswindow.py", line 180, in __init__
    steam.sync_with_lutris()
  File "/usr/lib/python2.7/dist-packages/lutris/util/steam.py", line 278, in sync_with_lutris
    'slug': appmanifest.slug,
  File "/usr/lib/python2.7/dist-packages/lutris/util/steam.py", line 366, in slug
    return slugify(self.name)
  File "/usr/lib/python2.7/dist-packages/lutris/util/strings.py", line 11, in slugify
    value = value.decode('UTF-8')
AttributeError: 'NoneType' object has no attribute 'decode'

This is the file content:

"AppState"
{
    "appID"     "130"
    "Universe"      "1"
    "StateFlags"        "4"
    "installdir"        "Half-Life"
    "LastUpdated"       "1377116081"
    "UpdateResult"      "0"
    "SizeOnDisk"        "302051795"
    "buildid"       "68746"
    "LastOwner"     "76561197966976645"
    "BytesToDownload"       "181233520"
    "BytesDownloaded"       "181233520"
    "AutoUpdateBehavior"        "0"
    "UserConfig"
    {
        "name"      "Half-Life: Blue Shift"
        "GameID"        "130"
        "Installed"     "1"
        "appinstalldir"     "/media/korn/Data/Steam/SteamApps/common/Half-Life"
        "Language"      "english"
    }
    "MountedDepots"
    {
        "130"       "7101365121012669019"
    }
    "SharedDepots"
    {
        "3"     "70"
        "1"     "70"
        "8"     "70"
        "96"        "70"
    }
}
ckorn commented 8 years ago

Ok, as I see this was already fixed by 7d4e30072ca626847750cc62b53108bb3c50ad10 .

Unfortunately, it did not make it in the 0.3.8 release.

RobLoach commented 8 years ago

Would love a 0.3.9.

strycore commented 8 years ago

It can happen, there are a few things left to do before 0.4.0 is ready. Any stuff we should backport?

strycore commented 8 years ago

That said, if we release a 0.3.9 then 0.4.0, it would send the wrong message to people who do not understand how version numbers work. We should try to ship 0.3.9 and 0.3.10 after that :D

RobLoach commented 8 years ago

Yeah, better to just wait, or slim down 0.4.0 so it comes sooner :wink:

strycore commented 8 years ago

Well, 0.4.0 is basically 0.3.8 in Python 3 + the RetroArch runner. I wanted to land a few extra features but those can be postponed to 0.4.1. I just need extra testing on the whole projects, just like is was brand new because the Python 2 to 3 port might have introduced new bugs.