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

- Fixes for OnPlayerTeleport hook for linux and linux64 systems #2214

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

MrD4rk5oul
Copy link
Contributor

  • Changed signature call of CanPlayerTeleport for linux/linux64 to current used name
  • Applied fix at detour class CanPlayerBeTeleported to use standard parameter proceedings for linux

Fixes issue #2140

Fix tested on:

  • Linux Mint 21.3, built in Ubuntu 20.04, working properly
  • Windows 10, working properly

  - Changed signature call of `CanPlayerTeleport` for linux/linux64 to current used name
  - Applied fix at detour class CanPlayerBeTeleported to use standard parameter proceedings for linux
Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@psychonic psychonic merged commit 29bff12 into alliedmodders:master Nov 2, 2024
4 checks passed
psychonic pushed a commit that referenced this pull request Nov 2, 2024
- Changed signature call of `CanPlayerTeleport` for linux/linux64 to current used name
  - Applied fix at detour class CanPlayerBeTeleported to use standard parameter proceedings for linux

(cherry picked from commit 29bff12)
@Arie
Copy link

Arie commented Nov 2, 2024

The merging of this pull request coincides with crashes starting on my TF2 servers. PR was merged Nov 2 16:38CET, first crash at 17:02, up to about 40 crashes now. Servers were on Sourcemod 1.12.0.7116, just now upgraded to 1.12.0.7166 hoping that will fix the crashing.

Throttle shows server_srv.so!CObjectTeleporter::PlayerCanBeTeleported(CTFPlayer*) [clone .part.0] + 0x28 , which I've never seen before and seems too much of a coincidence.
https://crash.limetech.org/f7kccntfqfeb

@MrD4rk5oul
Copy link
Contributor Author

MrD4rk5oul commented Nov 3, 2024

The merging of this pull request coincides with crashes starting on my TF2 servers. PR was merged Nov 2 16:38CET, first crash at 17:02, up to about 40 crashes now. Servers were on Sourcemod 1.12.0.7116, just now upgraded to 1.12.0.7166 hoping that will fix the crashing.

Throttle shows server_srv.so!CObjectTeleporter::PlayerCanBeTeleported(CTFPlayer*) [clone .part.0] + 0x28 , which I've never seen before and seems too much of a coincidence. https://crash.limetech.org/f7kccntfqfeb

Further testing revealed multiple 3rd party plugins may cause the crash upon hooking on the game's events.

Using a bare TF2 server with MM+SM and a plugin hooking on CanPlayerTeleport yields no crashes.
Using a bare TF2 server with MM+SM and a plugin hooking on CanPlayerTeleport and another plugin hooking on TF2_OnWaitingForPlayersStart/TF2_OnWaitingForPlayersEnd leads to a crash upon touching a teleporter.

Current quick-fix solution should be :

  • Modify the CanPlayerTeleport signature in gamedata/sm-tf2.games.txt back to @_ZN17CObjectTeleporter21PlayerCanBeTeleportedEP9CTFPlayer both in linux and linux64
  • Set DisableAutoUpdate to yes in configs/core.cfg for the time being

The CanPlayerTeleport will stop working again until a solution comes up.

psychonic added a commit that referenced this pull request Nov 3, 2024
psychonic added a commit that referenced this pull request Nov 3, 2024
@psychonic
Copy link
Member

This has now been reverted until a proper fix can be made

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.

3 participants