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

Prism連携時に、LunaChatでNullPointerExceptionが発生する #149

Closed
ucchyocean opened this issue Oct 2, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@ucchyocean
Copy link
Owner

commented Oct 2, 2016

フォーラムで報告をいただいた不具合。

StackTraceは下記の通り。

[00:37:13] [Server thread/INFO]: [D]kotarobo_ さんがチャンネルチャットに参加しました。
[00:37:13] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'ch' in plugin LunaChat v2.8.6
   at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_51]
   at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_51]
   at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
Caused by: java.lang.NullPointerException
   at com.github.ucchyocean.lc.channel.ChannelImpl.log(ChannelImpl.java:768) ~[?:?]
   at com.github.ucchyocean.lc.channel.ChannelImpl.sendMessage(ChannelImpl.java:460) ~[?:?]
   at com.github.ucchyocean.lc.channel.ChannelImpl.sendSystemMessage(ChannelImpl.java:303) ~[?:?]
   at com.github.ucchyocean.lc.channel.Channel.addMember(Channel.java:253) ~[?:?]
   at com.github.ucchyocean.lc.command.JoinCommand.runCommand(JoinCommand.java:229) ~[?:?]
   at com.github.ucchyocean.lc.command.LunaChatCommand.onCommand(LunaChatCommand.java:136) ~[?:?]
   at com.github.ucchyocean.lc.LunaChat.onCommand(LunaChat.java:144) ~[?:?]
   at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.8.8.jar:git-Spigot-db6de12-07c3001]
   ... 15 more

@ucchyocean ucchyocean added the バグ label Oct 2, 2016

@ucchyocean ucchyocean added this to the v2.8.8 milestone Oct 2, 2016

@ucchyocean ucchyocean self-assigned this Oct 2, 2016

@ucchyocean

This comment has been minimized.

Copy link
Owner Author

commented Oct 2, 2016

ChannelImpl.java:768行目は、Prism連携時にPrismにログを書き込む処理であり、チャンネルのシステムメッセージや、DiscordSRV連携しているときのDiscordからのメッセージが通過したときに、NullPointerExceptionが発生する。
システムメッセージなので、紐づくPlayerがnullになっているためである。
単純な、nullチェック漏れである。戒めて。

ucchyocean added a commit that referenced this issue Oct 2, 2016

@ucchyocean

This comment has been minimized.

Copy link
Owner Author

commented Oct 2, 2016

Fixed
動作確認OK

@ucchyocean ucchyocean closed this Oct 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.