CRASH: 快捷键不判空 createRecipeGui 可致客户端 NPE #5
Open
opened 2026-11-16 22:15:04 +00:00 by layue13
·
0 comments
No Branch/Tag Specified
master
bot/upstream-sync
No results found.
Labels
Clear labels
area/compatibility
origin/scan
priority/p2
type/crash
type/defect
area/build
area/client
area/compatibility
area/config
area/integration
area/lifecycle
area/lighting
area/network
area/performance
area/persistence
area/release
area/render
area/security
area/server
area/test
origin/scan
origin/upstream-sync
构建系统、编译与 CI。
仅客户端(渲染除外)
跨模组、跨版本或外部接口兼容行为。
默认配置、配方、日志噪音
跨仓库 API、工具链或功能联动问题。
实体、区块、世界对象的加载、卸载、持久化与资源所有权。
光照更新、传播队列及其与区块卸载、渲染路径的行为。
网络包与同步
运行时 CPU、内存、分配、网络或存盘开销问题。
NBT、存档、实体/区块加载卸载与生命周期
版本、Maven 坐标、制品发布与发布链路。
渲染、光照、着色器
权限边界、服务端校验、反序列化或其他安全风险。
仅服务端 tick/逻辑
测试实现、覆盖与验证设施
组织内部审计扫描产出
日扫上游 GTNH 发现的待吸收改动
priority
p0
最高处理优先级:广泛崩溃、数据或权限风险,或关键发布通道被阻断且无绕行方案。
priority
p1
高处理优先级:核心功能明显受损或影响范围较大,近期安排处理。
priority
p2
常规处理优先级:影响范围有限且有可行绕行,纳入计划处理。
priority
p3
低处理优先级:影响轻微或仅涉及边界场景,有空再处理。
resolution
duplicate
与另一 issue 重复
resolution
fixed
已有合并的 PR/commit 修复
resolution
invalid
复核后不成立/无法复现/无需处理
resolution
recorded
记录类 issue,记录完成即关闭
resolution
wontfix
评估后决定不修
type
audit
扫描、覆盖普查、设计评估等记录类,本身不是待修缺陷
type
chore
构建、CI、发布、依赖、版本、上游同步、清理
type
defect
功能错误、崩溃、数据错乱(不含性能与安全专项)
type
feature
新功能或联动,当前行为不算故障
type
perf
CPU/内存/分配/网络/存盘开销问题
type
question
待答复/待决策,尚未形成实现任务
type
security
权限越界、复制/刷物品、绕过领地、服务端校验缺失、反序列化
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TDLM/Mobs-Info#5
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
调研编号:I-MI-KEYBIND-CREATERECIPGUI-NULL
现象
Mobs-Info 客户端快捷键
Open Mobs Info GUI调用 NEIGuiCraftingRecipe.createRecipeGui(overlayId, false)后不判空,直接gui.currenthandlers.add(...)。NEI 在
handlers.isEmpty()时返回null(RecipeHandlerQuery会丢掉numRecipes()==0的 handler)。客户端MobHandler.cachedRecipes只在收到服务端LoadConfigPacket后由processMobRecipeMap(mobs, overrides)填充;主菜单/进服前、包未到、或服务端mobHandlerEnabled=false(包内清表)时集合为空 →createRecipeGui返回 null → 按键即客户端 NPE。危害类与优先级
CRASHp2type/defect、priority/p2、area/compatibility、origin/scanKEY_NONE(需玩家绑定后才触发),但绑定后在「配方尚未同步 / Mob Handler 关闭」路径上可稳定复现证据(生效源码)
TDLM/Mobs-Infopin3ea6265×TDLM/NotEnoughItemspin5dbc021Mobs-Info/work/.../KeyBindingHandler.java:33-41Mobs-Info/work/.../MobRecipeLoader.java:1178,1244-1295(客户端清表;仅 packet 路径addRecipe)Mobs-Info/work/.../network/LoadConfigPacket.java:80-96,109-117(mobHandlerEnabled=false发空表)Mobs-Info/work/.../FMLEventHandler.java:37-40(登入才发配置)NotEnoughItems/work/.../GuiCraftingRecipe.java:56-75(空 handlers → null)NotEnoughItems/work/.../RecipeHandlerQuery.java:82-84(numRecipes()>0过滤)触发与复现
LoadConfigPacket处理前按键,或服务端关闭 Mob Handler 后再按client落点
TDLM/Mobs-Info→createRecipeGui判空后 no-op 或本地 fallback;关 Handler 时禁用键TDLM/NotEnoughItemscreateRecipeGui空返回语义保持,调用方须消化范式
createRecipeGui)引证
3ea6265/5dbc021;wave-45 NEI 契约面来源
origin/scanTEMPto CRASH: 快捷键不判空 createRecipeGui 可致客户端 NPE