SBPrime / AsyncWorldEdit-Premium

Async WorldEdit - Edit millions of blocks without lag! (Premium version)
Other
19 stars 4 forks source link

Error #198

Closed D3nied closed 4 years ago

D3nied commented 4 years ago

i got this error after setting keepSessiononLogoutFor: 15 and keepUndoFileFor: 15 After i edit something and leave the server this error is appearing:


java.lang.NullPointerException: null
        at org.primesoft.asyncworldedit.changesetSerializer.SerializableSessionList.releaseSession(SerializableSessionList.java:114) ~[?:?]
        at org.primesoft.asyncworldedit.changesetSerializer.SerializableSessionList.clear(SerializableSessionList.java:122) ~[?:?]
        at org.primesoft.asyncworldedit.worldedit.session.AsyncSessionManager.cleanupSession(AsyncSessionManager.java:224) ~[?:?]
        at org.primesoft.asyncworldedit.worldedit.session.AsyncSessionManager.remove(AsyncSessionManager.java:144) ~[?:?]
        at org.primesoft.asyncworldedit.worldedit.WorldEditIntegrator.removeSession(WorldEditIntegrator.java:155) ~[?:?]
        at org.primesoft.asyncworldedit.core.Cron.lambda$onTime$5(Cron.java:179) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:1.8.0_231]
        at java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_231]
        at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:1.8.0_231]
        at org.primesoft.asyncworldedit.core.Cron.onTime(Cron.java:179) ~[?:?]
        at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot.jar:git-Spigot-56f8471-56118c6]
        at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:394) [spigot.jar:git-Spigot-56f8471-56118c6]
        at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1022) [spigot.jar:git-Spigot-56f8471-56118c6]
        at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:393) [spigot.jar:git-Spigot-56f8471-56118c6]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:970) [spigot.jar:git-Spigot-56f8471-56118c6]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815) [spigot.jar:git-Spigot-56f8471-56118c6]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
`
The server is using the newest worldedit version and the neweset spigot version 1.14.4 
i dont know if it is important the server is part of a bungeecord network
SBPrime commented 4 years ago

Long story short, this error is something that should never happen.

This is the piece of code that is causing problem: #114 int oldId = m_usedId.remove(session);

And in other place: #067 private final Map<EditSession, Integer> m_usedId = new LinkedHashMap<>();

So as you see this field can not be null. Of curse I tried to reproduce and stuff, without any luck. Could you check on the latest version? Do you have any additional logs (longer logs)?

SBPrime commented 4 years ago

I managed to reproduce the problem.

SBPrime commented 4 years ago

Should be fixed in 3.6.16