OpenTTD/OpenTTD

[Crash]: Crash after kicking spectator

Closed this issue · 1 comments

Version of OpenTTD

20240510-master-ga5c2543efc, Windows 11

Steps to reproduce

  1. Start a new server
  2. let another client join the server and then join or found a new company
  3. kick the player
    image
  4. notice "spectators" is kickable and kick spectators
    image
  5. Crash!

Upload crash files

crash.zip

Also reproducible in 14.1.

What seems to be the problem is twofold.

  1. The client lists caches the buttons that are available and what they can do.
  2. Due to deferred deletion of the client, the window invalidation is still done when the client object exists. So at row 3 there's still a client when the button lists are rebuilt, but once it has gone away that becomes the row with the spectator 'company' line.