Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Rare PersistenceNetwork NPE

未关闭
#1,147 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
java
领域
backend

调研方向

从 PersistenceNetwork.java:104 开始,以 LocalPackages/auto_include.ms:408 处失败的 invocation 作为入口点,跟踪来自 Persistence.java:181 的 get_value 调用。确定哪个持久化状态为 null,并复现报告的路径;完成标准是该路径不再抛出罕见的 NullPointerException,并且相关行为由回归测试覆盖。

由索引模型根据 Issue 内容生成。

描述

bug

CMDHELPER-3153 - Reported by PseudoKnight

Not sure what's going on here, but I thought I'd add this to keep track of it. This code has run countless times with no issue.

[22:33:56] [Server thread/ERROR]: Uh oh! You've found an error in Core.
This is an error caused while running your code, so you may be able to find a workaround, but is ultimately an error in Core itself.
The line of code that caused the error was this:
get_value('uuids', @uuid)
on or around /plugins/CommandHelper/LocalPackages/auto_include.ms:408.
Please report this error to the developers, and be sure to include the version numbers:
Server version: 1.12-R0.1-SNAPSHOT;
CommandHelper version: 3.3.2-SNAPSHOT.3201-;
Loaded extensions and versions:
CHPerms (version 2.0.0);
CHSerialize (version 0.0.1);
CHSpigot (version 1.5.1);
CHPaper (version 0.0.1);
CHFiles (version 2.1.2);
CHStargate (version 2.0.0);
CHNaughty (version 3.4.3);
CHDynmap (version 1.1.3);
CHVirtualChests (version 1.0.5);
SKCompat (version 2.1.0);
Core (version 3.3.2);
Here's the stacktrace:
java.lang.NullPointerException
	at com.laytonsmith.persistence.PersistenceNetwork.get(PersistenceNetwork.java:104)
	at com.laytonsmith.core.functions.Persistence$get_value.exec(Persistence.java:181)
	at com.laytonsmith.core.Script.eval(Script.java:375)
	at com.laytonsmith.core.Script.eval(Script.java:344)
	at com.laytonsmith.core.Procedure.execute(Procedure.java:219)
	at com.laytonsmith.core.Procedure.cexecute(Procedure.java:169)
	at com.laytonsmith.core.Script.eval(Script.java:304)
	at com.laytonsmith.core.Script.eval(Script.java:344)
	at com.laytonsmith.core.Script.eval(Script.java:344)
	at com.laytonsmith.core.functions.DataHandling$foreach.execs(DataHandling.java:781)
	at com.laytonsmith.core.Script.eval(Script.java:334)
	at com.laytonsmith.core.Script.seval(Script.java:253)
	at com.laytonsmith.core.functions.BasicLogic$_if.execs(BasicLogic.java:85)
	at com.laytonsmith.core.Script.eval(Script.java:334)
	at com.laytonsmith.core.Script.eval(Script.java:344)
	at com.laytonsmith.core.Script.seval(Script.java:253)
	at com.laytonsmith.core.functions.BasicLogic$_switch.execs(BasicLogic.java:411)
	at com.laytonsmith.core.Script.eval(Script.java:334)
	at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:2001)
	at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1958)
	at com.laytonsmith.core.Script.run(Script.java:207)
	at com.laytonsmith.core.AliasCore.alias(AliasCore.java:153)
	at com.laytonsmith.commandhelper.CommandHelperListener.runAlias(CommandHelperListener.java:80)
	at com.laytonsmith.commandhelper.CommandHelperListener.onPlayerCommandPreprocess(CommandHelperListener.java:112)
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor30.execute(Unknown Source)
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44)
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78)
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:514)
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:499)
	at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1416)
	at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1229)
	at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
	at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5)
	at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14)
	at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$$Lambda$32/1449009888.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
	at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:842)
	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423)
	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:766)
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:664)
	at java.lang.Thread.run(Unknown Source)
主要语言
Java
星标
128
派生
70
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

EngineHub/CommandHelper 的其他 Issue

查看 EngineHub/CommandHelper 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。