RoseStacker icon indicating copy to clipboard operation
RoseStacker copied to clipboard

RoseStacker v1.5.32-SNAPSHOT generated an exception while executing task 78

Open smscentras opened this issue 1 year ago • 10 comments

[05:42:22] [Craft Scheduler Thread - 2825 - RoseStacker/WARN]: [RoseStacker] Plugin RoseStacker v1.5.32-SNAPSHOT generated an exception while executing task 78 java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.hasItemName()" because "itemMeta" is null at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.stack.StackedItem.updateDisplay(StackedItem.java:104) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.stack.StackingThread.tryStackItem(StackingThread.java:1088) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.stack.StackingThread.stackItems(StackingThread.java:220) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.lib.rosegarden.scheduler.RoseScheduler.lambda$wrap$0(RoseScheduler.java:158) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62] at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.21.1.jar:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

smscentras avatar Jan 21 '25 04:01 smscentras

Puppur 1.21.1

smscentras avatar Jan 21 '25 04:01 smscentras

This is going to be impossible for me to reproduce on my own. There is no possible way for itemMeta to be null since there's a null check right before it's used. https://github.com/Rosewood-Development/RoseStacker/blob/master/Plugin/src/main/java/dev/rosewood/rosestacker/stack/StackedItem.java#L102 I simply can't fix this, as it shouldn't be possible. If anyone else sees something I'm missing please chime in.

Esophose avatar Jan 21 '25 04:01 Esophose

If you want to avoid the error you can disable stacked item nametags by setting display-tags to false under the global-item-settings section of the config.yml, otherwise I don't really have any other suggestions.

Esophose avatar Jan 21 '25 04:01 Esophose

This is going to be impossible for me to reproduce on my own. There is no possible way for itemMeta to be null since there's a null check right before it's used. https://github.com/Rosewood-Development/RoseStacker/blob/master/Plugin/src/main/java/dev/rosewood/rosestacker/stack/StackedItem.java#L102 I simply can't fix this, as it shouldn't be possible. If anyone else sees something I'm missing please chime in.

if (itemMeta == null) { return; } something like that maybe? Sometimes there can be not NULL, but empty!

if (itemMeta == "") { return; }

if (itemMeta != null && itemMeta != "") {

smscentras avatar Jan 21 '25 04:01 smscentras

there is already a null check

Esophose avatar Jan 21 '25 05:01 Esophose

there is already a null check

but null is not "" ok, you know better...

smscentras avatar Jan 21 '25 05:01 smscentras

Disabled "display-tags", restarted server, but:

[Craft Scheduler Thread - 143 - RoseStacker/WARN]: [RoseStacker] Plugin RoseStacker v1.5.32-SNAPSHOT generated an exception while executing task 78 java.lang.NullPointerException: null

smscentras avatar Jan 21 '25 08:01 smscentras

https://www.spigotmc.org/resources/upgradeable-hoppers-%E2%AD%95-fast-hopper-plugin-link-containers-%E2%9C%85-item-transfer-suction-chunk-1-21-suppor.69201/update?update=577508

- Fixed: Error sucking items using RoseStacker

smscentras avatar Jan 22 '25 03:01 smscentras

Maybe you need to add same line if (itemMeta != null) on updateDisplay on tryStackItem on stackItems

I'm just guessing..

[Craft Scheduler Thread - 14 - RoseStacker/WARN]: [RoseStacker] Plugin RoseStacker v1.5.32-SNAPSHOT generated an exception while executing task 78 java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.hasItemName()" because "itemMeta" is null at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.stack.StackedItem.updateDisplay(StackedItem.java:104) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.stack.StackingThread.tryStackItem(StackingThread.java:1088) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.stack.StackingThread.stackItems(StackingThread.java:220) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at RoseStacker-1.5.32-SNAPSHOT.jar/dev.rosewood.rosestacker.lib.rosegarden.scheduler.RoseScheduler.lambda$wrap$0(RoseScheduler.java:158) ~[RoseStacker-1.5.32-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62] at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.21.1.jar:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

smscentras avatar Jan 22 '25 06:01 smscentras

Please try the latest release from Spigot and see if this is still an issue

Esophose avatar Feb 25 '25 05:02 Esophose