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

Inventory that was created at #5

Closed
HanielCota opened this issue Nov 29, 2023 · 10 comments
Closed

Inventory that was created at #5

HanielCota opened this issue Nov 29, 2023 · 10 comments

Comments

@HanielCota
Copy link

java.lang.Throwable: null
at net.minecraft.world.inventory.AbstractContainerMenu.(AbstractContainerMenu.java:105) ~[?:?]
at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftContainer.(CraftContainer.java:40) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftContainer.(CraftContainer.java:50) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at org.bukkit.craftbukkit.v1_20_R2.entity.CraftHumanEntity.openCustomInventory(CraftHumanEntity.java:358) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at org.bukkit.craftbukkit.v1_20_R2.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:345) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at com.github.hanielcota.cash.utils.external.FastInv.open(FastInv.java:283) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at com.github.hanielcota.cash.commands.CashCommand.onCash(CashCommand.java:29) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at co.aikar.commands.RegisteredCommand.invoke(RegisteredCommand.java:152) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at co.aikar.commands.BaseCommand.executeCommand(BaseCommand.java:578) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at co.aikar.commands.BaseCommand.execute(BaseCommand.java:513) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at co.aikar.commands.RootCommand.execute(RootCommand.java:99) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at co.aikar.commands.BukkitRootCommand.execute(BukkitRootCommand.java:84) ~[Cash-1.0-SNAPSHOT-dev-all.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[sparklypaper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.CraftServer.dispatchCommand(CraftServer.java:992) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at org.bukkit.craftbukkit.v1_20_R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) ~[sparklypaper-1.20.2.jar:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:330) ~[?:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:314) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2208) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$19(ServerGamePacketListenerImpl.java:2168) ~[?:?]
at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1330) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1307) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1300) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1278) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1166) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
at java.lang.Thread.run(Thread.java:840) ~[?:?]

@HanielCota
Copy link
Author

    at net.minecraft.world.inventory.AbstractContainerMenu.<init>(AbstractContainerMenu.java:105) ~[?:?]
    at net.minecraft.world.inventory.RecipeBookMenu.<init>(RecipeBookMenu.java:12) ~[?:?]
    at net.minecraft.world.inventory.InventoryMenu.<init>(InventoryMenu.java:53) ~[?:?]
    at net.minecraft.world.entity.player.Player.<init>(Player.java:209) ~[?:?]
    at net.minecraft.server.level.ServerPlayer.<init>(ServerPlayer.java:322) ~[?:?]
    at net.minecraft.server.players.PlayerList.canPlayerLogin(PlayerList.java:726) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
    at net.minecraft.server.network.ServerLoginPacketListenerImpl.verifyLoginAndFinishConnectionSetup(ServerLoginPacketListenerImpl.java:218) ~[?:?]
    at net.minecraft.server.network.ServerLoginPacketListenerImpl.tick(ServerLoginPacketListenerImpl.java:86) ~[?:?]
    at net.minecraft.network.Connection.tick(Connection.java:592) ~[?:?]
    at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:240) ~[?:?]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1665) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:463) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1385) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1162) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
    at java.lang.Thread.run(Thread.java:840) ~[?:?]

@HanielCota
Copy link
Author

Simply when creating any Custom menu, using External API or not, it gives this exception.

@rudde0
Copy link

rudde0 commented Nov 30, 2023

Also similiar exception throws,

[11:46:48 WARN]: Closing rudde inventory that was created at
java.lang.Throwable: null
        at net.minecraft.world.inventory.AbstractContainerMenu.<init>(AbstractContainerMenu.java:105) ~[?:?]
        at net.minecraft.world.inventory.RecipeBookMenu.<init>(RecipeBookMenu.java:12) ~[?:?]
        at net.minecraft.world.inventory.InventoryMenu.<init>(InventoryMenu.java:53) ~[?:?]
        at net.minecraft.world.entity.player.Player.<init>(Player.java:209) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.<init>(ServerPlayer.java:322) ~[?:?]
        at net.minecraft.server.players.PlayerList.canPlayerLogin(PlayerList.java:726) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.verifyLoginAndFinishConnectionSetup(ServerLoginPacketListenerImpl.java:218) ~[?:?]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.tick(ServerLoginPacketListenerImpl.java:86) ~[?:?]
        at net.minecraft.network.Connection.tick(Connection.java:592) ~[?:?]
        at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:240) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1665) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:463) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1385) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1162) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[sparklypaper-1.20.2.jar:git-SparklyPaper-"0e7165d"]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]

when switching the world.

@MrPowerGamerBR
Copy link
Member

MrPowerGamerBR commented Nov 30, 2023

This is intentional, I added this because I was debugging issues related to inventory switching when switching across worlds and parallel world ticking crashes. I kept it because it is still useful to debug further issues. (even tho I haven't experienced no other bugs related to this... yet)

(The issue was that, if a player was teleported while opening a chest on the same tick (example: a item that teleports a player when right clicking, and they right clicked a chest), the server would crash when using Parallel World Ticking, because it attempted to check if the chest was still valid, but because the chest was in another world...)

This doesn't affect anything and isn't a real error, as in: it isn't something that has gone wrong or bugs in the code, it just creates a throwable when initializing any kind of inventory, and logs the throwable when the inventory closes.

Maybe in the future I will add a option to disable the log, but for now, just ✨ pretend ✨ that it doesn't exist.

@MrPowerGamerBR
Copy link
Member

The newest version will not log inventory closes anymore, but can optionally be enabled with the -Dsparklypaper.logContainerCreationStacktraces System property

@HanielCota
Copy link
Author

But was it just a logging problem, or something deeper? Null things or a logic problem?

@MrPowerGamerBR
Copy link
Member

But was it just a logging problem, or something deeper? Null things or a logic problem?

It wasn't a problem or a bug at all: It was an intentional decision to log what caused the inventory to be created when the inventory closed.

The message does look like an error/exception, but it actually isn't. It looks like an error because I was logging a throwable

If you are talking about the bug I said in my previous comment: it had already talked about it in further depth here, it has already been fixed tho: https://github.com/SparklyPower/SparklyPaper/blob/ver/1.20.2/docs/PARALLEL_NOTES.md

@MrPowerGamerBR
Copy link
Member

(The bug itself has been fixed for 2+ weeks already, but I had kept the debug logs to help if other inventory-stillValid-checks-in-other-worlds happened)

@MrPowerGamerBR
Copy link
Member

but tl;dr:

no, that message isn't a bug and won't impact your server at all, it was just a debug log I kept to help debug concurrency issues related to Parallel World Ticking

@HanielCota
Copy link
Author

Nice, congratulations on the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants