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

NPE for CurrencyManagementSystem in multiplayer #25

Closed
Cervator opened this issue Aug 3, 2019 · 0 comments

Comments

@Cervator
Copy link
Member

commented Aug 3, 2019

A pure client connected to a server running Metal Renegades appears to crash after a moment with the following error:

java.lang.NullPointerException
	at org.terasology.metalrenegades.economy.systems.CurrencyManagementSystem.update(CurrencyManagementSystem.java:43)
	at org.terasology.engine.modes.StateIngame.update(StateIngame.java:171)
	at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:458)
	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)

Am guessing the WalletSystem initialization isn't working for some reason on a pure client. It is fine on a server/client and the headless server itself is also fine.

Note that the idea of updating a player's wallet in a client system seems problematic, which may indeed be the problem - usually any sort of over-time simulation should happen in an authority system so it'll only run on the server.

In the same class: COOLDOWN could use a final thrown on there :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.