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

Using Give Command crashes Server #168

Closed
rayrobdod opened this issue Jun 22, 2018 · 0 comments
Closed

Using Give Command crashes Server #168

rayrobdod opened this issue Jun 22, 2018 · 0 comments

Comments

@rayrobdod
Copy link
Collaborator

problem

Description:

When a unit attempts to use the Give command, (transfer a rescued unit from itself to another unit), the server crashes.

SPECS:

CPU: Intel Core i5 @2.5GHz (64 bit)

GPU: Intel HD Graphics 620

RAM: ~8GB

OS: Windows 10

JRE Ver: Java(TM) SE Runtime Environment (build 9.0.4+11)


Expected Behavior:

The rescued unit is transferred from the giver to the givee from the perspective of both clients.


Actual Behavior:

The server crashes


Steps to Reproduce:

With three units, Unit B being able to be rescued by both units A and C.

  1. Blue turn one, have unit A rescue unit B, then end turn.
  2. Red turn one, end turn
  3. Blue turn two, have unit A Give to unit C.

Examples:

This specific error_log_sever is from f66572a, although anything newer than v1.5 inclusive gives a similar error log.

java.lang.IllegalStateException: rescuedUnit == null
	at net.fe.unit.Unit.give(Unit.java:302)
	at net.fe.network.command.TakeCommand.applyServer(TakeCommand.java:31)
	at net.fe.overworldStage.OverworldStage.processCommands(OverworldStage.java:366)
	at net.fe.overworldStage.OverworldStage.executeMessage(OverworldStage.java:266)
	at net.fe.overworldStage.OverworldStage.beginStep(OverworldStage.java:259)
	at net.fe.network.FEServer.loop(FEServer.java:116)
	at net.fe.network.serverui.FEServerFrame.lambda$serverStart$0(FEServerFrame.java:57)
	at java.base/java.lang.Thread.run(Unknown Source)

Attempting to give on v1.4 also crashes the server, but with a completely different error_log_sever.

java.lang.IllegalArgumentException: Unkown command: GIVE
	at net.fe.overworldStage.OverworldStage.processCommands(OverworldStage.java:448)
	at net.fe.overworldStage.OverworldStage.beginStep(OverworldStage.java:263)
	at net.fe.network.FEServer.loop(FEServer.java:347)
	at net.fe.network.FEServer$4$2.run(FEServer.java:263)

In v1.3, the server doesn't crash, but the rescued unit isn't transferred in the opponent's game leading to a desynch and, eventually, a client crash via null dereference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants