SpoutDev/Spout — Issue #1325: Addons failed to load due to NPE in SimpleAddonStore.save
Author: zhuowei
Created: 2011-12-23 09:15:17+00:00
State: open

When I have two or more clientside addons installed at the same time, this error happens frequently.

22-Dec-2011 11:20:14 PM org.spoutcraft.client.SpoutClient loadAddon
SEVERE: null loading SpoutBeanShell v1.0.0-beta1 (Is it up to date?)
java.lang.NullPointerException
at org.spoutcraft.client.addon.SimpleAddonStore.save(SimpleAddonStore.java:132)
at org.spoutcraft.client.addon.AddonInfo.setAddon(AddonInfo.java:25)
at org.spoutcraft.client.addon.SimpleAddonStore.getAddonInfo(SimpleAddonStore.java:80)
at org.spoutcraft.client.addon.SimpleAddonStore.isEnabled(SimpleAddonStore.java:68)
at org.spoutcraft.spoutcraftapi.addon.SimpleAddonManager.enableAddon(SimpleAddonManager.java:277)
at org.spoutcraft.client.SpoutClient.loadAddon(SpoutClient.java:484)
at org.spoutcraft.client.SpoutClient.enableAddons(SpoutClient.java:477)
at net.minecraft.client.Minecraft.a(Minecraft.java:1670)
at net.minecraft.client.Minecraft.a(Minecraft.java:1591)
at net.minecraft.client.Minecraft.a(Minecraft.java:1587)
at abp.a(NetClientHandler.java:176)
at aj.a(Packet1Login.java:56)
at hc.b(NetworkManager.java:220)
at abp.b(NetClientHandler.java:155)
at ri.s_(GuiConnecting.java:141)
at net.minecraft.client.Minecraft.k(Minecraft.java:1228)
at net.minecraft.client.Minecraft.x(Minecraft.java:652)
at net.minecraft.client.Minecraft.run(Minecraft.java:583)
at java.lang.Thread.run(Thread.java:636)
22-Dec-2011 11:20:15 PM com.alta189.testaddon.TestAddon onEnable

When this happens, only one of the addons get loaded. The only way to fix the problem is to remove the addonstore.yml file and restarting. This does not happen with only one addon.