Godot version:
3.2alpha3
OS/device including version:
Ubuntu 18 server
Issue description:
When I Ctrl + Z out of the process and restart the project again from the command line, the console is flooded with errors and clients are unable to connect. The process does not crash, but it keeps flooding errors and becomes unusable.
Restarting the OS works, so I think it must be some uncleared connection issue?
Flooded Error:
ERROR: rpcp: Condition ' network_peer->get_connection_status() != NetworkedMultiplayerPeer::CONNECTION_CONNECTED ' is true.
At: core/io/multiplayer_api.cpp:628.
I could not reproduce this locally because I use Win10 to develop and test in the editor, so this only happened to me when connecting to an external Ubuntu IP and launching server from cli.
Steps to reproduce:
Start server, connect from client, turn off (disconnect) client, and then finally turn off server. When the server is re-started it will hang.
P.S. I might have forgot to change the server IP in Client/gamestate.gd, it needs to point to 127.1.1.1 instead of my server.
Minimal reproduction project:
Client.zip
Server.zip
@Faless The attached code seems to be buggy in many aspects, but the reproducible client crash I'm getting could uncover some referencing issues. Does not occur when you start the client via the editor.
I wonder how this could happen:
ERROR: get_language: Index p_idx=4 out of size (_language_count=3)
At: core/script_language.cpp:136.
Thread 1 "godot3" received signal SIGSEGV, Segmentation fault.
0x00000000048ef513 in ~Object () at core/object.cpp:1979
1979 ScriptServer::get_language(i)->free_instance_binding_data(_script_instance_bindings[i]);
(gdb) l
1974 _predelete_ok = 2;
1975
1976 if (!ScriptServer::are_languages_finished()) {
1977 for (int i = 0; i < MAX_SCRIPT_INSTANCE_BINDINGS; i++) {
1978 if (_script_instance_bindings[i]) {
1979 ScriptServer::get_language(i)->free_instance_binding_data(_script_instance_bindings[i]);
1980 }
1981 }
1982 }
1983 }
(gdb)
md5-a9fb2b9b237ecdd173a0565208d15fee
i33279/Client$ godot3
Godot Engine v3.2.alpha.custom_build.dc114fa2e - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon HD 7700 Series (VERDE, DRM 3.27.0, 5.0.0-20-generic, LLVM 10.0.0)
WARNING: _update_root_rect: Font oversampling does not work in 'Viewport' stretch mode, only '2D'.
At: scene/main/scene_tree.cpp:1252.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: connect: Signal 'connected_to_server' is already connected to given method '_connected_ok' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'connection_failed' is already connected to given method '_connected_fail' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'server_disconnected' is already connected to given method '_server_disconnected' in that object.
At: core/object.cpp:1464.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: connect: Signal 'connected_to_server' is already connected to given method '_connected_ok' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'connection_failed' is already connected to given method '_connected_fail' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'server_disconnected' is already connected to given method '_server_disconnected' in that object.
At: core/object.cpp:1464.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: connect: Signal 'connected_to_server' is already connected to given method '_connected_ok' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'connection_failed' is already connected to given method '_connected_fail' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'server_disconnected' is already connected to given method '_server_disconnected' in that object.
At: core/object.cpp:1464.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: get_language: Index p_idx=4 out of size (_language_count=3)
At: core/script_language.cpp:136.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f04c2bc6f20] (??:0)
[2] godot3() [0x48ef513] (core/object.cpp:1979)
[3] godot3() [0x2a16b88] (modules/websocket/wsl_client.cpp:353)
[4] godot3() [0x4bbd18b] (./core/os/memory.h:119)
[5] godot3() [0x3807e2e] (./core/reference.h:277)
[6] godot3() [0x48e1522] (core/object.cpp:?)
[7] godot3() [0x49b2c50] (core/variant_call.cpp:?)
[8] godot3() [0x24356a7] (modules/gdscript/gdscript_function.cpp:1082)
[9] godot3() [0x23c48bc] (modules/gdscript/gdscript.cpp:1164)
[10] godot3() [0x48e1441] (core/object.cpp:?)
[11] godot3() [0x48e3e64] (./core/variant.h:418)
[12] godot3() [0x48e1ea3] (core/object.cpp:1274)
[13] godot3() [0x37eb211] (./core/variant.h:418)
[14] godot3() [0x3801932] (./core/variant.h:416)
[15] godot3() [0x48e1522] (core/object.cpp:?)
[16] godot3() [0x48e3e64] (./core/variant.h:418)
[17] godot3() [0x48e1ea3] (core/object.cpp:1274)
[18] godot3() [0x4bc5001] (./core/variant.h:418)
[19] godot3() [0x4bd1aa2] (./core/variant.h:416)
[20] godot3() [0x48e1522] (core/object.cpp:?)
[21] godot3() [0x48e3e64] (./core/variant.h:418)
[22] godot3() [0x48e1ea3] (core/object.cpp:1274)
[23] godot3() [0x29fbe3e] (./core/variant.h:418)
[24] godot3() [0x2a1557c] (./core/cowdata.h:?)
[25] godot3() [0x4bbc482] (./core/reference.h:269)
[26] godot3() [0x37e3c32] (scene/main/scene_tree.cpp:519)
[27] godot3() [0x2072b31] (main/main.cpp:1974)
[28] godot3() [0x20429c2] (platform/x11/os_x11.cpp:3259)
[29] godot3(main+0x99) [0x2034189] (platform/x11/godot_x11.cpp:57)
[30] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f04c2ba9b97] (??:0)
[31] godot3() [0x203402a] (??:0)
-- END OF BACKTRACE --
Aborted
@capnm That's interesting I haven't seen this client crash, which platform is this running the client on? (I only tested the client on windows, and the reproducible issue here is with the server on linux)
Also excuse the stupid question, but is this reproducible crash from the steps I posted?
Also excuse the stupid question, but is this reproducible crash from the steps I posted?
No, I just ran your client from #33279 with godot master tip in the Linux terminal and accidentally posted it in this issue. I have to drink more coffee ;-)
Potentially related to https://github.com/godotengine/godot/issues/33290
Can you try my patch in that issue and see if still crashes?
On Tue, Nov 5, 2019, 13:17 Martin Capitanio notifications@github.com
wrote:
@Faless https://github.com/Faless The attached code seems to be buggy
in many aspects, but the reproducible client crash I'm getting could
uncover some referencing issues. Does not occur when you start the client
via the editor.I wonder how this could happen:
ERROR: get_language: Index p_idx=4 out of size (_language_count=3)
At: core/script_language.cpp:136.Thread 1 "godot3" received signal SIGSEGV, Segmentation fault.
0x00000000048ef513 in ~Object () at core/object.cpp:1979
1979 ScriptServer::get_language(i)->free_instance_binding_data(_script_instance_bindings[i]);
(gdb) l
1974 _predelete_ok = 2;
1975
1976 if (!ScriptServer::are_languages_finished()) {
1977 for (int i = 0; i < MAX_SCRIPT_INSTANCE_BINDINGS; i++) {
1978 if (_script_instance_bindings[i]) {
1979 ScriptServer::get_language(i)->free_instance_binding_data(_script_instance_bindings[i]);
1980 }
1981 }
1982 }
1983 }
(gdb)i33279/Client$ godot3
Godot Engine v3.2.alpha.custom_build.dc114fa2e - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon HD 7700 Series (VERDE, DRM 3.27.0, 5.0.0-20-generic, LLVM 10.0.0)WARNING: _update_root_rect: Font oversampling does not work in 'Viewport' stretch mode, only '2D'.
At: scene/main/scene_tree.cpp:1252.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: connect: Signal 'connected_to_server' is already connected to given method '_connected_ok' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'connection_failed' is already connected to given method '_connected_fail' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'server_disconnected' is already connected to given method '_server_disconnected' in that object.
At: core/object.cpp:1464.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: connect: Signal 'connected_to_server' is already connected to given method '_connected_ok' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'connection_failed' is already connected to given method '_connected_fail' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'server_disconnected' is already connected to given method '_server_disconnected' in that object.
At: core/object.cpp:1464.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: connect: Signal 'connected_to_server' is already connected to given method '_connected_ok' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'connection_failed' is already connected to given method '_connected_fail' in that object.
At: core/object.cpp:1464.
ERROR: connect: Signal 'server_disconnected' is already connected to given method '_server_disconnected' in that object.
At: core/object.cpp:1464.
ERROR: _get_socket_error: Socket error: 111
At: drivers/unix/net_socket_posix.cpp:211.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:429.
ERROR: get_language: Index p_idx=4 out of size (_language_count=3)
At: core/script_language.cpp:136.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f04c2bc6f20] (??:0)
[2] godot3() [0x48ef513] (core/object.cpp:1979)
[3] godot3() [0x2a16b88] (modules/websocket/wsl_client.cpp:353)
[4] godot3() [0x4bbd18b] (./core/os/memory.h:119)
[5] godot3() [0x3807e2e] (./core/reference.h:277)
[6] godot3() [0x48e1522] (core/object.cpp:?)
[7] godot3() [0x49b2c50] (core/variant_call.cpp:?)
[8] godot3() [0x24356a7] (modules/gdscript/gdscript_function.cpp:1082)
[9] godot3() [0x23c48bc] (modules/gdscript/gdscript.cpp:1164)
[10] godot3() [0x48e1441] (core/object.cpp:?)
[11] godot3() [0x48e3e64] (./core/variant.h:418)
[12] godot3() [0x48e1ea3] (core/object.cpp:1274)
[13] godot3() [0x37eb211] (./core/variant.h:418)
[14] godot3() [0x3801932] (./core/variant.h:416)
[15] godot3() [0x48e1522] (core/object.cpp:?)
[16] godot3() [0x48e3e64] (./core/variant.h:418)
[17] godot3() [0x48e1ea3] (core/object.cpp:1274)
[18] godot3() [0x4bc5001] (./core/variant.h:418)
[19] godot3() [0x4bd1aa2] (./core/variant.h:416)
[20] godot3() [0x48e1522] (core/object.cpp:?)
[21] godot3() [0x48e3e64] (./core/variant.h:418)
[22] godot3() [0x48e1ea3] (core/object.cpp:1274)
[23] godot3() [0x29fbe3e] (./core/variant.h:418)
[24] godot3() [0x2a1557c] (./core/cowdata.h:?)
[25] godot3() [0x4bbc482] (./core/reference.h:269)
[26] godot3() [0x37e3c32] (scene/main/scene_tree.cpp:519)
[27] godot3() [0x2072b31] (main/main.cpp:1974)
[28] godot3() [0x20429c2] (platform/x11/os_x11.cpp:3259)
[29] godot3(main+0x99) [0x2034189] (platform/x11/godot_x11.cpp:57)
[30] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f04c2ba9b97] (??:0)
[31] godot3() [0x203402a] (??:0)
-- END OF BACKTRACE --
Aborted—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/33336?email_source=notifications&email_token=AAM4C3QRZMARLRVRQUNINKDQSFW43A5CNFSM4JIUKDS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDCY25A#issuecomment-549817716,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAM4C3QEDUZPEGNQRDKN46TQSFW43ANCNFSM4JIUKDSQ
.
@Faless Sadly work caught up with me so might not have time to test till the weekend, but I'll reply back and ping you with what happens. Thank you!
Potentially related to #33290
Can you try my patch in that issue and see if still crashes?
Yes, I can confirm that the patch applied on the current tip prevents the crash.
hacky.zip
@Faless I think at least the connection failures from peer.create_* shouldn't additionally spam the output, because the user can/should check the return value anyway.
E.g:
var peer = NetworkedMultiplayerENet.new()
var err = peer.create_server(PORT, MAX_PLAYERS)
if err != OK:
log_err("create server(PORT %d)" % [PORT], err)
ERROR: bind: Method/Function Failed, returning: ERR_UNAVAILABLE
At: drivers/unix/net_socket_posix.cpp:300.
ERROR: create_server: Condition ' !host ' is true. returned: ERR_CANT_CREATE
At: modules/enet/networked_multiplayer_enet.cpp:106.
Lobby create server(PORT 4242) ERROR[20].
https://docs.godotengine.org/en/latest/classes/[email protected]#enum-globalscope-error
Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
Most helpful comment
No, I just ran your client from #33279 with godot master tip in the Linux terminal and accidentally posted it in this issue. I have to drink more coffee ;-)