godotengine / godot

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

MultiplayerSynchronizer server crash in alpha9+ #61711

Closed jgillich closed 2 years ago

jgillich commented 2 years ago

Godot version

eaffb88558b6ef2a4c20ad7d1da94e3d1d4c0f4a

System information

Fedora Silverblue 36, Ryzen 2400G

Issue description

When running the bomber example, the server instance crashes after starting the game. The lobby itself works fine so basic communications works. This problem does not exist with alpha8.

I have the same issue in my project, and removing MultiplayerSynchronizer makes it go away.

Godot Engine v4.0.alpha.calinou.eaffb8855 - https://godotengine.org
Vulkan API 1.2.0 - Using Vulkan Device #0: AMD - AMD RADV RAVEN

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.alpha.calinou (eaffb88558b6ef2a4c20ad7d1da94e3d1d4c0f4a)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3ea70) [0x7fe5ada24a70] ()
[2] List<NodePath, DefaultAllocator>::front() const ()
[3] List<NodePath, DefaultAllocator>::List(List<NodePath, DefaultAllocator> const&) ()
[4] SceneReplicationInterface::_send_sync(int, unsigned long) ()
[5] SceneReplicationInterface::on_network_process() ()
[6] MultiplayerAPI::poll() ()
[7] SceneTree::process(double) ()
[8] Main::iteration() ()
[9] OS_LinuxBSD::run() ()
[10] /var/home/jgillich/Downloads/godot(main+0x168) [0x556a70394a4d] ()
[11] /lib64/libc.so.6(+0x29550) [0x7fe5ada0f550] ()
[12] /lib64/libc.so.6(__libc_start_main+0x89) [0x7fe5ada0f609] ()
[13] /var/home/jgillich/Downloads/godot(_start+0x2a) [0x556a7039482a] ()
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

Steps to reproduce

  1. Get the bomber example
  2. Run two instances and start a game

Minimal reproduction project

No response

qarmin commented 2 years ago
scene/multiplayer/scene_replication_interface.cpp:341:84: runtime error: member call on null pointer of type 'struct SceneReplicationConfig'
scene/multiplayer/scene_replication_interface.cpp:341:84: runtime error: member access within null pointer of type 'struct SceneReplicationConfig'

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.alpha.custom_build (1baee2189c21ae36c852ddff10f769b1134509ca)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] godot4s() [0x243f6d8] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/crash_handler_linuxbsd.cpp:56)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fb11a6e0520] (??:0)
[3] SceneReplicationInterface::_send_sync(int, unsigned long) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/multiplayer/scene_replication_interface.cpp:341 (discriminator 1))
[4] SceneReplicationInterface::on_network_process() (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/multiplayer/scene_replication_interface.cpp:88 (discriminator 8))
[5] MultiplayerAPI::poll() (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/multiplayer/multiplayer_api.cpp:88)
[6] SceneTree::process(double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/scene_tree.cpp:441)
[7] Main::iteration() (/home/runner/work/GodotBuilds/GodotBuilds/godot/main/main.cpp:2735)
[8] OS_LinuxBSD::run() (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/os_linuxbsd.cpp:441)
[9] godot4s(main+0x496) [0x243cd7c] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/godot_linuxbsd.cpp:70)
[10] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fb11a6c7d90] (??:0)
[11] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fb11a6c7e40] (??:0)
[12] godot4s(_start+0x2e) [0x243c82e] (??:?)
-- END OF BACKTRACE --
================================================================
ywmaa commented 2 years ago

I had the same issue before, But if you assign a new SceneReplicationConfig to the MultiplayerSynchonizor in the inspector. This solved the issue for me.