MovingBlocks / Terasology

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

Enabling Animated Menus breaks widget tabbing #3616

Open AndyTechGuy opened 5 years ago

AndyTechGuy commented 5 years ago

When animated menus are enabled, the widget tabbing will show strange activity in the main menu:

Log

The console shows this error on the first forward animation:

[main] ERROR o.t.e.event.internal.EventSystemImpl - Failed to invoke event
java.lang.NullPointerException: null
    at org.terasology.rendering.nui.AbstractWidget.onBindEvent(AbstractWidget.java:303)
    at org.terasology.rendering.nui.internal.NUIManagerInternal.bindEvent(NUIManagerInternal.java:678)
    at org.terasology.rendering.nui.internal.NUIManagerInternalMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:531)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendConsumableEvent(EventSystemImpl.java:301)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:280)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:204)
    at org.terasology.input.internal.BindableButtonImpl.updateBindState(BindableButtonImpl.java:163)
    at org.terasology.input.InputSystem.updateBindState(InputSystem.java:310)
    at org.terasology.input.InputSystem.processKeyboardInput(InputSystem.java:381)
    at org.terasology.input.InputSystem.update(InputSystem.java:135)
    at org.terasology.engine.modes.StateMainMenu.handleInput(StateMainMenu.java:196)
    at org.terasology.engine.subsystem.lwjgl.LwjglInput.postUpdate(LwjglInput.java:55)
    at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:467)
    at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:421)
    at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:397)
    at org.terasology.engine.Terasology.main(Terasology.java:156)
AlexandrSunLight commented 5 years ago

I can say, that it's not a NullPointerException problem. When animation is on TabbingManager gets wrong information about menu screen (in case of forward animation only). After first transition (from main menu to anything else) TabbingManager gets NewGameScreen, and MainMenuScreen after second.