Shopkeeper Save File Corrution
blablubbabcDEV opened this issue ยท 3 comments
Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/298
Originally posted by Nathangorr (Feb 20, 2015):
Minecraft 1.8 heads that do not rely on a player to display a head texture cause Shopkeepers to clear the entire save file when /shopkeepers reload is typed and/or the server is restarted. Here is an example of a texture-based head. (Companion Cube)
/give [at]p skull 1 3 {display:{Name:"Companion Cube"},SkullOwner:{Id:"5969ee2f-b5b1-4e03-b846-820dbd2d57b5",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTE3NWJkZjQ3YWVhMWE0YmYxZDM0OWJlNmI3ZmE0YWIzN2Y0Nzk2NzJmNGM0M2FjYTU3NTExYjQyN2FiNCJ9fX0="}]}}}
Version:
v1.46
Error when Loaded:
Exception in thread "Craft Scheduler Thread - 158"
org.apache.commons.lang.UnhandledException: Plugin Shopkeepers v1.46 generated an exception while executing task 232775
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: null value in entry: skull-owner=null
at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)
at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135)
at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:206)
at org.bukkit.craftbukkit.v1_8_R1.inventory.CraftMetaSkull.serialize(CraftMetaSkull.java:150)
at org.bukkit.craftbukkit.v1_8_R1.inventory.CraftMetaItem.serialize(CraftMetaItem.java:773)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSerializable.representData(YamlRepresenter.java:33)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSerializable.representData(YamlRepresenter.java:35)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.bukkit.configuration.file.YamlRepresenter$RepresentConfigurationSection.representData(YamlRepresenter.java:23)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.representMapping(BaseRepresenter.java:157)
at org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap.representData(SafeRepresenter.java:320)
at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:95)
at org.yaml.snakeyaml.representer.BaseRepresenter.represent(BaseRepresenter.java:65)
at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:271)
at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:262)
at org.yaml.snakeyaml.Yaml.dumpAll(Yaml.java:234)
at org.yaml.snakeyaml.Yaml.dump(Yaml.java:209)
at org.bukkit.configuration.file.YamlConfiguration.saveToString(YamlConfiguration.java:40)
at com.nisovin.shopkeepers.ShopkeepersPlugin.saveDataToFile(ShopkeepersPlugin.java:1137)
at com.nisovin.shopkeepers.ShopkeepersPlugin.access$900(ShopkeepersPlugin.java:54)
at com.nisovin.shopkeepers.ShopkeepersPlugin$10.run(ShopkeepersPlugin.java:1096)
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
Originally commented by Bastikeks (Sep 29, 2015):
Hmm i understand the issue. But besides this error the saves.yml file gets cleared completely when this error occours... Could you try to fix that, so that the result of this error is solved? (The head can correctly be sold, even with this error in the console)
Originally commented by blablubbabc (Feb 20, 2015):
Shopkeepers is using bukkit's item serialization for storing and loading itemstacks in and from config files, so I assume this is something to ask the spigot team.
I have created a spigot issue here, using the example you gave: https://hub.spigotmc.org/jira/browse/SPIGOT-592
Edit: Yep, seems to be an issue of spigot. See this ticket: https://hub.spigotmc.org/jira/browse/SPIGOT-583?jql=
Edited Feb 20, 2015