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

QQ群有新消息导致所有玩家掉线 #29

Open
chenxi050402 opened this issue Jul 23, 2020 · 7 comments
Open

QQ群有新消息导致所有玩家掉线 #29

chenxi050402 opened this issue Jul 23, 2020 · 7 comments
Assignees
Labels
bug Something isn't working Bukkit

Comments

@chenxi050402
Copy link

chenxi050402 commented Jul 23, 2020

描述这个错误
当新消息被接收时,与ViaVersion插件产生冲突,抛出空指针错误

期望的运行结果
正常显示消息,无玩家掉线

作业平台 (请务必完善本栏内容):

  1. 第一作业平台
    • 操作系统: Windows 10 Professional Insider Preview Build 20170.rs_prerelease.200710-1419
    • 运行平台: CraftBukkit version git-PaperSpigot-"4c7641d" (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
    • 插件版本: 2.0.0
    • 运行平台: CoolQ Air
    • 插件版本: 2.1.0
@ExerciseBook
Copy link
Contributor

来个报错的堆栈信息,感谢。(就是后台里的报错信息)

@chenxi050402
Copy link
Author

[20:21:03 WARN]: [ViaVersion] ERROR IN Protocol1_13To1_12_2 IN REMAP OF CHAT_MESSAGE (0x0F)
[20:21:03 WARN]: io.netty.handler.codec.EncoderException: java.lang.NullPointerException
[20:21:03 WARN]: at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:651)
[20:21:03 WARN]: at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:112)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741)
[20:21:03 WARN]: at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895)
[20:21:03 WARN]: at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240)
[20:21:03 WARN]: at net.minecraft.server.v1_8_R3.NetworkManager$4.run(NetworkManager.java:198)
[20:21:03 WARN]: at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)
[20:21:03 WARN]: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
[20:21:03 WARN]: at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
[20:21:03 WARN]: at java.lang.Thread.run(Unknown Source)
[20:21:03 WARN]: Caused by: java.lang.NullPointerException
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:24)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:15)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:91)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:20)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.BaseComponentSerializer.deserialize(BaseComponentSerializer.java:51)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:23)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:15)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:91)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:20)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.BaseComponentSerializer.deserialize(BaseComponentSerializer.java:51)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:23)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:15)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:91)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:20)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:917)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.parse(ComponentSerializer.java:46)
[20:21:03 WARN]: at us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter.processTranslate(ChatRewriter.java:122)
[20:21:03 WARN]: at us.myles.ViaVersion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2$6$1.handle(Protocol1_13To1_12_2.java:270)
[20:21:03 WARN]: at us.myles.ViaVersion.api.remapper.PacketHandler.write(PacketHandler.java:19)
[20:21:03 WARN]: at us.myles.ViaVersion.api.remapper.PacketRemapper.remap(PacketRemapper.java:127)
[20:21:03 WARN]: at us.myles.ViaVersion.api.protocol.Protocol.transform(Protocol.java:419)
[20:21:03 WARN]: at us.myles.ViaVersion.api.PacketWrapper.apply(PacketWrapper.java:432)
[20:21:03 WARN]: at us.myles.ViaVersion.api.protocol.ProtocolPipeline.transform(ProtocolPipeline.java:81)
[20:21:03 WARN]: at us.myles.ViaVersion.api.data.UserConnection.transform(UserConnection.java:323)
[20:21:03 WARN]: at us.myles.ViaVersion.api.data.UserConnection.transformOutgoing(UserConnection.java:301)
[20:21:03 WARN]: at us.myles.ViaVersion.bukkit.handlers.BukkitEncodeHandler.transform(BukkitEncodeHandler.java:64)
[20:21:03 WARN]: at us.myles.ViaVersion.bukkit.handlers.BukkitEncodeHandler.encode(BukkitEncodeHandler.java:57)
[20:21:03 WARN]: at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
[20:21:03 WARN]: ... 15 more
[20:21:03 WARN]: io.netty.handler.codec.EncoderException: java.lang.NullPointerException
[20:21:03 WARN]: at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:651)
[20:21:03 WARN]: at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:112)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706)
[20:21:03 WARN]: at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741)
[20:21:03 WARN]: at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895)
[20:21:03 WARN]: at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240)
[20:21:03 WARN]: at net.minecraft.server.v1_8_R3.NetworkManager$4.run(NetworkManager.java:198)
[20:21:03 WARN]: at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)
[20:21:03 WARN]: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
[20:21:03 WARN]: at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
[20:21:03 WARN]: at java.lang.Thread.run(Unknown Source)
[20:21:03 WARN]: Caused by: java.lang.NullPointerException
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:24)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:15)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:91)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:20)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.BaseComponentSerializer.deserialize(BaseComponentSerializer.java:51)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:23)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:15)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:91)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:20)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.BaseComponentSerializer.deserialize(BaseComponentSerializer.java:51)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:23)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:15)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson$1.deserialize(Gson.java:138)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:91)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.deserialize(ComponentSerializer.java:20)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:879)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:944)
[20:21:03 WARN]: at us.myles.viaversion.libs.gson.Gson.fromJson(Gson.java:917)
[20:21:03 WARN]: at us.myles.viaversion.libs.bungeecordchat.chat.ComponentSerializer.parse(ComponentSerializer.java:46)
[20:21:03 WARN]: at us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter.processTranslate(ChatRewriter.java:122)
[20:21:03 WARN]: at us.myles.ViaVersion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2$6$1.handle(Protocol1_13To1_12_2.java:270)
[20:21:03 WARN]: at us.myles.ViaVersion.api.remapper.PacketHandler.write(PacketHandler.java:19)
[20:21:03 WARN]: at us.myles.ViaVersion.api.remapper.PacketRemapper.remap(PacketRemapper.java:127)
[20:21:03 WARN]: at us.myles.ViaVersion.api.protocol.Protocol.transform(Protocol.java:419)
[20:21:03 WARN]: at us.myles.ViaVersion.api.PacketWrapper.apply(PacketWrapper.java:432)
[20:21:03 WARN]: at us.myles.ViaVersion.api.protocol.ProtocolPipeline.transform(ProtocolPipeline.java:81)
[20:21:03 WARN]: at us.myles.ViaVersion.api.data.UserConnection.transform(UserConnection.java:323)
[20:21:03 WARN]: at us.myles.ViaVersion.api.data.UserConnection.transformOutgoing(UserConnection.java:301)
[20:21:03 WARN]: at us.myles.ViaVersion.bukkit.handlers.BukkitEncodeHandler.transform(BukkitEncodeHandler.java:64)
[20:21:03 WARN]: at us.myles.ViaVersion.bukkit.handlers.BukkitEncodeHandler.encode(BukkitEncodeHandler.java:57)
[20:21:03 WARN]: at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
[20:21:03 WARN]: ... 15 more
[20:21:03 INFO]: InklingMace lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException
[20:21:03 INFO]: InklingMace left the game.

@ExerciseBook ExerciseBook added the help wanted Extra attention is needed label Jul 23, 2020
@ExerciseBook
Copy link
Contributor

image

这是我的测试结果挺正常。然后我在堆栈信息里也没看到我们的包名。迷惑。
稍等 我换个人来看 @endymx

@chenxi050402
Copy link
Author

@ExerciseBook 抱歉描述打错了,冲突的插件为ViaVersion

@ExerciseBook
Copy link
Contributor

好 感谢 我回头忙完手上的作业就去看一下。

@ExerciseBook ExerciseBook added the question Further information is requested label Jul 23, 2020
@ExerciseBook
Copy link
Contributor

ExerciseBook commented Jul 29, 2020

来自群里的记录,先记一下,可能以后用得上:

  1. 和 viaversion 无关
  2. 可能的成因是旧版的MC服务器对非标准 ASCII 字符的支持和新版有区别。

@endymx 你去测一下看看这是个什么奇怪的问题。

@ExerciseBook ExerciseBook added bug Something isn't working Bukkit and removed help wanted Extra attention is needed question Further information is requested labels Jul 29, 2020
@ExerciseBook
Copy link
Contributor

ExerciseBook commented Jul 29, 2020

线索补充:V1 的插件无这个现象。

这部分代码没有修改 感觉可能是编译器版本升级导致的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Bukkit
Projects
None yet
Development

No branches or pull requests

3 participants