LOTS of errors: "Could not pass event ChunkUnloadEvent to WorldBorder v1.9.9 (beta)"
RalphORama opened this issue · 15 comments
First of all, I'm running a 1.14 server and I understand it's not officially supported. Just figured I should post this error in the case you're developing for 1.14.
Server version is spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86
When filling the world, I get thousands of instances of the following error:
> [06:58:43] [Server thread/INFO]: [WorldBorder] [Fill] 179 more chunks processed (7729 total, ~32.8%) (free mem: 3048 MB)
> [06:58:44] [Server thread/ERROR]: Could not pass event ChunkUnloadEvent to WorldBorder v1.9.9 (beta)
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:520) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:505) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.PlayerChunkMap.lambda$12(PlayerChunkMap.java:333) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656) [?:1.8.0_212]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632) [?:1.8.0_212]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) [?:1.8.0_212]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:135) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:114) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.ChunkProviderServer$a.executeNext(ChunkProviderServer.java:438) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.ChunkProviderServer.runTasks(ChunkProviderServer.java:163) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.MinecraftServer.aW(MinecraftServer.java:905) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:889) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeAll(SourceFile:99) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:872) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:806) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.lang.NoSuchMethodError: org.bukkit.event.world.ChunkUnloadEvent.setCancelled(Z)V
at com.wimbli.WorldBorder.WBListener.onChunkUnload(WBListener.java:88) ~[?:?]
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-0d76f86]
... 17 more
And for me..
Exception generating new chunk
Running a Spigot 1.14 build, you'd be safer running WorldBorder 1.9.0 due to that error. The async changes in 1.9.9 make use of being able to cancel a ChunkUnloadEvent when needed, which apparently they have removed the ability to do in Spigot 1.14.
It looks like we'll need to find another way to handle that for Spigot 1.14+ builds.
Tank you Brettflan, I will do that
Didn't knew that one "ChunkUnloadEvent removed ... in Spigot 1.14"
What is Spigot doing? Do you thing it isn't in because it is a spigot-1.14-SNAPSHOT ? Will it put in back latter?
It's remotely possible they will add back the ability to cancel a ChunkUnloadEvent, as I couldn't find any reference to them having removed that functionality after a brief search, but I doubt it.
Tried WB 1.9.0 out https://www.spigotmc.org/resources/worldborder.60905/history
and got my server stoped after a short. (Is it because I tryed 1.9.9 on that server right before switching to 1.9.0 ? )
[17:30:48] [Server thread/INFO]: [WorldBorder] [Fill] 411 more chunks processed (42364 total, ~90,4%) (free mem: 6314 MB) [17:30:53] [Server thread/INFO]: [WorldBorder] [Fill] 247 more chunks processed (42611 total, ~90,9%) (free mem: 5966 MB) [17:30:53] [Server thread/INFO]: [WorldBorder] [Fill] Saving the world to disk, just to be on the safe side. (free mem: 5966 MB) [17:30:58] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 8482ms or 169 ticks behind [17:30:58] [Server thread/INFO]: [WorldBorder] [Fill] 183 more chunks processed (42794 total, ~91,3%) (free mem: 6126 MB) [17:30:58] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.server.v1_14_R1.ReportedException: Exception ticking world
crash-2019-05-06_17.30.58-server.txt
Restarted a fiew times (3) and now hase ended the fill [17:43:18] [Server thread/INFO]: [WorldBorder] [Fill] 1072 more chunks processed (45147 total, ~96,3%) (free mem: 3676 MB)
[17:43:20] [Server thread/INFO]: [WorldBorder] [Fill] 1852 more chunks processed (46999 total, ~100,0%) (free mem: 3571 MB)
[17:43:21] [Server thread/INFO]: [WorldBorder] [Fill] task successfully completed for world "Flat_Earth"! (free mem: 3869 MB)
And now Trimming
18:43:08] [Server thread/INFO]: [WorldBorder] Trimming world beyond border at the command of player "brisou394". [18:43:13] [Server thread/INFO]: [WorldBorder] [Trim] 0 entire region(s) and 1320 individual chunk(s) trimmed so far (18,2% done) [18:43:19] [Server thread/INFO]: [WorldBorder] [Trim] 0 entire region(s) and 2601 individual chunk(s) trimmed so far (29,0% done) [18:43:19] [Server thread/INFO]: [WorldBorder] [Trim] Error! Region file which is outside the border could not be deleted: r.-3.-4.mca [18:43:23] [Server thread/INFO]: [WorldBorder] [Trim] Error! Region file which is outside the border could not be deleted: r.-3.3.mca [18:43:25] [Server thread/INFO]: [WorldBorder] [Trim] 2 entire region(s) and 4291 individual chunk(s) trimmed so far (38,3% done) [18:43:28] [Server thread/INFO]: [WorldBorder] [Trim] Error! Region file which is outside the border could not be deleted: r.-4.-3.mca [18:43:28] [Server thread/INFO]: [WorldBorder] [Trim] Error! Region file which is outside the border could not be deleted: r.-4.-4.mca [18:43:30] [Server thread/INFO]: [WorldBorder] [Trim] 4 entire region(s) and 5425 individual chunk(s) trimmed so far (44,5% done) [18:43:33] [Server thread/INFO]: [WorldBorder] [Trim] Error! Region file which is outside the border could not be deleted: r.-4.2.mca [18:43:33] [Server thread/INFO]: [WorldBorder] [Trim] Error! Region file which is outside the border could not be deleted: r.-4.3.mca [18:43:37] [Server thread/INFO]: [WorldBorder] [Trim] 6 entire region(s) and 7135 individual chunk(s) trimmed so far (61,8% done)
That looks to be a core Spigot/Bukkit/NMS problem, no plugins are indicated in that crash log. Likely something that will be fixed eventually in a Spigot release.
It's remotely possible they will add back the ability to cancel a ChunkUnloadEvent, as I couldn't find any reference to them having removed that functionality after a brief search, but I doubt it.
Hello,
I found it, on bukkit commit here : https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits
You can use setForceLoaded
It looks like downgrading to WB 1.9.0 crashes the server on Spigot 1.14
> [00:51:29] [Server thread/INFO]: [WorldBorder] [Fill] 46 more chunks processed (2369 total, ~27.7%) (free mem: 2973 MB)
> [00:51:30] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.server.v1_14_R1.ReportedException: Exception ticking world
at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1071) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:396) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:957) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:802) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) ~[?:1.8.0_212]
at java.util.ArrayList$Itr.next(ArrayList.java:859) ~[?:1.8.0_212]
at net.minecraft.server.v1_14_R1.TickListServer.a(TickListServer.java:72) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.WorldServer.doTick(WorldServer.java:271) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1058) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
... 4 more
> [00:51:30] [Server thread/ERROR]: Cause of unexpected exception was
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) ~[?:1.8.0_212]
at java.util.ArrayList$Itr.next(ArrayList.java:859) ~[?:1.8.0_212]
at net.minecraft.server.v1_14_R1.TickListServer.a(TickListServer.java:72) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.WorldServer.doTick(WorldServer.java:271) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1058) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:396) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:957) ~[spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:802) [spigot-1.14-R0.1-SNAPSHOT.jar:git-Spigot-1eece4f-fe1199c]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
> [00:51:30] [Server thread/ERROR]: This crash report has been saved to: /home/container/./crash-reports/crash-2019-05-07_00.51.30-server.txt
> [00:51:30] [Server thread/INFO]: Stopping server
Same as above, that looks to be a core Spigot/Bukkit/NMS problem, no plugins are indicated in that crash log.
I thought so too, but it's a crash that only started happening once I downgraded the plugin. I will take more steps to find a reliable way to reproduce it.
It looks like downgrading to WB 1.9.0 crashes the server on Spigot 1.14
Same as above, that looks to be a core Spigot/Bukkit/NMS problem, no plugins are indicated in that crash log.
Likely something that will be fixed eventually in a Spigot release.
Same as above, that looks to be a core Spigot/Bukkit/NMS problem, no plugins are indicated in that crash log.
I thought so too, but it's a crash that only started happening once I downgraded the plugin. I will take more steps to find a reliable way to reproduce it.
The stacktrace and crash log fully imply it's Spigot/Bukkit/NMS, and (from past experience) that kind of error does show up almost every time a new major version release is dropped (1.12, 1.13, 1.14, etc.), so I'm 99% sure you're wasting your time. But, if you feel like it, go for it.
...
Actually, after a quick google of that error, it's a core NMS bug which Mojang have fixed in an upcoming NMS release:
https://bugs.mojang.com/browse/MC-148830
So there you go. NMS bug, no fix available yet.
Tanks man!
So for now, what i did was to put my seed 402334716684165078
in a 1.13.2 server to have a perfect map with WorldBorder 1.9.9 (beta)
But trying to --forceUpgrade
under 1.14 doesn't upgrade village of course.
Because I really wanted 1.14, I used WorldBorder 1.9.9 (beta) square function (in 1.14 server). Result isn't perfetelly square, ok. But my idea was to trim it down anyway because the fill function for round was terrible under spigot_snapshot-1.14
Trimming isn't decided to work either (also tried WB 1.9.0), so that is the closest that we can have until next Mojang-NMS update...
The usual thing with Trimming not working is to make sure nothing like Dynmap might be accessing those region files, then to restart the server and run the Trim again with those files no longer locked.
Nothing to do with versions of WB or Spigot.
Maybe the forceLoaded API can be used to keep chunks loaded
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Chunk.html#setForceLoaded-boolean-