space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.58k stars 3.21k forks source link

PDA Cartridges sometimes fail to load #31897

Open eoineoineoin opened 2 weeks ago

eoineoineoin commented 2 weeks ago

Description

PDA cartridge UIs sometimes fail to load their UI, requiring the cartridge UI to be closed and re-opened (sometimes, multiple times). It's a little difficult to reproduce in local dev, but I've seen it fairly frequently when playing a game. It looks like the CartridgeLoaderBoundUserInterface._activeProgram gets out of sync with the entites on the server - when in the broken state, the client sends an CartridgeLoaderUiMessage, but CartridgeLoaderSystem.OnLoaderUiMessage is never triggered on the server.

Reproduction

Fairly frequently, just opening the PDA UI when connected to a remote server is enough to trigger the bug. On local dev, you can open the PDA, open a cartridge, then spam activating/closing the PDA UI.

Screenshots

Opens up correctly a few times, then gets stuck: https://github.com/user-attachments/assets/c46082b7-011f-4d92-b68a-01002b86040d

Also opens up correctly a few times, then gets stuck: https://github.com/user-attachments/assets/4e6e0eb2-3ba6-4fd1-959b-4f324e9e5831

Additional context

deltanedas commented 2 weeks ago

it should network the current program on pda component instead of using bui state imo