Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using 2 Watched MultiplayerSynchronizer nodes crashes the server #77913

Closed
agrimminck opened this issue Jun 6, 2023 · 10 comments · Fixed by #78112
Closed

Using 2 Watched MultiplayerSynchronizer nodes crashes the server #77913

agrimminck opened this issue Jun 6, 2023 · 10 comments · Fixed by #78112

Comments

@agrimminck
Copy link

Godot version

4.1.dev4

System information

Windows 10 - Godot 4.1.dev4 - Compatibility

Issue description

When you syncronize 2 variables and both are in watched mode (taking out the "sync" property too) the server crashes

Steps to reproduce

Create a MultiplayerSynchronizer, export 2 variables from a script, connect the server and the client and the server will crash instantly

In the project I give, the server and client are connected automatically when you use 2 debug instances when pressing play

Minimal reproduction project

minimalproject.zip

@FeralBytes
Copy link
Contributor

I can confirm this bug. I wrote a simple chat application. I have a synchronizer that is owned by the server and one by the client. If either synchronizer is watching two variables or more they crash. However multiple individual synchronizers can watch a single variable and it will not crash.
Using Godot 4.1.beta1.

@MrBlockers
Copy link
Contributor

Just ran into this on 4.1.beta1 in my project as well. I instanced an object with a synchronizer on the server (replicated with a spawner to the client) and if I have more than one watched property it crashes the server silently with no log.

@FeralBytes
Copy link
Contributor

FeralBytes commented Jun 10, 2023

Exported a chat example host with this issue and ran it from the command line it dumps this on crashing.

Godot Engine v4.1.beta1.official.828ec2c5d - https://godotengine.org
Vulkan API 1.3.246 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 5700 XT (RADV NAVI10)
 
Client connected with peer_id = 1
Client connected with peer_id = 761357269

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.beta1.official (828ec2c5d005b6499c7c4c88beaf81767d05614b)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fc2983fa520] (??:0)
[2] ./ChitChat_v0.1.0.x86_64() [0x17550ea] (??:0)
[3] ./ChitChat_v0.1.0.x86_64() [0x1755772] (??:0)
[4] ./ChitChat_v0.1.0.x86_64() [0x1076feb] (??:0)
[5] ./ChitChat_v0.1.0.x86_64() [0x17b7b0c] (??:0)
[6] ./ChitChat_v0.1.0.x86_64() [0xbca08b] (??:0)
[7] ./ChitChat_v0.1.0.x86_64() [0xaf6ef9] (??:0)
[8] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fc2983e1d90] (??:0)
[9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fc2983e1e40] (??:0)
[10] ./ChitChat_v0.1.0.x86_64() [0xb2268e] (??:0)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

The client from the editor inconsistently produces this error when the server crashes, but not always:

E 0:02:17:0124   parse_message: Condition "p_args.size() < 10" is true. Returning: ERR_INVALID_DATA
  <C++ Source>   scene/debugger/scene_debugger.cpp:177 @ parse_message()

@AThousandShips
Copy link
Member

AThousandShips commented Jun 10, 2023

Please run with a debug build with symbols enabled so we can actually see what's going on, this stack trace doesn't really provide information since the symbols are stripped

Edit: my bad I forgot that they were striped from official builds

@FeralBytes
Copy link
Contributor

@AThousandShips how do I enable the symbols. This is a debug build with debugging included on export.
image

@Calinou
Copy link
Member

Calinou commented Jun 10, 2023

@AThousandShips how do I enable the symbols. This is a debug build with debugging included on export.

Official editor/export templates don't include debug symbols, as it would make binaries 5× larger or so. You can use official builds from https://github.com/Calinou/godot-debug-builds as custom export templates instead.

In the future, we plan to distribute debug symbols for official builds as separate files, but it needs investigation to make sure everything works as expected on all desktop platforms. (We tried to default to separate debug symbols back in 2018, and it introduced many issues back then.)

@FeralBytes
Copy link
Contributor

@Calinou I saw your repo, but it says something about working for Godot 4.0.3, does it also work for 4.1.beta1?

@Calinou
Copy link
Member

Calinou commented Jun 10, 2023

@Calinou I saw your repo, but it says something about working for Godot 4.0.3, does it also work for 4.1.beta1?

No, I don't provide builds for pre-releases. You'll have to compile from source with the debug_symbols=yes SCons option.

@capnm
Copy link
Contributor

capnm commented Jun 11, 2023

In the future, we plan to distribute debug symbols for official builds as separate files

That would make the pre-releases more useful 👌

ll bin/
total 678M
130M Jun 10 10:16 godot.linuxbsd.editor.dev.x86_64.llvm*
546M Jun 10 10:16 godot.linuxbsd.editor.dev.x86_64.llvm.debugsymbols*

@Faless
Copy link
Collaborator

Faless commented Jun 11, 2023

@agrimminck thank you for taking the time to make a minimal reproduction project and reporting the issue.

It was indeed a bug in the initial "watched" properties PR. I've opened #78112 with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants