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

Terminal output is ordered by instance number when running multiple instances of a game #100614

Open
MuffinInACup opened this issue Dec 19, 2024 · 1 comment

Comments

@MuffinInACup
Copy link

Tested versions

Found on v4.3.stable.official [77dcf97]

System information

Arch - v4.3.stable.official [77dcf97]

Issue description

When running 2 or more instances of a game from the editor (using Debug > Customize Run Instances > Run Multiple Instances), the output from those instances produced by print() will be ordered in the order of the instances, not time of execution.

This is mainly problematic when trying to debug multiplayer games and trying to figure out in which order things actually happen on the server and clients.

I assume the issue occurs due to buffering of the output produced and not accounting for the actual order in which output was produced.

Steps to reproduce

General description:
Run 2 instances of a game from the editor.
Make one instance a server and another a client.
Run the following code:

print("before rpc")
message.rpc_id(1,"time traveler")
print("after rpc")

Depending on which instance is first and which is the second, 'time traveler' will be printed before or after 'before rpc' and 'after rpc' respectively, at times making it seem like the rpc got executed before it was called.

MRP:
Run 2 instances. Press 'start server' button in one, 'start client' in another, after a second output of the code above will be printed in the order, depending which instance is first and which is second.

Minimal reproduction project (MRP)

output_ordering_mrp.zip

@Sauermann
Copy link
Contributor

Not sure, if it is a solution, but you could try
push_error.

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

No branches or pull requests

3 participants