godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.71k stars 21.12k forks source link

Network Break from Beta 2 -> Beta 3 #25556

Closed ForLoveOfCats closed 4 years ago

ForLoveOfCats commented 5 years ago

Godot version: Godot 3.1 Beta 3 Mono

OS/device including version: Manjaro Linux x86_64

Issue description: Issue began upon upgrading from 3.1 Beta 2 Mono to 3.1 Beta 3 Mono. When attempting to connect a client instance of my game to a server instance both instances freeze for several minutes while maxing out one CPU core each. Several minutes later the client instance disconnects and outputs

ERROR: close_connection: Condition ' !active ' is true. At: modules/enet/networked_multiplayer_enet.cpp:428.

and the server instance becomes responsive again while logging the fact that a client had connected then disconnected. At this point both instances are once again responsive. Downgrading to 3.1 Beta 2 Mono corrects the issue.

neikeq commented 5 years ago

Is this actually a mono issue or network instead?

QbieShay commented 5 years ago

@Faless ?

Faless commented 5 years ago

There seem to be no changes in MultiplaerAPI / ENet between beta2 and beta3. Might it be something about signals in Mono? Can @ForLoveOfCats provide a minimum reproduction project?

akien-mga commented 5 years ago

CC @hpvb

ForLoveOfCats commented 5 years ago

Sorry no minimal reproduction project yet, I really need to do that

However I have test on Windows and I cannot reproduce under Windows 7 x86_64 The issue is present under Manjaro Linux x86_64

ForLoveOfCats commented 5 years ago

The issue started to occur under Beta 2 on Linux

Sifting through my project's commits I discovered that by adding a light to the gameworld solves the issue for some reason.....

Trying to reproduce this should be fun /s

Edit: I stand corrected, that was a separate issue with similar symptoms.

ForLoveOfCats commented 5 years ago

The issue presented itself again with Beta 4 but now is not....

Until someone else reports an issue like this this should probably be ignored as it seems to be working now (for some reason)

ProbDenis commented 5 years ago

We have experienced this bug too. We made custom builds with the GodotSteam module, and what's interesting is that the connection fails in the debug build, but everything works fine in the release build.

neikeq commented 5 years ago

Should we label this network instead?

@ProbDenis are you compiling with Mono enabled?

ProbDenis commented 5 years ago

No, I'm compiling without Mono.

Faless commented 5 years ago

I'm unable to reproduce. Can anyone provide a minimum reproduction project?

From the symptoms, I would say there is an endless loop during connect, causing the freeze, until enet connection times out and disconnect. Just a guess, as again, I can't reproduce :(.

Are you doing anything special during connected_to_server/network_peer_connected signals? Can you try removing that code and just have prints there, and see it the freeze still happens?

Sorry, but I really cannot debug this without being able to reproduce, and having no reference to the condition that cause the issue.

akien-mga commented 5 years ago

@ForLoveOfCats @ProbDenis Could one of you provide a minimal reproduction project?

ProbDenis commented 5 years ago

I'll see what I can do. Maybe even one of the Godot network demos will do, I just need an opportunity to test.

zEh- commented 5 years ago

Got the same problem (3.1.1 Mono): ERROR: close_connection: Condition ' !active ' is true. At: modules/enet/networked_multiplayer_enet.cpp:435

chandujr commented 4 years ago

I'm getting the error in standard version, not Mono. (3.1.2 stable Linux)

akien-mga commented 4 years ago

This issue is very hard to debug / assess (which is why it's name is still not related to what the actual problem could be), since there is no reliable way to reproduce it so far. I'll close it as it's impossible to fix in the current state. If anyone managed to reproduce this error reliably (which might be caused by difference things for the different posters here), please open a new issue with details steps to reproduce (and ideally a reproduction project).