SamTheBlow / grand-strategy-game

A grand strategy game made in Godot.
MIT License
3 stars 3 forks source link

Networking-related error messages #137

Open SamTheBlow opened 1 month ago

SamTheBlow commented 1 month ago

I can usually find and understand a solution to errors like these, but this time, I could not find any information about these specific problems. Keep in mind that the code works as intended, it's just that error messages appear. I would like it if error messages did not appear. This is not very important to fix, but it's certainly annoying, and it could possibly cause problems that I'm not yet aware of.


An error pops up whenever someone disconnects. remove_player(): Condition "!pinfo" is true. Continuing. It can show up for both the person who left and the server. It doesn't happen 100% of the time. Sometimes it shows up twice at the same time. It happens when removing the players of someone who disconnected.

More information: I checked, and all the nodes are under the authority of the server. I searched and there is no code that manually calls remove_child or queue_free on a Player object. I looked at the scene tree and everything gets deleted as expected. I also checked that at the time of calling remove_child, the peer representing the Player object is indeed no longer connected.


There is another error message, this one only appears on the server: send_global_message(): Unable to send packet on channel 0, max channels: 0 I'm pretty sure this one only happens when kicking a player.

SamTheBlow commented 1 month ago

I introduced more (harmless) error messages in newer commits (see in particular f013986) At this point there's too many so I don't feel like documenting all of them sorry!