Grasscutters / Grasscutter

A server software reimplementation for a certain anime game.
https://grasscutter.io/
GNU Affero General Public License v3.0
16.21k stars 4.47k forks source link

[Bug] Character stamina bug in latest dev #671

Closed xmgnew closed 2 years ago

xmgnew commented 2 years ago

In the latest build (build#91), the character's stamina will not recover after pressing the esc menu. I get the build from here: https://ci.grasscutter.ga/job/Grasscutter-Dev/91/

here is the link to my video showing the bug: https://drive.google.com/file/d/1hgyn7rsJLyDuz521ZXDbirvGwTIe8XH-/view?usp=sharing

In the video, look at character's stamina. At first, it recovers after sprinting, but after pressing the ESC menu then go back, the stamina will not recover

AZthemute commented 2 years ago

In the latest build (build#91), the character's stamina will not recover after pressing the esc menu. I get the build from here: https://ci.grasscutter.ga/job/Grasscutter-Dev/91/

Build the dev builds yourself. I did so and I'm not getting any issues.

liesened commented 2 years ago

for me, it happens too. i built the latest commit b3317bd6d75c7a23d3004556ba73f25323cc7eca also the server spits this:

java.lang.IllegalStateException: Timer already cancelled.
        at java.base/java.util.Timer.sched(Timer.java:409)
        at java.base/java.util.Timer.scheduleAtFixedRate(Timer.java:340)
        at emu.grasscutter.game.managers.StaminaManager.StaminaManager.startSustainedStaminaHandler(StaminaManager.java:145)
        at emu.grasscutter.game.player.Player.onUnpause(Player.java:879)
        at emu.grasscutter.game.player.Player.setPaused(Player.java:538)
        at emu.grasscutter.server.packet.recv.HandlerPlayerSetPauseReq.handle(HandlerPlayerSetPauseReq.java:20)
        at emu.grasscutter.server.game.GameServerPacketHandler.handle(GameServerPacketHandler.java:86)
        at emu.grasscutter.server.game.GameSession.onMessage(GameSession.java:250)
        at emu.grasscutter.netty.KcpChannel.channelRead(KcpChannel.java:43)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.jpower.kcp.netty.UkcpServerChannel$UkcpServerUnsafe.read(UkcpServerChannel.java:603)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:833)