LoginPlus is a spigot-plugin that works on version 1.8 up to the currently latest spigot-version. It is a lightweight login and register-plugin to prevent users from taking over accounts and adding a second layer of security on servers.
It can happen, that Argon2 with default 1024MB takes too much RAM, causing issues.
This will result in following error:
[18:23:02 ERROR]: Could not pass event AsyncPlayerChatEvent to LoginPlus v2.2.0
java.lang.IllegalStateException: Memory allocation error (-22)
at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hashBytes(BaseArgon2.java:163) ~[?:?]
at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hashBytes(BaseArgon2.java:147) ~[?:?]
at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hash(BaseArgon2.java:94) ~[?:?]
at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hash(BaseArgon2.java:102) ~[?:?]
at com.syntaxphoenix.loginplus.encryption.EncryptionUtils.hashPassword(EncryptionUtils.java:29) ~[?:?]
at com.syntaxphoenix.loginplus.listener.ChatListener.on(ChatListener.java:67) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor5.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-390]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.15.2.jar:git-Paper-390]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-390]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.15.2.jar:git-Paper-390]
at net.minecraft.server.v1_15_R1.PlayerConnection.chat(PlayerConnection.java:1782) ~[patched_1.15.2.jar:git-Paper-390]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1697) ~[patched_1.15.2.jar:git-Paper-390]
at net.minecraft.server.v1_15_R1.PacketPlayInChat$1.run(PacketPlayInChat.java:41) ~[patched_1.15.2.jar:git-Paper-390]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_271]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_271]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_271]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_271]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_271]
Add a feature to detect the RAm free and calculate the amount added by default to Argon2
It can happen, that Argon2 with default 1024MB takes too much RAM, causing issues.
This will result in following error: [18:23:02 ERROR]: Could not pass event AsyncPlayerChatEvent to LoginPlus v2.2.0 java.lang.IllegalStateException: Memory allocation error (-22) at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hashBytes(BaseArgon2.java:163) ~[?:?] at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hashBytes(BaseArgon2.java:147) ~[?:?] at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hash(BaseArgon2.java:94) ~[?:?] at com.syntaxphoenix.loginplus.shaded.mkammerer.argon2.BaseArgon2.hash(BaseArgon2.java:102) ~[?:?] at com.syntaxphoenix.loginplus.encryption.EncryptionUtils.hashPassword(EncryptionUtils.java:29) ~[?:?] at com.syntaxphoenix.loginplus.listener.ChatListener.on(ChatListener.java:67) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor5.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-390] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.15.2.jar:git-Paper-390] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-390] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.15.2.jar:git-Paper-390] at net.minecraft.server.v1_15_R1.PlayerConnection.chat(PlayerConnection.java:1782) ~[patched_1.15.2.jar:git-Paper-390] at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1697) ~[patched_1.15.2.jar:git-Paper-390] at net.minecraft.server.v1_15_R1.PacketPlayInChat$1.run(PacketPlayInChat.java:41) ~[patched_1.15.2.jar:git-Paper-390] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_271] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_271] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_271] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_271] at java.lang.Thread.run(Unknown Source) [?:1.8.0_271]
Add a feature to detect the RAm free and calculate the amount added by default to Argon2