Godot: Networking disconnects after some time

Created on 18 Apr 2019  路  3Comments  路  Source: godotengine/godot

From Discord:

Does anyone else have issues where their client just gets disconnected no matter what after a few minutes?
It's happening FAR less when I don't use a rpc() call back to the client after receiving one. I can reproduce it pretty much every time when just doing that. Make rpc to server, that method makes rpc back to the client. Is there any reason why it's bad to do that?

User ex on Discord provided a server and client project reproducing this behaviour reliably for them. (Thanks for the effort, by the way!)

Info:

Think I have it so it's reproduced every time. I'm not even sure if it's that the client is disconnecting. The client freezes first, it seems (not sure if that's due to a dc).
Here's a zip of the client/server project. Don't feel like messing with github right now. Might be able to later.

  1. Start server
  2. Start client
  3. Wait. Without fail, client crashes/dcs after a few minutes (often times happens when the counter hits around 8,000 for me)

(Godot 3.1 stable)
windows 10 pro, ryzen 2700x, Intel(R) I211 Gigabit Network Connection.
over localhost (client/server on same comp)

dc-crash-bug.zip

bug confirmed editor network

Most helpful comment

This is going to be a nasty bug to track, thanks for reporting.
I confirm it only seems to happen when running both instances in the editor (more correctly, when one editor is listening), ~I think it might be a memory issue somewhere, but I'll need to investigate further.~ EDIT: it was actually a way more trivial issue, unrelated to the multiplayer API. I'll open a PR soon.

All 3 comments

I have experienced this something similar but probably is a different issue. I can confirm the test project crashes/disconnects on Windows and Linux 2 out of 3 times. I ran multiple tests and so far seems the bug is present when both projects are launched from the editor (two editors to be clear, one for client and one for serve). If I execute them through terminal or the project list it seems to work without issue.

Update: The original discord user confirms that when running from the project list it doesn't crash.

Update 2: It happens when using unreliable calls too

This is going to be a nasty bug to track, thanks for reporting.
I confirm it only seems to happen when running both instances in the editor (more correctly, when one editor is listening), ~I think it might be a memory issue somewhere, but I'll need to investigate further.~ EDIT: it was actually a way more trivial issue, unrelated to the multiplayer API. I'll open a PR soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timoschwarzer picture timoschwarzer  路  3Comments

bojidar-bg picture bojidar-bg  路  3Comments

EdwardAngeles picture EdwardAngeles  路  3Comments

Spooner picture Spooner  路  3Comments

RebelliousX picture RebelliousX  路  3Comments