UncleGoogle / galaxy-integration-humblebundle

Humble Bundle integration for GOG Galaxy 2.0
GNU General Public License v3.0
187 stars 18 forks source link

Plugin crashes when scanning installed game with many files #118

Closed waden34 closed 4 years ago

waden34 commented 4 years ago

If I don't have any watch folders set, the plugin works great. As soon as I add a folder to watch for installed games, the plugin crashes. There is no error logged, the plugin just crashes. The last line logged is the following, which leads me to believe it is due to the + in the game name.

2020-05-22 14:38:11,888 - root - INFO - found close (0.8) matches for AI War Fleet Command: ['AI War: Fleet Command+3 DLCs']

I am running on Windows 10, and the folder that actually exists for that game is \wadenas\multimedia\Games\AI War Fleet Command

I've attached my latest log.

plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a.log

UncleGoogle commented 4 years ago

Hi @waden34, thanks for report.

I doubt + char is the real reason. Cold log is strange. Maybe a bug inside a logger call?

How it crashes exactly? Just red text in Galaxy that "Plugin has crashed Retry", hm? Can you also attach GalaxyClient.log just after it happens? Maybe something useful is there.

Does it happen every time? Have it worked previously for Z:/Games or any other directory? Can you recheck by moving AI War Fleet Command game dir out of wadenas/multimedia/Games?

One more question:

2020-05-22 14:37:54,726 - settings - INFO - Loaded config: {'library': {'sources': ['trove', 'drm-free'], 'show_revealed_keys': False}, 'installed': {'search_dirs': ['Z:/Games']}}
2020-05-22 14:37:55,195 - settings - INFO - InstalledSettings has changed: {'search_dirs': ['\\\\wadenas\\multimedia\\Games']}

Is it a network drive or some kind of unix-like alias for C:\Users dir?

waden34 commented 4 years ago

Hi @UncleGoogle,

The crash happens every time on that one game. I do just get the red text: Plugin has crashed.

Z:/Games is a mapped network drive to a folder on my NAS: \wadenas\multimedia\games

I removed that game folder and the plugin seems to be working fine now. All other games I have installed are found correctly and Galaxy is updated. It's been running for 15 minutes without crashing so far, which is 5 times longer than previously.

I attached the plugin log and the Galaxy Client log from right after the last crash.

plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a.log GalaxyClient.log

UncleGoogle commented 4 years ago

I've added more logs. Can you try again with this and upload logs? more_logs.zip

install instruction are in readme

waden34 commented 4 years ago

Thanks, Here are the new logs.

plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a.log

GalaxyClient.log

UncleGoogle commented 4 years ago

Ok, I see where is the problem. Scanning lasts too long and Galaxy kills the plugin as unresponsive. Probably this game contains many small files. Try this: scan_fix.zip

I've disabled scanning all folders, just leaving the game root, so any executable that is deeper won't be found. I'm not sure it is good idea though, will have to check on mac if games there have executables in the root. or maybe 2 levels deep would be enough??

Please tell me if it works for you and if plugin detects the same amount of installed games like previously (of course without AI War Fleet Command)

waden34 commented 4 years ago

That game does have a ton of image files, so that makes sense.

I had one game in a sub-folder inside the game folder so it didn't find it. Once I moved it up, it seems to be finding all the games I have installed.