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

[BUG] Enviar emotes usando "Win + ." no chat desconectando os jogadores #357

Open
thel0thric opened this issue Oct 4, 2021 · 4 comments
Assignees
Labels
Bug A confirmed BUG and need to be fixed

Comments

@thel0thric
Copy link

Quando qualquer jogador digita "/g " enviando um emote usando o Win + . (função do Windows 10 que abre uma aba de emotes) todos os jogadores do servidor são abruptamente desconectados. O problema parece estar na writeString do PacketBuffer, acreditamos que adicionar um try catch pro caso do erro rolar não mandar o pacote pros jogadores resolveria o problema.

Provavelmente tem a ver com a conversão pra utf8, já que os emotes são utf16.

PS: Caso o jogador tente enviar o emote sem usar um comando antes (como /g ou /l) nada acontece, e a mensagem é enviada ou em "?" ou chat limpo (sem caracteres).

@thel0thric thel0thric added the New Issue A new bug report label Oct 4, 2021
@thel0thric
Copy link
Author

message (19).txt

@thel0thric
Copy link
Author

[15:10:41] [Server thread/INFO] [nucleus]: Surfista ran the command: /g 🐒
[15:10:41] [Server thread/INFO] [chatpixel]: 🐒?
[15:10:41] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: [g] [Lvl 19] Aprendiz Surfista » 🐒?
[15:10:41] [Netty Epoll Server IO #0/ERROR] [FML]: NetworkDispatcher exception
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Unpaired surrogate at index 1250
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106) ~[minecraft_server.1.12.2.jar:?]
at com.ichorpowered.protocolcontrol.packet.PacketHandler.write(PacketHandler.java:132) ~[PacketHandler.class:0.0.2]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[minecraft_server.1.12.2.jar:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.write(NetworkDispatcher.java:548) ~[NetworkDispatcher.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:104) ~[minecraft_server.1.12.2.jar:?]
at com.ichorpowered.protocolcontrol.packet.PacketHandler$Outgoing.write(PacketHandler.java:230) ~[PacketHandler$Outgoing.class:0.0.2]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[minecraft_server.1.12.2.jar:?]
at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:245) [gw$4.class:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [minecraft_server.1.12.2.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [minecraft_server.1.12.2.jar:?]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) [minecraft_server.1.12.2.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [minecraft_server.1.12.2.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]
Caused by: java.lang.IllegalArgumentException: Unpaired surrogate at index 1250
at com.google.common.base.Utf8.encodedLengthGeneral(Utf8.java:93) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.base.Utf8.encodedLength(Utf8.java:67) ~[minecraft_server.1.12.2.jar:?]
at net.minecraft.network.PacketBuffer.func_180714_a(PacketBuffer.java:48) ~[gy.class:?]
at net.minecraft.network.PacketBuffer.func_179256_a(PacketBuffer.java:181) ~[gy.class:?]
at net.minecraft.network.play.server.SPacketChat.func_148840_b(SourceFile:35) ~[in.class:?]
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:51) ~[ha.class:?]
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) ~[ha.class:?]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[minecraft_server.1.12.2.jar:?]
... 30 more
[15:10:41] [Netty Epoll Server IO #3/ERROR] [FML]: NetworkDispatcher exception
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Unpaired surrogate at index 1250
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106) ~[minecraft_server.1.12.2.jar:?]
at com.ichorpowered.protocolcontrol.packet.PacketHandler.write(PacketHandler.java:132) ~[PacketHandler.class:0.0.2]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[minecraft_server.1.12.2.jar:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.write(NetworkDispatcher.java:548) ~[NetworkDispatcher.class:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:104) ~[minecraft_server.1.12.2.jar:?]
at com.ichorpowered.protocolcontrol.packet.PacketHandler$Outgoing.write(PacketHandler.java:230) ~[PacketHandler$Outgoing.class:0.0.2]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[minecraft_server.1.12.2.jar:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[minecraft_server.1.12.2.jar:?]
at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:245) [gw$4.class:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [minecraft_server.1.12.2.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [minecraft_server.1.12.2.jar:?]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) [minecraft_server.1.12.2.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [minecraft_server.1.12.2.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]
Caused by: java.lang.IllegalArgumentException: Unpaired surrogate at index 1250
at com.google.common.base.Utf8.encodedLengthGeneral(Utf8.java:93) ~[minecraft_server.1.12.2.jar:?]
at com.google.common.base.Utf8.encodedLength(Utf8.java:67) ~[minecraft_server.1.12.2.jar:?]
at net.minecraft.network.PacketBuffer.func_180714_a(PacketBuffer.java:48) ~[gy.class:?]
at net.minecraft.network.PacketBuffer.func_179256_a(PacketBuffer.java:181) ~[gy.class:?]
at net.minecraft.network.play.server.SPacketChat.func_148840_b(SourceFile:35) ~[in.class:?]
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:51) ~[ha.class:?]
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) ~[ha.class:?]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[minecraft_server.1.12.2.jar:?]
... 30 more

@FabioZumbi12
Copy link
Owner

Essa é nova, tenho que analisar melhor depois.

@FabioZumbi12 FabioZumbi12 added Bug A confirmed BUG and need to be fixed and removed New Issue A new bug report labels Jun 2, 2022
@FabioZumbi12
Copy link
Owner

Nâo consegui reproduzir, ainda ocorre?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A confirmed BUG and need to be fixed
Projects
None yet
Development

No branches or pull requests

2 participants