question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening the BT editor with F5 in multiplayer after spawning a few deer then trying to open the drop-down meant to hold BT entities crashes the game

See original GitHub issue

To replicate: Run or join a multiplayer game with WildAnimals enabled. Press F5 and click the drop down in the top left.

To troubleshoot: Follow the stacktrace or consider running in debug mode with a breakpoint close to where the NPE happens. Figure out what the null is and harden the code so the game won’t crash - just log a useful error instead 😃

Results in the following crash log on the client:

12:55:47.947 [main] ERROR o.t.e.event.internal.EventSystemImpl - Failed to invoke event
java.lang.NullPointerException: null
	at org.terasology.logic.behavior.nui.BehaviorEditorScreen$4.get(BehaviorEditorScreen.java:124)
	at org.terasology.logic.behavior.nui.BehaviorEditorScreen$4.get(BehaviorEditorScreen.java:121)
	at org.terasology.rendering.nui.widgets.UIDropdown.getOptions(UIDropdown.java:163)
	at org.terasology.rendering.nui.widgets.UIDropdown$1.onMouseClick(UIDropdown.java:64)
	at org.terasology.rendering.nui.internal.CanvasImpl.processMouseClick(CanvasImpl.java:243)
	at org.terasology.rendering.nui.internal.NUIManagerInternal.mouseButtonEvent(NUIManagerInternal.java:606)
	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.InputSystem.send(InputSystem.java:496)
	at org.terasology.input.InputSystem.sendMouseEvent(InputSystem.java:469)
	at org.terasology.input.InputSystem.processMouseButtonInput(InputSystem.java:212)
	at org.terasology.input.InputSystem.processMouseInput(InputSystem.java:191)
	at org.terasology.input.InputSystem.update(InputSystem.java:134)
	at org.terasology.engine.modes.StateIngame.handleInput(StateIngame.java:192)
	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)
12:55:47.960 [main] ERROR o.terasology.engine.TerasologyEngine - Uncaught exception, attempting clean game shutdown

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
IsaiahBlankscommented, Jul 21, 2020

@skaldarnar Definitely still up to the challenge! I would be interested in implementing Option 2, but for now I can set up option 1 as a temporary fix/ permanent fix if it turns out to be the more graceful solution

1reaction
skaldarnarcommented, Jul 21, 2020

Adding some more information here why #4088 got closed and what another take on this issue might be.

Option 1: If the behavior editor screen needs to interact with the code running as authority then the editor should probably only be availabale on the authority system. We could “fix” the crash by at least checking whether the injected system is non-null, and gracefully fail otherwise. We could evene show a meaningful message in that case stating that in order to use the behavior editor you’ll need to be running as the host. This could also be a short-term solution, even if Option 2 is considered.

Option 2: If the behvior editor can work with minimal to none interaction with code that actually needs to be run on the authority system the system coude could be split up into authority and client systems. This would involve a coordination overhead for sending events around between client and system, but would potentially allow a clean implemenation of the behavior editor based on the client system. @AndyTechGuy did recently figure out how to enable things for multiplayer, introducing server and client events and replicating data.

@IsaiahBlanks I hope you’re still up for the challenge here, Option 1 would definitely make for a better experience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

MW2 Campaign crashing on PC : r/ModernWarfareII - Reddit
So I use Battle.net launcher, and from release to 2-3 hours it was fine on Multiplayer. After that, it would crash when I...
Read more >
Packaged multiplayer game crashes on client when spawning ...
I have not been able to get it to crash playing with 2 clients in the editor window either. On a packaged game...
Read more >
Fix Modern Warfare 2 Crashing on PC - frondtech
COD MW2 crashing – After almost 2 years of waiting, we have finally got a good Call of Duty game. And COD fans...
Read more >
Call Of Duty Modern Warfare 2 Crashing [FIXED] - eXputer.com
However, the 'Stuck at “Connecting“' error occurs when you're searching for a game in Call of Duty MW2 Multiplayer. When players load up...
Read more >
Issue Tracker - Grounded - Obsidian Entertainment
Fixed on Live Player ends up as a spectator camera when they spawn in a multiplayer game. Fixed on Live Grounded is crashing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found