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

Prevent rare crash when player disconnects during War Games intro #856

Merged
merged 4 commits into from
Sep 2, 2024
Merged

Prevent rare crash when player disconnects during War Games intro #856

merged 4 commits into from
Sep 2, 2024

Conversation

LightBlueCube
Copy link
Contributor

@LightBlueCube LightBlueCube commented Sep 1, 2024

[15:02:59] [NORTHSTAR] [info] Player Elyearend disconnected: "Disconnect by user."
[15:02:59] [NORTHSTAR] [info] Player Elyearend disconnected: "Disconnect by user."
[15:02:59] [NORTHSTAR] [warn] attempted to write pdata of size 0!
[15:02:59] [SCRIPT SV] [info] SCRIPT ERROR: [SERVER] Attempted to call GetPersistentVar on invalid entity
[15:02:59] [SCRIPT SV] [info] -> return expect string ( player.GetPersistentVar( "factionChoice" ) )
[15:02:59] [SCRIPT SV] [info]
CALLSTACK
*FUNCTION [GetFactionChoice()] conversation/sh_faction_dialogue.gnut line [136]
*FUNCTION [ConvertPlayerFactionToIMCOrMilitiaTeam()] conversation/sh_faction_dialogue.gnut line [188]
*FUNCTION [PlayerWatchesWargamesIntro()] mp/levels/mp_wargames.nut line [260]
[15:02:59] [SCRIPT SV] [info] LOCALS
[player] ENTITY (NULL)
[this] TABLE
[player] ENTITY (NULL)
[this] TABLE
[player] ENTITY (NULL)
[this] TABLE
DIAGPRINTS
0114:fixme:msvcrt:__clean_type_info_names_internal (00006FFFFDD58788) stub
nswrap: northstar exited with status 3
nswrap: killing xvfb
nswrap: waiting for children to exit

that really need a lot of luck
i fell like i lost a winning ticket
sorry for my bad english :(

Copy link
Contributor

@ASpoonPlaysGames ASpoonPlaysGames left a comment

Choose a reason for hiding this comment

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

Code looks good, unfortunate that a client disconnected on that exact frame I guess

Copy link
Contributor

@Zanieon Zanieon left a comment

Choose a reason for hiding this comment

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

This code is old, it still does the trick of killing the player and respawning immediately to secure logic.

I'll approve this as this is a good fix for the current way this code is implemented, but this requires a proper update later.

@Zanieon Zanieon added the READY TO MERGE This mergeable right now label Sep 2, 2024
@GeckoEidechse GeckoEidechse changed the title fix a small bug at mp_wargame intro, will crash when player disconnect at a special freame Prevent rare crash when disconnecting during War Games intro Sep 2, 2024
@GeckoEidechse GeckoEidechse changed the title Prevent rare crash when disconnecting during War Games intro Prevent rare crash when player disconnects during War Games intro Sep 2, 2024
@GeckoEidechse GeckoEidechse merged commit 34e5b52 into R2Northstar:main Sep 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
READY TO MERGE This mergeable right now
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants