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

Server crash due to _stats.nut (error: Persistent data not available.) #766

Closed
CTalvio opened this issue Dec 3, 2023 · 0 comments
Closed

Comments

@CTalvio
Copy link
Contributor

CTalvio commented Dec 3, 2023

I've identified one way a server can crash, this seems to currently be the most common cause for my servers crashing.

The logs will look something like this, and are preceded by the relevant lines about a player disconnecting.

[16:29:08] [SCRIPT SV] [info] [BTB] AFK player kicked: playername - PID
[16:29:08] [NORTHSTAR] [info] Player playername disconnected: "You were disconnected due to being AFK"
[16:29:08] [NORTHSTAR] [info] Player playername disconnected: "You were disconnected due to being AFK"
[16:29:08] [NORTHSTAR] [warn] attempted to write pdata of size 0!
[16:29:08] [SCRIPT SV] [info] SCRIPT ERROR: [SERVER] Persistent data not available.
[16:29:08] [SCRIPT SV] [info]  -> return expect float( player.GetPersistentVar( statString ) )
[16:29:08] [SCRIPT SV] [info]
CALLSTACK
*FUNCTION [GetPlayerStatFloat()] sh_stats.gnut line [469]
*FUNCTION [StatsCallback_ItemUnlockUpdate()] _items.nut line [10171]
*FUNCTION [Stats_RunCallbacks()] mp/_stats.nut line [311]
*FUNCTION [Stats_IncrementStat()] mp/_stats.nut line [298]
*FUNCTION [HandleDistanceAndTimeStats_Threaded()] mp/_stats.nut line [941]


abnormal program termination

So I went down the callstack, and tried adding a validity check before the section of code that seems to be causing this.

Relevant PR once I make it: #767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant