CoreProtect

CoreProtect

1M Downloads

NPE warning when interacting with food items with custom components (without them actually going into a container block)

CyberFlameGO opened this issue · 10 comments

commented

Ignore the random blank lines and prepended "!" characters - shamelessly copied straight from DiscordSRV. Tested on Purpur Version: 1.21-2247-39617d5 (MC: 1.21)* with build from ce8c194

! [Thu 00:28:29 WARN ] java.lang.NullPointerException: null value in entry: using-converts-to=null
! [Thu 00:28:29 WARN ]     at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)
! [Thu 00:28:29 WARN ]     at com.google.common.collect.ImmutableMapEntry.<init>(ImmutableMapEntry.java:54)
! [Thu 00:28:29 WARN ]     at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:341)
! [Thu 00:28:29 WARN ]     at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:450)
! [Thu 00:28:29 WARN ]     at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:465)
! [Thu 00:28:29 WARN ]     at com.google.common.collect.ImmutableMap$Builder.putAll(ImmutableMap.java:494)
! [Thu 00:28:29 WARN ]     at com.google.common.collect.ImmutableMap$Builder.putAll(ImmutableMap.java:477)
! [Thu 00:28:29 WARN ]     at org.bukkit.util.io.Wrapper.newWrapper(Wrapper.java:16)
! [Thu 00:28:29 WARN ]     at org.bukkit.util.io.BukkitObjectOutputStream.replaceObject(BukkitObjectOutputStream.java:48)
 
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1160)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1394)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1190)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1585)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1542)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1451)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1194)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
! [Thu 00:28:29 WARN ]     at java.base/java.util.ArrayList.writeObject(ArrayList.java:949)
! [Thu 00:28:29 WARN ]     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
! [Thu 00:28:29 WARN ]     at java.base/java.lang.reflect.Method.invoke(Method.java:580)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1078)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1529)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1451)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1194)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
! [Thu 00:28:29 WARN ]     at java.base/java.util.ArrayList.writeObject(ArrayList.java:949)
! [Thu 00:28:29 WARN ]     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
! [Thu 00:28:29 WARN ]     at java.base/java.lang.reflect.Method.invoke(Method.java:580)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1078)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1529)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1451)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1194)
! [Thu 00:28:29 WARN ]     at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.utility.Util.convertByteData(Util.java:576)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.database.statement.ItemStatement.insert(ItemStatement.java:15)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.database.logger.ItemLogger.logTransaction(ItemLogger.java:145)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.database.logger.ContainerLogger.log(ContainerLogger.java:147)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.consumer.process.ContainerTransactionProcess.process(ContainerTransactionProcess.java:42)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.consumer.process.Process.processConsumer(Process.java:160)
! [Thu 00:28:29 WARN ]     at CoreProtect-22.4.jar//net.coreprotect.consumer.Consumer.run(Consumer.java:133)
! [Thu 00:28:29 WARN ]     at java.base/java.lang.Thread.run(Thread.java:1570)
commented

Please provide steps to replicate.

commented
commented
commented

What do you mean by interacting?

(Not seeing an error from clicking or eating the item)

commented

Unable to replicate the issue being described.

(NullPointerException is replicable, but only in expected situations, such as when inserting the item in a container)

commented
commented

Please test again and provide additional information once you're able to replicate the issue.

commented

I have the same exact error: https://pastebin.com/N9wisLqB

image
image

commented

image
Same problem. Paper 1.21-113
image

commented

No longer replicable on Purpur 1.21.1-2289-201e928 weirdly