Minecraft Transit Railway (Automated trains, planes, and more!)

Minecraft Transit Railway (Automated trains, planes, and more!)

1M Downloads

爆炸摧毀月台閘門導致遊戲崩潰回檔

ZiYueCommentary opened this issue · 24 comments

commented

當我把TNT放在月台閘門旁邊並引爆之後,遊戲停止了運行並且存檔滾回到了上一次自動保存的版本

commented

This bug still exist in beta-9.
Crash-report:https://paste.ubuntu.com/p/ft98yM4GmZ/
If abused,it might be a serious problem.

commented

Canonical website O.o

commented

@jonafanho 我在我自己的開發環境裡找到了一個疑似跟問題有關的異常
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.player.PlayerEntity.isCreative()" because "player" is null
這可能跟IBlock內onBreakCreative方法裡檢測玩家是否為創造有關

commented

@jonafanho 我在我自己的開發環境裡找到了一個疑似跟問題有關的異常 Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.player.PlayerEntity.isCreative()" because "player" is null 這可能跟IBlock內onBreakCreative方法裡檢測玩家是否為創造有關

Maybe that's it,because my crash-report pointed that:
java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1657.method_7337()" because "player" is null

commented

@jonafanho 我在我自己的開發環境裡找到了一個疑似跟問題有關的異常 Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.player.PlayerEntity.isCreative()" because "player" is null 這可能跟IBlock內onBreakCreative方法裡檢測玩家是否為創造有關

Maybe that's it,because my crash-report pointed that: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1657.method_7337()" because "player" is null

我刚才删除了那里面关于检测玩家是否为创造的部分
没有任何问题!摧毁屏蔽门不再导致崩溃
不确定是否会不会影响其他方块的破坏

commented

但是我这个 net.minecraft.class_1657.method_7337() 不确定是什么...

commented

Fabric模组里默认自带混淆(可能?)
我在开发环境里使用的是没有混淆的开发版本,所以能找到对应问题的位置

commented

也许吧,一会我去编译一份新的试试看。

commented

@jonafanho 我在我自己的開發環境裡找到了一個疑似跟問題有關的異常 Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.player.PlayerEntity.isCreative()" because "player" is null 這可能跟IBlock內onBreakCreative方法裡檢測玩家是否為創造有關

Maybe that's it,because my crash-report pointed that: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1657.method_7337()" because "player" is null

我刚才删除了那里面关于检测玩家是否为创造的部分 没有任何问题!摧毁屏蔽门不再导致崩溃 不确定是否会不会影响其他方块的破坏

common\src\main\java\mtr\block\BlockDirectionalDoubleBlockBase.java:54
                        IBlock.onBreakCreative(world, player, pos.below());
                              ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockPSDAPGDoorBase.java:54
                IBlock.onBreakCreative(world, player, offsetPos);
                      ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockEscalatorSide.java:45
                IBlock.onBreakCreative(world, player, offsetPos);
                      ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockEscalatorStep.java:39
                        IBlock.onBreakCreative(world, player, pos.relative(IBlock.getSideDirection(state)));
                              ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockPIDSBase.java:70
                        IBlock.onBreakCreative(world, player, pos.relative(facing));
                              ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockRailwaySign.java:92
                        IBlock.onBreakCreative(world, player, checkPos);
                              ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockStationNameTallBase.java:69
                                IBlock.onBreakCreative(world, player, pos.below());
                                      ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock
common\src\main\java\mtr\block\BlockStationNameTallBase.java:72
                                IBlock.onBreakCreative(world, player, pos.below(2));
                                      ^
  符号:   方法 onBreakCreative(Level,Player,BlockPos)
  位置: 接口 IBlock

应该就这些有对 onBreakCreative 的引用,一会我也挨个看一下。

commented

似乎还是不行...只删掉 player.isCreative() 还是会导致崩溃

java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2680.method_26164(net.minecraft.class_3494)" because "$$2" is null
	at net.minecraft.class_2248.method_9576(class_2248.java:499)
	at mtr.block.BlockPSDTop.method_9576(BlockPSDTop.java:75)
	at mtr.block.BlockPSDTop.method_9586(BlockPSDTop.java:80)
	at net.minecraft.class_1927.method_8350(class_1927.java:291)
	at net.minecraft.class_3218.method_8454(class_3218.java:969)
	at net.minecraft.class_1937.method_8437(class_1937.java:507)
	at net.minecraft.class_1541.method_6971(class_1541.java:100)
	at net.minecraft.class_1541.method_5773(class_1541.java:88)
	at net.minecraft.class_3218.method_18762(class_3218.java:699)
	at net.minecraft.class_1937.method_18472(class_1937.java:487)
	at net.minecraft.class_3218.method_31420(class_3218.java:360)
	at net.minecraft.class_5574.method_31791(class_5574.java:54)
	at net.minecraft.class_3218.method_18765(class_3218.java:328)
	at net.minecraft.server.MinecraftServer.redirect$zip000$fixUpdateSuppressionCrashTick(MinecraftServer.java:4250)
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879)
	at net.minecraft.class_3176.method_3813(class_3176.java:324)
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
	at net.minecraft.server.MinecraftServer.handler$zbn000$modifiedRunLoop(MinecraftServer.java:3356)
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:663)
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
	at java.base/java.lang.Thread.run(Thread.java:833)
commented

beta-9

我的意思是,你的beta-9是刚下的吗
我修改的beta-9版本是有forge之前的

commented

我不确定我的改法对不对...
我把 onBreakCreative 方法里面的 && player.isCreative() 删掉了重新编译的...
image
分支是 beta-9。

commented

我不确定我的改法对不对... 我把 onBreakCreative 方法里面的 && player.isCreative() 删掉了重新编译的... image

我自己是这么弄得,能不能问一下你修改的版本?

commented

beta-9

commented

是,刚下的。

commented

是,刚下的。

我不太确定新版beta-9里都有什么影响结果的东西,我待会自己试试

commented

我不太确定新版beta-9里都有什么影响结果的东西,我待会自己试试

at mtr.block.BlockPSDTop.method_9576(BlockPSDTop.java:75)
应该是这个,一会我也去看看 BlockPSDTop 里有什么。
谢谢!

commented
commented

您好,有沒有 crash report?

commented

您好,有沒有 crash report?

Description: Ticking entity

java.lang.NullPointerException: Ticking entity
at mtr.block.IBlock.onBreakCreative(IBlock.java:88)
at mtr.block.BlockDirectionalDoubleBlockBase.method_9576(BlockDirectionalDoubleBlockBase.java:49)
at mtr.block.BlockPSDTop.method_9576(BlockPSDTop.java:66)
at mtr.block.BlockPSDTop.method_9586(BlockPSDTop.java:74)
at net.minecraft.class_1927.method_8350(class_1927.java:284)
at net.minecraft.class_3218.method_8454(class_3218.java:1032)
at net.minecraft.class_1937.method_8437(class_1937.java:573)
at net.minecraft.class_1541.method_6971(class_1541.java:100)
at net.minecraft.class_1541.method_5773(class_1541.java:88)
at net.minecraft.class_3218.method_18762(class_3218.java:621)
at net.minecraft.class_3218$$Lambda$6036/1642844106.accept(Unknown Source)
at net.minecraft.class_1937.method_18472(class_1937.java:561)
at net.minecraft.class_3218.method_18765(class_3218.java:411)
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:871)
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:811)
at net.minecraft.class_1132.method_3748(class_1132.java:118)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:670)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
at net.minecraft.server.MinecraftServer$$Lambda$5717/432006769.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Server thread
Stacktrace:
at mtr.block.IBlock.onBreakCreative(IBlock.java:88)
at mtr.block.BlockDirectionalDoubleBlockBase.method_9576(BlockDirectionalDoubleBlockBase.java:49)
at mtr.block.BlockPSDTop.method_9576(BlockPSDTop.java:66)
at mtr.block.BlockPSDTop.method_9586(BlockPSDTop.java:74)
at net.minecraft.class_1927.method_8350(class_1927.java:284)
at net.minecraft.class_3218.method_8454(class_3218.java:1032)
at net.minecraft.class_1937.method_8437(class_1937.java:573)
at net.minecraft.class_1541.method_6971(class_1541.java:100)
at net.minecraft.class_1541.method_5773(class_1541.java:88)
at net.minecraft.class_3218.method_18762(class_3218.java:621)
at net.minecraft.class_3218$$Lambda$6036/1642844106.accept(Unknown Source)

-- Entity being ticked --
Details:
Entity Type: minecraft:tnt (net.minecraft.class_1541)
Entity ID: 41
Entity Name: 被激活的TNT
Entity's Exact location: 232.60, 26.00, -36.67
Entity's Block location: World: (232,26,-37), Chunk: (at 8,1,11 in 14,-3; contains blocks 224,0,-48 to 239,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Entity's Momentum: 0.00, 0.00, 0.00
Entity's Passengers: []
Entity's Vehicle: ERROR NullPointerException: null
Stacktrace:
at net.minecraft.class_1937.method_18472(class_1937.java:561)
at net.minecraft.class_3218.method_18765(class_3218.java:411)

更完整的崩溃报告

commented

You tried to blow up platform screen doors?

commented

You tried to blow up platform screen doors?

这是我在偶然发现的错误,如果有人借此恶意针对有mtr模组的服务器会发生什么

commented

@ZiYueCommentary Does this still happen in the latest version?

commented

@ZiYueCommentary Does this still happen in the latest version?

这个bug在beta-8的fabric版中依旧存在(仅站台屏蔽门Platform Screen Doors)