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

Death screen timeout #429

Closed
lmjcbs opened this issue Feb 27, 2017 · 7 comments
Closed

Death screen timeout #429

lmjcbs opened this issue Feb 27, 2017 · 7 comments

Comments

@lmjcbs
Copy link

lmjcbs commented Feb 27, 2017

Glowstone build: 359

Not respawning ~20s after dying results in a timeout/disconnect.

11:32:47 [INFO] pandanoir died.
11:33:08 [INFO] pandanoir [/127.0.0.1:61614] lost connection
11:33:08 [INFO] pandanoir left the game

Joining the server again brings me back to the death screen and gives an error.

2017-02-27_11 31 33

11:33:18 [SEVERE] Error while executing GlowTask{id=325, plugin=null, sync=true: net.glowstone.net.handler.login.EncryptionKeyResponseHandler$ClientAuthCallback$$Lambda$46/16301328@cf7021}
java.lang.NullPointerException
        at net.glowstone.entity.GlowPlayer.getDisplayName(GlowPlayer.java:1004)
        at net.glowstone.entity.GlowLivingEntity.setHealth(GlowLivingEntity.java:572)
        at net.glowstone.entity.GlowPlayer.setHealth(GlowPlayer.java:1319)
        at net.glowstone.io.entity.LivingEntityStore.load(LivingEntityStore.java:58)
        at net.glowstone.io.entity.HumanEntityStore.load(HumanEntityStore.java:29)
        at net.glowstone.io.entity.PlayerStore.load(PlayerStore.java:38)
        at net.glowstone.io.entity.PlayerStore.load(PlayerStore.java:9)
        at net.glowstone.io.entity.EntityStorage.load(EntityStorage.java:216)
        at net.glowstone.io.nbt.NbtPlayerDataService.readDataImpl(NbtPlayerDataService.java:47)
        at net.glowstone.io.nbt.NbtPlayerDataService.access$100(NbtPlayerDataService.java:28)
        at net.glowstone.io.nbt.NbtPlayerDataService$NbtPlayerReader.readData(NbtPlayerDataService.java:230)
        at net.glowstone.entity.GlowPlayer.join(GlowPlayer.java:370)
        at net.glowstone.net.GlowSession.setPlayer(GlowSession.java:360)
        at net.glowstone.net.handler.login.EncryptionKeyResponseHandler$ClientAuthCallback.lambda$done$0(EncryptionKeyResponseHandler.java:153)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at net.glowstone.scheduler.GlowTask.run(GlowTask.java:167)
        at net.glowstone.scheduler.GlowScheduler.pulse(GlowScheduler.java:152)
        at net.glowstone.scheduler.GlowScheduler.lambda$start$0(GlowScheduler.java:83)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

If I still don't respawn after ~20s of re-joining the server for the first time results in another timeout/disconnect. However joining again after this second timeout/disconnect forces a spawn.

@MrPowerGamerBR
Copy link
Contributor

Can confirm this issue

@aramperes
Copy link
Member

I have fixed multiple issues relating to death in 0f4057b, including the error message. Unfortunately, I have not been able to reproduce the disconnection issue. Could you please test it using the latest build?

@lmjcbs
Copy link
Author

lmjcbs commented Feb 27, 2017

Glowstone build #360

Disconnect is still present. The error message on rejoin has gone, but it no longer forces spawn like it did after the second rejoin.

13:58:38 [INFO] pandanoir died.
13:58:58 [INFO] pandanoir [/127.0.0.1:55623] lost connection
13:58:58 [INFO] pandanoir left the game
13:59:08 [INFO] pandanoir died.
13:59:08 [INFO] pandanoir [/127.0.0.1:55714] connected, UUID: 1352d980-d417-419c-affa-d9a1c8efeffd
13:59:08 [INFO] pandanoir joined the game
13:59:29 [INFO] pandanoir [/127.0.0.1:55714] lost connection
13:59:29 [INFO] pandanoir left the game
13:59:34 [INFO] pandanoir died.
13:59:34 [INFO] pandanoir [/127.0.0.1:55742] connected, UUID: 1352d980-d417-419c-affa-d9a1c8efeffd
13:59:34 [INFO] pandanoir joined the game
13:59:54 [INFO] pandanoir [/127.0.0.1:55742] lost connection
13:59:54 [INFO] pandanoir left the game

@mastercoms
Copy link
Member

mastercoms commented Feb 27, 2017

Maybe the vanilla client doesn't send packets when dead, so Glowstone thinks it has disconnected? Maybe we should add a isDead check in the lag disconnection loop. However, that would introduce problems when people would actually disconnect while dead.

@mastercoms mastercoms added this to the 2017.3 milestone Mar 4, 2017
@aramperes
Copy link
Member

Cause appears to be that the "Keep Alive" packet is not sent by the server when the player is dead. That packet (0x1F) should be sent frequently. The client will disconnect itself if the server has not sent a K-A in 20 seconds.

@KiuIras
Copy link
Contributor

KiuIras commented Dec 26, 2017

I can't reproduce this bug. Maybe is it resolved?

@mastercoms
Copy link
Member

Fixed in 002bf47

@ghost ghost removed the help wanted label Jan 3, 2018
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

6 participants