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

[bug] Server crashes in attemp to get game state after one of session member leaves #171

Open
MarkTheHopeful opened this issue May 31, 2022 · 0 comments
Labels
bug Something isn't working server

Comments

@MarkTheHopeful
Copy link
Contributor

Относится к ветке #161

Если создать комнату, в ней создать сессию, например, в крестики-нолики, отыграть её со вторым человеком и после is-terminal=true хостом (сессии) покинуть игру (и сделать leaveSession), то второй игрок при очередном запросе getState от игры уронит сервер в SEGFAULT

Похоже, проблема возникает тогда, когда первый игрок ливает из игры/сессии (закончившейся), а второй запрашивает state игры со своим player_id — 1. А в сессии теперь всего один человек, поэтому players_state теперь длины 1.|

На клиенте #168 обошли тем, что просто не покидаем сессию, если она уже началась (в том числе, если уже закончилась)

@MarkTheHopeful MarkTheHopeful added bug Something isn't working server labels May 31, 2022
This was referenced May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

No branches or pull requests

1 participant