HGL
Heroic Games Launcher•12mo ago
national-gold

[HEROIC BUG] Uninstall a game whose folder has been deleted cause an error and block the app

Hello Heroic Launcher Team, I would like to share with you an uninstallation error. I'm on the Flatpak version of Heroic, and when I uninstall a game that I manually added and whose folder has been deleted, it displays an error message and the app is blocked. You will find a screenshot of the error and the last logs attached to this message. Thank you in advance!
6 Replies
CommandMC
CommandMC•12mo ago
Hey there, I've looked for the cause of this issue a couple times now, and I was unable to find anything yet. It did happen to me in the past as well, but I cannot reproduce it consistently at all. Perhaps it's caused by older Heroic versions doing something wrong? FWIW, you can hit Ctrl + R to reload Heroic, which at least gets you out of this crash state
national-gold
national-goldOP•12mo ago
Ow, thank you for your quick response ! I noted the Ctrl+R tip, it's quite logical when I think of it. 😅 I think my Heroic is up to date, but to be sure, here is my version : Software Versions: Heroic: 2.14.1 Flame Emperor Sabo Legendary: 0.20.34 Direct Intervention gogdl: 1.0.1 Nile: 1.0.2 Jonathan Joestar As for the bug, could it be that it is trying to access a file that was deleted with the game folder entire deletion ?
CommandMC
CommandMC•12mo ago
Alright, seems to have got it now ...and it's a race condition caused by a very hard-to-fix issue
national-gold
national-goldOP•12mo ago
Okay, fortunately, it's not a disabling bug, and it occurs with specific conditions 🙂 It's hard to fix because it implies multiple other processes ?
CommandMC
CommandMC•12mo ago
The problem here is that the game card of the game you're currently uninstalling is rendered before the whole library refreshes, so it tries to request game information about the game you've just uninstalled. We don't have the info anymore, so you get an empty object {}. The game card then tries to read the platform from there, fails, and causes this crash (it tries to access gameInfo.install.platform, gameInfo.install is already undefined, and trying to read a property from undefined raises an exception) The proper solution is making game infos truly nullable (returning null instead of {}), which would involve a lot of changes basically everywhere. We could however cheat a little, since the Frontend (everything you see) can already handle this, so we could do that only if the Frontend is requesting info I've now opened #3818 to implement the above change Sidenote: That's gotta be the longest description I've ever written for basically a one-line change
national-gold
national-goldOP•12mo ago
Okay I understand, glad it was not so hard to fix 😄

Did you find this page helpful?