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

Repeated error on chunk unload #2

Closed
rlf opened this issue Oct 16, 2015 · 5 comments
Closed

Repeated error on chunk unload #2

rlf opened this issue Oct 16, 2015 · 5 comments

Comments

@rlf
Copy link

rlf commented Oct 16, 2015

I get this repeatedly when using Holographic-Scoreboard with Holograms:

[23:45:17] [Server thread/ERROR]: Could not pass event ChunkUnloadEvent to Holograms v1.8.8
org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at net.minecraft.server.v1_8_R3.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:352) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at net.minecraft.server.v1_8_R3.WorldServer.doTick(WorldServer.java:234) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:770) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: java.lang.NullPointerException

It's spamming up my log

@sainttx
Copy link
Owner

sainttx commented Oct 16, 2015

The stack trace seems to be cut off (I don't see any references to my code), do you have a more descriptive paste?

sainttx added a commit that referenced this issue Oct 16, 2015
fix #2 by catching null values in various spots when loading or unloading chunks
@sainttx
Copy link
Owner

sainttx commented Oct 16, 2015

Appears to be fixed in 673d34f

@sainttx sainttx closed this as completed Oct 16, 2015
@rlf
Copy link
Author

rlf commented Oct 16, 2015

Still present in v1.8.8b

17.10 00:56:17 [Server] INFO [00:56:17 ERROR]: Could not pass event ChunkUnloadEvent to Holograms v1.8.8b
17.10 00:56:17 [Server] INFO ... 10 more
17.10 00:56:17 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]
17.10 00:56:17 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
17.10 00:56:17 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
17.10 00:56:17 [Server] INFO at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[?:?]
17.10 00:56:17 [Server] INFO at com.sainttx.holograms.HologramListener.onChunkUnload(HologramListener.java:42) ~[?:?]
17.10 00:56:17 [Server] INFO at com.sainttx.holograms.HologramManager.onChunkUnload(HologramManager.java:184) ~[?:?]
17.10 00:56:17 [Server] INFO at com.sainttx.holograms.data.Hologram.isInChunk(Hologram.java:108) ~[?:?]
17.10 00:56:17 [Server] INFO at org.bukkit.Location.getChunk(Location.java:78) ~[spigot-1.8.8.jar:git-Spigot-5f38d38-12698ea]

It seems, that somehow the location of a hologram has a null value for world.

Might be caused by the Holographic-Scoreboard trying to create boards before everything is ready - but still...

@sainttx
Copy link
Owner

sainttx commented Oct 17, 2015

This is likely an issue with your own plugin creating invalid locations with null worlds. The loading mechanism currently used does not accept null worlds (causes it to return null) thus invalidating the whole hologram.

This is a check I'll have to add to the plugin when instantiating Hologram objects but ultimately the issue seems to be on your end currently.

@rlf
Copy link
Author

rlf commented Oct 17, 2015

Yup, I think I fixed it. Thanks for your consideration though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants