massimilianodelliubaldini / galaxy-integration-rpcs3

GOG Galaxy 2.0 Integration with RPCS3
MIT License
22 stars 6 forks source link

Plugin has crashed. Retry. #12

Closed Eremeir closed 4 years ago

Eremeir commented 4 years ago

Before 0.5, I wasn't able to import games, since 0.5, my plugin crashes on startup. Devita submod was installed and I did everything in the installation section. Can't figure it out.

All of the logfiles are filled with loops of File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\streams.py", line 339, in drain File "C:\Users\Eremeir\AppData\Local\GOG.com\Galaxy\plugins\installed\rpcs3_80F9D16B-5D72-4B95-9D46-2A1EF417C1FC\galaxy\task_manager.py", line 17, in task_wrapper result = await coro

No problems in any other plugins, even pcsx2.

plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.log

massimilianodelliubaldini commented 4 years ago

I can't duplicate your issue, but I wonder if there is something you can try for me. I'm curious to know if using the latest version of the GOG API fixes your issue since they made some updates to the task_manager.py module, or at least makes the issue more readily apparent.

Download a zip of the GOG API and unpack it to a temporary folder.

Copy the tests folder and overwrite the tests folder in rpcs3_80F9D16B-5D72-4B95-9D46-2A1EF417C1FC. Then copy the src/galaxy folder and overwrite the galaxy folder in rpcs3_80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.

Then try connecting the plugin in GOG, and if it still fails, upload your log. Please also include the GalaxyClient.log file as well.

Eremeir commented 4 years ago

Okay, that made progress. log0 now is coherent and references my games, but still nothing shows up in the library. A few logs are still in the stream of await coro. Plugin still crashes on startup.

plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.log

[plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.log.zip] Galaxy log in zip with coro logs. (https://github.com/mpm11011/galaxy-integration-rpcs3/files/3644680/plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.log.zip)

massimilianodelliubaldini commented 4 years ago

Try updating the plugin to version 0.6 and see if that fixes your issue. There were a lot of typos/bugs/logic errors that I squashed so we're gonna see if that did the trick.

Eremeir commented 4 years ago

Sadly, it still crashes on startup. Only difference I notice this time is that when connecting from scratch, it doesn't open any popup about what the plugin is capable of, install, achievements, playtime etc, and instead instantly crashes.

plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.log.zip

Logs look the same to me, which is surprising.

I downgraded myself to .41 for a sanity check, and while games don't import, the plugin successfully loads, popup included. plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.zip

massimilianodelliubaldini commented 4 years ago

So the plugin fails at trying to get the capabilities of the plugin, with an error code that gog's API defines as "connection aborted."

I think I need to reach out to gog and see what could be causing that.

In the meantime, you could try some basic troubleshooting to make sure the problem isn't simpler than we think.

Eremeir commented 4 years ago

To clarify, bullet point 2 won't untag games or remove art, would it?

massimilianodelliubaldini commented 4 years ago

You mean user tags or custom art? I'm not sure. I know the art is cached in a separate folder, but I don't know if a plugin would retain that knowledge if it is unplugged, so to speak.

Disconnecting a plugin will remove those games from your library so you won't see them again until you reconnect it. So far I haven't had an issue with the games reappearing, but obviously YMMV.

Eremeir commented 4 years ago

I've got a library of over 1824 games, so I'm hesitant to disconnect plugins if I plan on cold booting galaxy. Don't want to retag or re-assign cover art - if that's even a risk that exists.

But after reinstalling the plugin several times and comparing differences between my non-crashing instance of .041, I think I've made a breakthrough.

I've managed to make this condition 100% reproducible on my end.

On version 0.41, I specified my main directory as this:

self.main_directory = 'C:/Users/Eremeir/Desktop/Shortcuts/Steam Tools/Steam/rpcs3'

The plugin would load normally without crashing, but no games would be retrieved.

on the newest commit and since 0.5, this same directory listing will crash the plugin.

Adding a single backslash to the end of the listing will fix everything, and the plugin will load in with no problem. I'd never noticed or considered this being a problem because the plugin connected fine without it on 0.41. self.main_directory = 'C:/Users/Eremeir/Desktop/Shortcuts/Steam Tools/Steam/rpcs3/'

The plugin no longer crashes on 0.60, but still no games import. I did manage to find interesting errors in the log files though. For whatever reason it keeps trying to find config.yml in a drive that doesn't exist.

FileNotFoundError: [Errno 2] No such file or directory: 'D:/Files/Repositories/rpcs3/bin/config.yml'

image

I've specified my own directory, and the confg.py file is saved. config.yml is in the specified directory too, as well as the .exe, and games.yml. plugin-vision-80F9D16B-5D72-4B95-9D46-2A1EF417C1FC.log

config.zip

massimilianodelliubaldini commented 4 years ago

Color me embarrassed. I could have made this a lot simpler to troubleshoot if I had done a few things.

  1. I should have asked you for your complete config.py, so I could attempt to load it myself one line at a time and see where it went wrong.

  2. It would be trivial to add a forward slash if the main_directory variable your specify doesn't end with one. I can't believe I didn't do that already.

  3. I should point out that the directory you specify needs to be where RPCS3 is actually installed, not just where you have a shortcut to it. That may explain why nothing imports.

  4. I should have the Config class check that the user enters a directory where RPCS3 actually lives, and that it can find all the files it expects to find. If it doesn't find those things, it should throw an error that should be easily recognizable in the logs.

Thanks for sticking with this and figuring it out! I will push some fixes tonight.

Eremeir commented 4 years ago

image I listed the full install directory.

image And then my games are in disc like the quickstart guide instructs

massimilianodelliubaldini commented 4 years ago

Noted. Is BLUS31604 the only PS3 game you have, or are there more? games.yml should have a list.

Eremeir commented 4 years ago

Just that one, and it shows up in games.yml and in a few places in the vision logs. I got interested in PS3 emulation because of this plugin actually.

massimilianodelliubaldini commented 4 years ago

Well, I'm glad it inspired you! But I have bad news. On a hunch, I checked if that game was also flagged as spam by GOG, as myself and a couple other users noticed for other games, and it turns out it is.

https://gamesdb.gog.com/platforms/vision/external_releases/BLUS31604

When GOG flags a game like this, it won't show up in your library (nor anyone else's, I presume). This is something I'm going to have to bring up to GOG, because it's a repeatable issue. It seems that they have to unflag the game by hand, which I can guess is not high on their priorities. But maybe repeated, overzealous flagging is something they will want to know about.

massimilianodelliubaldini commented 4 years ago

Version 0.61 created. This time, if the files we need to run don't exist in the folder the user specifies as main_directory, your log will look much nicer, like this:

2019-09-24 18:45:27,324 - root - DEBUG - Using proactor: IocpProactor
2019-09-24 18:45:27,324 - root - INFO - Using local address: 127.0.0.1:51303
2019-09-24 18:45:27,324 - root - INFO - Creating plugin for platform vision, version 0.6
2019-09-24 18:45:27,324 - root - ERROR - D:\Files\rpcs3\bin\rpcs3.exe not found in RPCS3 directory.
2019-09-24 18:45:27,324 - root - ERROR - D:\Files\rpcs3\bin\games.yml not found in RPCS3 directory.
2019-09-24 18:45:27,324 - root - ERROR - D:\Files\rpcs3\bin\config.yml not found in RPCS3 directory.
2019-09-24 18:45:27,324 - root - INFO - Closing plugin
2019-09-24 18:45:27,324 - root - INFO - Closing JSON-RPC server - not more messages will be read
2019-09-24 18:45:27,324 - root - DEBUG - Task manager plugin internal: creating task 0 (shutdown)
2019-09-24 18:45:27,324 - root - DEBUG - Task manager plugin internal: finished task 0 (shutdown)

I'm going to close this issue as resolved, but if you end up getting other games for RPCS3 and they don't import with this plugin, let me know by filing another issue. Thanks!