NPE warning when interacting with food items with custom components (without them actually going into a container block)
CyberFlameGO opened this issue · 10 comments
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)
Interacting with the item produced by this command in your inventory should
be sufficient to repro the warn:
minecraft:give @A minecraft:burn_pottery_sherd[food={nutrition:0,
saturation:0, eat_seconds:0.1, can_always_eat:true},
item_name="{'italic':false,'text':'munch this RIGHT
NOW!!!','bold':true}",lore=["{'text':'do it'}"]] 64
…On Fri, 28 Jun 2024 at 2:27 PM, Intelli ***@***.***> wrote:
Please provide steps to replicate.
—
Reply to this email directly, view it on GitHub
<#573 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF6BVMD6RIACKY3RTXHTECDZJTCXPAVCNFSM6AAAAABJ7RUXAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVHE4TGMJYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
One of these (I don't remember and cannot test for at least three days 😭)
- using the item, holding it, or moving it around the inventory
…On Fri, 28 Jun 2024 at 4:06 PM, Intelli ***@***.***> wrote:
What do you mean by interacting?
—
Reply to this email directly, view it on GitHub
<#573 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF6BVMFEZACI6TS3KPC2H53ZJTONTAVCNFSM6AAAAABJ7RUXAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJWGA4TKOJUGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
What do you mean by interacting?
(Not seeing an error from clicking or eating the item)
Unable to replicate the issue being described.
(NullPointerException is replicable, but only in expected situations, such as when inserting the item in a container)
Hmm - in the case of expected situations would that be able to get
resolved? I'd assume if it boils down to the same erroneous code the fix
would apply to my encounter of it (perhaps)
…On Fri, 28 Jun 2024 at 4:15 PM, Intelli ***@***.***> wrote:
Unable to replicate the issue being described.
(NullPointerException is replicable, but only in expected situations, such
as when inserting the item in a container)
—
Reply to this email directly, view it on GitHub
<#573 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF6BVMHYMMEZDOEDT4E46OLZJTPOXAVCNFSM6AAAAABJ7RUXAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJWGEYDENZWHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
Please test again and provide additional information once you're able to replicate the issue.
I have the same exact error: https://pastebin.com/N9wisLqB