Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up CGameID param on more old Steam interface versions #8375

Open
wants to merge 2 commits into
base: proton_9.0
Choose a base branch
from

Conversation

psychonic
Copy link

@psychonic psychonic commented Jan 6, 2025

This addresses most or all of #2249, applying the same fix for lsteamclient's InitiateGameConnection in 008 of ISteamUser to the 005, 006, 007, and 009 versions of the interface. Disassembly shows the same compiler optimization is present on these as well, which is consistent with the issues reported. Newer versions of this interface dropped the CGameID parameter and are implicitly unaffected. Version 004 has a CGameID parameter, but it doesn't appear to perform the same dereferencing. Without the fix, calls to ISteamUser::InitiateGameConnection on the affected interface versions most frequently lead to a crash, or at best, authentication will just fail, quickly leading to a disconnect. In testing with the fix, a crash no longer occurred on server connection in NEOTOKYO (Steam app 244630), a Source SDK 2006 mod. The crash is reproducible on Proton 9.0-4.

Edit: Per my findings on that same issue, here - The same fix is also applied to all of the ISteamUsersStats001 and 002 interface functions. I admit that I didn't manually check every function on every version of those two very old (pre-1.00) interface versions, but they all have a first parameter of CGameID, and the 12 or so function versions I didn't at did have the dereferencing issue present. In testing, this fixed the startup crash reported in that issue with the mod version of Black Mesa on Source SDK 2007. I also confirmed that the achievements panel opened and displayed properly.

This is my first contribution to this repo, so please let me know if I missed anything required. I didn't see any contributing guidelines.

For reference, #2249 (comment)

Part of the original issue reported here, creating/joining servers on Source 2007 mods, was fixed a couple of years ago, in cd60b70

I'm not sure about the achievements issue. There may still be a problem there, judging by ISteamUserStats crash still being reported in #2249 (comment) earlier this year.

There are other reports in this thread citing the same or similar issues in Source 2006 mods. Part of that is because the server connect fix for the Source 2007 mods was only applied for the specific version of the ISteamUser interface that they target. However, the version targeted by Source 2006 mods, as well as a couple of other versions of the interface are also affected by the same issue.

@psychonic psychonic changed the title Fix up ISteamUser::InitiateGameConnection CGameID param on more versions Fix up CGameID param on more old Steam interface versions Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant