otavepto / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
183 stars 51 forks source link

Arkham Asylum crash on challenge/DLC map exit (appid 35140) #192

Closed StormStrK closed 3 weeks ago

StormStrK commented 1 month ago

Hello again,

I'd like to report some weirdness. The game will crash whenever you exit one of the challenges or dlc Maps. For example the "totally insane" dlc map. Last working experimental Goldberg version I found was 0.2.5 from 2019.

This is only when using the experimental dll replacement. The cold client works without issue. Attaching a log just in case. STEAM_LOG.txt

Good day.

otavepto commented 1 month ago

The game is seriously keen on calling Steam_User::GetAvailableVoice() non-stop. Might be a missing callback or call result. Or it's expecting the opposite of the current implementation (API success or failure), I'll see what that API was returning back in 0.2.5

It could something completely different though, who knows.

otavepto commented 1 month ago

If you have time, could you also post a debug log from the working client loader. Maybe it would help to see what the game is trying to call when it actually works.

StormStrK commented 1 month ago

Edit: Sorry didn't see your message above, will try to get that log.

The Eventlog has some other data, not sure if this helps.

Faulting application name: ShippingPC-BmGame.exe, version: 1.1.1.0, time stamp: 0x52178ad2 Faulting module name: steam_api.dll, version: 8.33.9.23, time stamp: 0x66312bab Exception code: 0xc0000409 Fault offset: 0x0027379d

Quick Question: Want to make this quick so I don't derail the thread but I'm experiencing consistent crashing on Arkham Knight, maybe I should open another ticket for that one but I don't have the game installed anymore. I was able to completely solve the crashes by deleting what (if I remember correctly) was a leaderboard folder on the game's GSE save folder. Is there a command to prevent the emu from creating that folder? Not sure if the disable_leaderboards_create_unknown helps with that.

StormStrK commented 1 month ago

Here's the cold client log. STEAM_LOG.txt

I performed the same actions and exit the game normally after. I noticed that the game autosaves every-time you exit the challenge map so could be related to that maybe?

Also noticed a different value for the getstat entry between the client and the experimental but I'm not sure if that's relevant or abnormal.

StormStrK commented 1 month ago

Update: Just want to report that the exact same crash is present on Batman Arkham City challenges. It is resolved with the cold client and works on the old experimental. Probably both games handle the API in the exact way there. Log from crashing experimental attached, looks similar to the other game: STEAM_LOG.txt

otavepto commented 1 month ago

Some random thoughts, what I doubt is that the game might be verifying the .dll, in the logs it seems to exit cleanly, games that crash unintentionally will never get a chance to call Shutdown(), but this game will eventually call it. That contradicts with the statement that older emu version 0.2.5 works fine by dll replacement. In all cases Steam_User::GetAvailableVoice is spammed a lot in bad and good cases, so it's not really an indication.

@StormStrK Regarding ShippingPC-BmGame.exe and the leaderboard folder, what happens when you open any leaderboard in the game ? does that crash it ?

Also steam_interfaces.txt seems awfully similar in both games, did you generate it properly for each game or did you copy the file from one game to another ? If you're not sure, drag and drop the original dll onto generate_interfaces.exe and compare the output file with what you have. Cold Client doesn't care about that file, and since it works over dll replacement, I'm skeptical about it.

StormStrK commented 1 month ago

Hey, One thing I find interesting is that the first game can be run without emu by using -nosteam command line. The game seems to work fine but the challenge maps do crash the game so whatever it's doing with those maps probably need steam to be properly emulated. Dll replacement via the old 0.2.5 emu as well as current cold client seem to handle whatever it is just fine. They must have something in common that the current experimental does differently because the crashes are 100% consistent.

Regarding the interfaces I always generate them manually using the generate_interfaces.exe. The same txt file works with the old 0.2.5 emu I just had to move it to a different location (next to the exe) I typically keep it on the steam_settings folder on the new versions. And yeah the txt file is identical for both games as are the steam_api.dll files when checked against steamdb sha1.

Regarding the leaderboard folder, that is for a different game, Arkham Knight. I don't currently have it installed to troubleshoot unfortunately. What happened is that the game randomly crashed once while I was driving around, then when I attempted to open the game again it always crashed at the main menu consistently. I reinstalled the game and the problem persisted which means it's probably something on a config or save file. I noticed the game was checking for leadeboards on-screen everytime it crashed at the menu so I went into the GSE folder for the game, noticed a leadeboard folder and decided I would delete it to see if that was related and yes this fixed the problem. But I didn't play long to see if the game will recreate it at some point.

If you think it's worth looking into I can open another thread for that game and provide some logs once I get a chance to reinstall it. So as not to derail this one.

otavepto commented 1 month ago

Yeah I'd definitely appreciate if you opened a new issue for the leaderboards problem, this seems another legit problem with the emu that should be solved. Whenever I have the game I'll look into it, I know this will be annoying to debug since the game isn't throwing an exception ironically 😄

HuggedJacker commented 1 month ago

I also have this issue with my install of arkham asylum, so i can confirm that it isn't just OP who's experiencing it.

otavepto commented 3 weeks ago

found the problem, game is calling SteamGameServer_Shutdown() but it's a client not a gameserver. with cold client loader the actual api will filter out this call, with dll replacement the emu should've been doing the same, but that wasn't the case. old v0.2.5 works because it barely has any code for the shutdown, but later releases won't work.