Open jdrueckert opened 3 years ago
Yeah, we have "change to StateMainMenu" coded in various different places as the thing to do when they can't continue as planned.
I would very much like them to have a different way to communicate that error and then let some logic at a higher level decide what the appropriate response is. e.g. show a message and fall back to main menu for a GUI, but print message and quit for headless, etc.
Related: #4962
Yeah, we have "change to StateMainMenu" coded in various different places as the thing to do when they can't continue as planned.
I would very much like them to have a different way to communicate that error and then let some logic at a higher level decide what the appropriate response is. e.g. show a message and fall back to main menu for a GUI, but print message and quit for headless, etc.
There needs to implement strict Stack or State Machine for states with strict interfaces.
Variant 1:
class States<MENU extends GameState, LOAD extends GameState, GAME extends GameState> {
MENU start(...);
LOAD load(...);
GAME loadDone(...);
? getState();
MENU error(...);
}
Pros:
Variant 2:
I like this https://book.amethyst.rs/book/stable/concepts/state#state-manager
Pros:
1. Extandable
2. Strict transitions.
3. NUI screens can be as substates
Cons:
1.this example use a bit another architecture..
What you were trying to do
Start a headless server and override its default configuration.
What actually happened
The server failed to start the game and crashed.
How to reproduce
./gradlew server
and notice that the server starts successfully./gradlew server --args="--override-default-config=override.cfg"
[main] WARN o.t.e.c.m.loadProcesses.RegisterMods - Missing at least one required module (or dependency) from the following list: [BiomesAPI, Thirst, StructureTemplates, Furnishings, CoreRendering, AnotherWorld, Health, CoreSampleGameplay, Inventory, Explosives, CoreWorlds, CoreAdvancedAssets, Drops, StructuralResources, AnotherWorldPlants, engine, ClimateConditions, AlterationEffects, Fluid, CoreAssets, PlantPack, GrowingFlora]
org.terasology.engine.rendering.nui.internal.TerasologyCanvasImpl.<init>(TerasologyCanvasImpl.java:42)
Log details
Full logs at https://pastebin.com/EN0hZTha
Additional Info
The current assumption is that on failing to start a game, the server attempts to go back to the main menu. Since https://github.com/MovingBlocks/Terasology/pull/4907, the headless server does not have a
NuiManager
anymore which is why it runs into an NPE at this point.Note, that for reproducing this, you might need to take additional actions due to https://github.com/MovingBlocks/Terasology/issues/4956 and https://github.com/MovingBlocks/Terasology/issues/4957 or find a different way to provoke the game start failure in case https://github.com/MovingBlocks/Terasology/issues/4958 has been fixed.