Fr33dan / GPSaveConverter

Utility to transfer save files between the games installed from the Xbox app and other storefronts. https://ko-fi.com/fr33dan
343 stars 35 forks source link

NullReference Exception when WGS folder exists, but game not in UWP library. #8

Closed At-M closed 2 years ago

At-M commented 2 years ago

Hi,

the program throws a nullpointer/reference when starting and shows a broken thumbnail below Forza Horizon 5

nullpointer

I downloaded the latest release of GPSC, and have no steam folder for forza setup yet, so maybe thats an issue

Fr33dan commented 2 years ago

You will need to run the game from Steam to create the folder so that will be an issue, but that is not the cause of the error shown.

The script that fetchs the UWP package information returns the location of the thumbnail from the Xbox installation. That thumbnail is what is used for the game selection table. Most likely something is going wrong with the parsing of this scripts results resulting in the thumbnail data not being populated. Please use the preferences to change the log level to "Trace" which will then make the GPSC dump the scripts results into the log file, I can use this to debug the problem.

At-M commented 2 years ago

It seems that an old install of Forza Horizon 4 (I can't remember if it was gamepass, demo, crosssave from xbox or just the basic standard edition) bugs out the program.

I've found two "folders" (look like folders but are some kind of file links) in C:\Program Files\WindowsApps, called:

  1. Microsoft.SunriseBaseGame_1.473.411.2_x64__8wekyb3d8bbwe
  2. Microsoft.SunriseBaseGame_2021.630.1925.2neutral~_8wekyb3d8bbwe

after some quick googling, they both refer to FH4, deleting or opening them won't help/work.

There are a few entries in the registry with "Microsoft.SunriseBaseGame", one of them shows the following: fh4sunrise ) so it definitely has something to do with FH4

I haven't tried deleting the regkeys for the "sunrisebasegame" yet though

GPSaveConverter1.log

At-M commented 2 years ago

It seems that simply de-registering the application package with powershell works, now it doesn't throw the error anymore: I guess it deinstalled the game back then, but didnt remove the appxpackage...

Get-AppXPackage Microsoft.SunriseBaseGame | Remove-AppXPackage

the missing icon is gone and no errors are popping up. I'm not sure if you consider this closed, so i'm gonna keep it open for you to judge

Fr33dan commented 2 years ago

Looking at your log file, I was incorrect about the cause in that the parsing is working fine.

There was a directory in your application data folder that contained a WGS folder, but that installation was not registered by UWP and thus not included in the list returned by get-AppxPackage. I've seen this happen if an app is not updated or corrupted.

I'm leaving this open because the handling of this situation should be more graceful to the user.