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

createClient fails while initializing engine state #74

Closed
keturn opened this issue Nov 5, 2021 · 5 comments
Closed

createClient fails while initializing engine state #74

keturn opened this issue Nov 5, 2021 · 5 comments
Labels
Blocker Issue reporting or PR addressing a critical problem that blocks other efforts Category: Crash Requests, Issues and Changes targeting unexpected terminations, segfaults, etc. Type: Bug Issues reporting and PRs fixing problems

Comments

@keturn
Copy link
Contributor

keturn commented Nov 5, 2021

createClient fails with an NPE from somewhere beneath TerasologyEngine.changeState (currently in TerasologyCanvasImpl).

Looking at the code for createClient, I see it jumps right in to things without going through anything like TestingStateHeadlessSetup. As a client, it's true that it doesn't need to do most of the setup that the host does (because it will get that configuration from the host when it connects), but there might be some stuff along the lines of EntitySystemSetup that needs to happen?

@keturn keturn added Type: Bug Issues reporting and PRs fixing problems Blocker Issue reporting or PR addressing a critical problem that blocks other efforts Category: Crash Requests, Issues and Changes targeting unexpected terminations, segfaults, etc. labels Nov 5, 2021
@keturn
Copy link
Contributor Author

keturn commented Nov 5, 2021

I've always been amazed that MTE's multi-client simulation works at all. I was afraid there were too many places in the code still using global variables to be able to do this all in one process!

On the one hand, it's a killer feature if we trust it. So many of the bugs that crop up during module development are from people overlooking multiplayer, writing code that happens to work locally but that doesn't get saved and communicated properly.

On the other hand, it looks like we only have a single test suite that makes use of it today.

@jdrueckert
Copy link
Member

On the one hand, it's a killer feature if we trust it. So many of the bugs that crop up during module development are from people overlooking multiplayer, writing code that happens to work locally but that doesn't get saved and communicated properly.

Totally agree! I would love to get to a point where we can actually trust it and put it into wider use!

@keturn
Copy link
Contributor Author

keturn commented Nov 7, 2021

@DarkWeird It looks to me like MovingBlocks/Terasology#4907 told StateLoading that hasLocalClient implies “has UI”, which is not true for MTE.

@DarkWeird
Copy link
Contributor

@DarkWeird It looks to me like MovingBlocks/Terasology#4907 told StateLoading that hasLocalClient implies “has UI”, which is not true for MTE.

Yeah. It is true for real game, not MTE.
We can use context.get(GraphicsSubsystem.class) != null instead netmode.hasLocalClient()

@keturn
Copy link
Contributor Author

keturn commented Jun 1, 2022

has has been somewhat addressed by some fixes for headless since then, and is further improved by MovingBlocks/Terasology#5030

[closing because I can't transfer issues between MovingBlocks and Terasology]

@keturn keturn closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Issue reporting or PR addressing a critical problem that blocks other efforts Category: Crash Requests, Issues and Changes targeting unexpected terminations, segfaults, etc. Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

No branches or pull requests

3 participants