MovingBlocks / Terasology

Terasology - open source voxel world
http://terasology.org
Apache License 2.0
3.69k stars 1.34k forks source link

UI Systems try to load when NUIManager is not present #4922

Open keturn opened 3 years ago

keturn commented 3 years ago

4907 made it so that headless systems don't have any NUIManager in their Context. But that doesn't stop systems that are dependent upon it from trying to initialize anyway.

excerpt from a log of a DynamicCities MTE test
WARN  o.t.engine.registry.InjectionHelper - ChatSystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - NUIEditorSystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - CoreCommands wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - ClientCommands wanted CameraTargetSystem injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - BindCommands wanted BindsManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - BlockCommands wanted WorldProviderCoreImpl injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - ConsoleSystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - BehaviorTreeEditorSystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - NUISkinEditorSystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - InteractionSystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - BiomeManager wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - CharacterInventorySystem wanted NUIManager injected but CoreRegistry has none.
WARN  o.t.engine.registry.InjectionHelper - DefaultMinimapSystem wanted NUIManager injected but CoreRegistry has none.
ERROR o.t.e.core.ComponentSystemManager - Failed to initialise system org.terasology.logic.players.DefaultMinimapSystem@7ae9327a
java.lang.NullPointerException: null
    at org.terasology.logic.players.DefaultMinimapSystem.initialise(DefaultMinimapSystem.java:67)
    at org.terasology.engine.core.ComponentSystemManager.initialiseSystem(ComponentSystemManager.java:211)
    at org.terasology.engine.core.ComponentSystemManager.initialise(ComponentSystemManager.java:194)
    at org.terasology.engine.core.modes.loadProcesses.InitialiseSystems.step(InitialiseSystems.java:36)
    at org.terasology.engine.core.modes.StateLoading.update(StateLoading.java:249)
    at org.terasology.engine.core.TerasologyEngine.tick(TerasologyEngine.java:499)
    at org.terasology.moduletestingenvironment.ModuleTestingEnvironment.createHost(ModuleTestingEnvironment.java:568)
    at org.terasology.moduletestingenvironment.ModuleTestingEnvironment.setup(ModuleTestingEnvironment.java:185)
keturn commented 3 years ago

Is NUIManager optional?

DarkWeird commented 3 years ago

Yeah. Similar problem i meet at GooKeeper. But GooKeeper fail at player location... Which not exists at server.

Headless client or server(host)?

Second - architecture problem First - nice to fix(potentially there can be testing bot with Record and Replay)

jdrueckert commented 3 years ago

Non-client-only system referencing NUI or HUD widgets