Verify consistent leave behaviour

Open
#654 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@Endaris is already working on this.

Since Jun 20, 2025.

Assessment

This issue has not been assessed yet.

Description

bug Client-side needs repro priority: 1 - middle

Marking this so I don't forget:
On 5th May, Lava had a very weird crash related to unpacking inputs:

crash(1).log

Both players were on controller so evidently the crash is unrelated to #628 although otherwise it looks similar.
One thing that is noteworthy is that prior to the final spectate, Lava leaves a previous room from spectating and sends a leaveRoom message twice with quite the delay inbetween which could be related.
Another guess is that the replay compression is not handled properly here on either client or server side or even both:
As evident in the spectator join message, the inputs of player 1 are not compressed, yet the inputs of player 2 are.
As the crash occurs in GameCatchup it seems like another possibility that player 2 never had their inputs decompressed and successively crashed at trying to interpret the first character that is not part of the encoding's character set: (.

So verify that and if not the case correct that:

  1. Server always compresses inputs in outgoing replays
  2. Client always decompresses in incoming replays
  3. NetClient checks calls to its leaveRoom function with its state to decide whether a message is sent to the server or not.

I don't really have a good idea to force a repro for this issue but I think with these steps it's quite likely for the problem to disappear.

Dominant language
Lua
Stars
30
Forks
20
Avg merge
3d 15h
Merged PRs (30d)
17

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from panel-attack/panel-game

All issues in panel-attack/panel-game

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.