Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspector GUI instantly closes when opened #71

Open
ghost opened this issue May 16, 2016 · 5 comments
Open

Inspector GUI instantly closes when opened #71

ghost opened this issue May 16, 2016 · 5 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented May 16, 2016

I'm pretty sure it's the shield slot

[20:47:43 WARN]: [SpectatorPlus] Task #242 for SpectatorPlus v3.0 generated an exception
java.lang.IllegalArgumentException: Illegal slot ID
        at com.pgcraft.spectatorplus.zlib.components.gui.ActionGui.action(ActionGui.java:175) ~[?:?]
        at com.pgcraft.spectatorplus.guis.PlayerInventoryGUI.onUpdate(PlayerInventoryGUI.java:103) ~[?:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.GuiBase.update(GuiBase.java:79) ~[?:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.InventoryGui.update(InventoryGui.java:81) ~[?:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.ActionGui.update(ActionGui.java:282) ~[?:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.GuiBase.open(GuiBase.java:139) ~[?:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.InventoryGui.open(InventoryGui.java:117) ~[?:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.Gui$1.run(Gui.java:112) ~[?:?]
        at org.bukkit.craftbukkit.v1_9_R2.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.9.4.jar:git-Spigot-4af49dc-c5e9a16]
        at org.bukkit.craftbukkit.v1_9_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.9.4.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:734) [spigot-1.9.4.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.9.4.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [spigot-1.9.4.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [spigot-1.9.4.jar:git-Spigot-4af49dc-c5e9a16]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_74]
@pgmann pgmann added the Bug label May 17, 2016
@pgmann pgmann added this to the Version 3.0 milestone May 17, 2016
@pgmann
Copy link
Owner

pgmann commented May 18, 2016

Issue with zLib.

@AmauryCarrade

@AmauryCarrade
Copy link
Collaborator

AmauryCarrade commented May 18, 2016

Not an issue with zLib, an issue with SP.

I'll still take this.

AmauryCarrade added a commit that referenced this issue May 20, 2016
* BUG: NPE “Invalid slot ID” in 1.9 because the inventory size was badly calculated.
@AmauryCarrade
Copy link
Collaborator

AmauryCarrade commented May 20, 2016

NPE removed bug the inventory is still pretty unusable because it does not opens (works well using 1.8.8).

I added some stacktraces of the openings and closings (last one is my logout; I never closed the GUI manually) with a code like this:

try { throw new Exception(); } catch (Exception e) { e.printStackTrace(); }

and I got this:

[17:27:24 ERROR]: [SpectatorPlus] Inventory opened
java.lang.Exception
        at com.pgcraft.spectatorplus.listeners.GuiUpdatesListener.on(GuiUpdatesListener.java:124) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:748) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.EntityPlayer.openContainer(EntityPlayer.java:697) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:192) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at com.pgcraft.spectatorplus.zlib.components.gui.InventoryGui.open(InventoryGui.java:118) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.Gui$1.run(Gui.java:112) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:729) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
[17:27:24 ERROR]: [SpectatorPlus] Inventory closed
java.lang.Exception
        at com.pgcraft.spectatorplus.listeners.GuiUpdatesListener.on(GuiUpdatesListener.java:130) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:871) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1628) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:739) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.EntityPlayer.openContainer(EntityPlayer.java:697) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:192) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at com.pgcraft.spectatorplus.zlib.components.gui.InventoryGui.open(InventoryGui.java:118) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.Gui$1.run(Gui.java:112) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:729) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
[17:27:24 ERROR]: [SpectatorPlus] Inventory opened
java.lang.Exception
        at com.pgcraft.spectatorplus.listeners.GuiUpdatesListener.on(GuiUpdatesListener.java:124) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:748) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.EntityPlayer.openContainer(EntityPlayer.java:697) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.entity.CraftHumanEntity.openInventory(CraftHumanEntity.java:192) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at com.pgcraft.spectatorplus.zlib.components.gui.InventoryGui.open(InventoryGui.java:118) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at com.pgcraft.spectatorplus.zlib.components.gui.Gui$1.run(Gui.java:112) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:729) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
[17:27:24 ERROR]: [SpectatorPlus] Inventory closed
java.lang.Exception
        at com.pgcraft.spectatorplus.listeners.GuiUpdatesListener.on(GuiUpdatesListener.java:130) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:871) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.EntityPlayer.closeInventory(EntityPlayer.java:838) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.entity.CraftHumanEntity.closeInventory(CraftHumanEntity.java:375) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at com.pgcraft.spectatorplus.zlib.components.gui.InventoryGui$1.run(InventoryGui.java:139) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:729) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
[17:29:27 INFO]: AmauryPi lost connection: Disconnected
[17:29:27 ERROR]: [SpectatorPlus] Inventory closed
java.lang.Exception
        at com.pgcraft.spectatorplus.listeners.GuiUpdatesListener.on(GuiUpdatesListener.java:130) [SpectatorPlus-B3.0-SNAPSHOT.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:871) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.PlayerList.disconnect(PlayerList.java:381) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1060) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.NetworkManager.handleDisconnection(NetworkManager.java:317) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.ServerConnection.c(ServerConnection.java:175) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:820) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.2.jar:git-Spigot-e6f93f4-ed60c01]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
[17:29:27 INFO]: AmauryPi left the game.

@pgmann
Copy link
Owner

pgmann commented May 20, 2016

Looks fun! So to confirm, trying to open a player's inventory does nothing visually, but logs "Inventory opened" and "Inventory closed"?

@AmauryCarrade
Copy link
Collaborator

Only for the inspector inventory. Others works well in 1.9. All works well in 1.8.8.

@AmauryCarrade AmauryCarrade changed the title Invalid slot ID in 1.9 Inspector GUI instant-closed when opened in 1.9 May 20, 2016
@pgmann pgmann added the MC 1.9 label May 24, 2016
@pgmann pgmann changed the title Inspector GUI instant-closed when opened in 1.9 Inspector GUI instantly closes when opened May 24, 2016
pgmann pushed a commit that referenced this issue Mar 1, 2021
* BUG: NPE “Invalid slot ID” in 1.9 because the inventory size was badly calculated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants