BB-Games / gamemode-issues-requests

Suggest / Request stuff here. Or don't, it's up to you.
https://bbservers.co.uk/forums/index.php?forums/suggestions-bugs.223/
3 stars 0 forks source link

Scoreboard showing incorrect stage #31

Closed dwarfmagic closed 3 years ago

dwarfmagic commented 3 years ago

Describe the bug Seems like the scoreboard will show the wrong stage for freshly joined players. Potentially based on what level someone was on when they left, and a new player taking their slot showing their old level.

To Reproduce Have a few people in the lobby, on non stage-1 Have someone leave, and a new person join in their place New person will show old stage number until they clear a stage.

Screenshots https://i.imgur.com/nP1N90s.png

Desktop (please complete the following information): Windows 64 bit (64 bit beta Gmod)

Additional context Doesn't really break the game or anything, just noticed when checking ranks

killermon commented 3 years ago

That's interesting, technically, any player could pick up stale data from any other player. Typically, if there's no data then it returns the first stage, but if there's stale data, then it returns that

TeddiO commented 3 years ago

I assume that's because we're storing individual players with UserID() so if someone takes their place fast enough and the panel isn't cleaned up by that point, it'll reuse the panel but keep the old data.

I suppose the question is are we potentially leaking any memory we shouldn't be in this scenario?

TeddiO commented 3 years ago

As of the next update this should be resolved.

Good news is no memory leakage was happening!