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

Trying to ride boats/chest boats crashes the server #6883

Closed
1 task done
derigin opened this issue Jul 8, 2024 · 1 comment
Closed
1 task done

Trying to ride boats/chest boats crashes the server #6883

derigin opened this issue Jul 8, 2024 · 1 comment
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.

Comments

@derigin
Copy link

derigin commented Jul 8, 2024

Skript/Server Version

[Skript] Server Version: 1.21-2256-de2e7a7 (MC: 1.21)
[Skript] Skript Version: 2.9.0-pre1 (skriptlang-github)
[Skript] Installed Skript Addons: 
[Skript]  - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[Skript]  - Skellett v2.0.10 (https://forums.skunity.com/resources/skellett.24/)
[Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[Skript]  - skript-yaml v1.5
[Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
[Skript]  - skRayFall v1.9.28 (https://sk.rayfall.net/)
[Skript]  - SkQuery v4.1.10
[Skript]  - Skript-Paper v1.3.0 (https://github.com/ShaneBeee/Skript-Paper)
[Skript]  - SkBee v3.5.6 (https://github.com/ShaneBeee/SkBee)
[Skript] Installed dependencies: 
[Skript]  - Vault v1.7.3-b131
[Skript]  - WorldGuard v7.0.11-beta1+a801a9d
[Skript]  - GriefPrevention v16.18.4

Bug Description

I am able to place a boat or chest boat (of all types, including rafts) just fine. As soon as I try to click it to ride it, the server crashes. I tried disabling Skript, and I am able to ride boats just fine. I then tried enabling Skript, but disabling all addons, and the crash still happens when I try to ride boats. This leads me to believe it's not caused by an addon. I've tested this out with other rideable entities (e.g. minecarts, pigs, horses) and they are still rideable with Skript enabled. For me, it just seems to impact boats.

Expected Behavior

I should be able to ride boats without the server crashing.

Steps to Reproduce

I entered a world, took out a boat, and placed it on the water. When I go to right click the boat to ride it, the server briefly hangs without any action being taken, and then crashes.

Errors or Screenshots

[16:09:03] [Server thread/ERROR]: #!#! Stack trace:
[16:09:03] [Server thread/ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "stack" is null
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.entity.BoatChestData.isOfItemType(BoatChestData.java:114)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.classes.data.DefaultComparators$15.compare(DefaultComparators.java:314)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.classes.data.DefaultComparators$15.compare(DefaultComparators.java:300)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.events.EvtClick$2.check(EvtClick.java:208)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:165)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.lang.util.SimpleLiteral.check(SimpleLiteral.java:179)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.lang.ExpressionList.check(ExpressionList.java:165)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.lang.ExpressionList.check(ExpressionList.java:177)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.events.EvtClick.check(EvtClick.java:204)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.SkriptEventHandler.lambda$execute$3(SkriptEventHandler.java:193)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.util.Task.callSync(Task.java:164)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.util.Task.callSync(Task.java:148)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.SkriptEventHandler.execute(SkriptEventHandler.java:192)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:138)
[16:09:03] [Server thread/ERROR]: #!#! at Skript-2.9.0-pre1.jar//ch.njol.skript.SkriptEventHandler$PriorityListener.lambda$new$0(SkriptEventHandler.java:64)
[16:09:03] [Server thread/ERROR]: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77)
[16:09:03] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[16:09:03] [Server thread/ERROR]: #!#! at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[16:09:03] [Server thread/ERROR]: #!#! at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[16:09:03] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl$4.performInteraction(ServerGamePacketListenerImpl.java:2798)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl$4.onInteraction(ServerGamePacketListenerImpl.java:2848)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket$InteractionAction.dispatch(ServerboundInteractPacket.java:138)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:89)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2787)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:76)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:14)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:36)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.TickTask.run(TickTask.java:18)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1576)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1553)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1546)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1505)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1512)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1357)
[16:09:03] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:332)
[16:09:03] [Server thread/ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:1583)

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@APickledWalrus APickledWalrus self-assigned this Jul 8, 2024
@APickledWalrus APickledWalrus added the investigating The core developers are currently investigating this issue. Usually used for complex cases. label Jul 8, 2024
@APickledWalrus
Copy link
Member

reproducible using a nonsense though valid script (when right clicking a boat):

on right click:
	event-entity is lava
	send "watch out!" to player

caused by boat data not checking that the ItemType has a valid ItemStack representation (e.g. that getRandom is not null). likely a lot of these cases due to 1.21 changes.

@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. PR available Issues which have a yet-to-be merged PR resolving it and removed investigating The core developers are currently investigating this issue. Usually used for complex cases. labels Jul 8, 2024
@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
None yet
Development

No branches or pull requests

3 participants