Closed Hellhium closed 1 year ago
Are you able to reproduce this crash with https://modrinth.com/mod/uwrad installed on the server? If so, please post the resulting crash report.
Crash only happened once so far, uwrad is now installed, will update the issue if it crashes again
Got it !
Fabric votifier config for completeness
port: 25865
enabled: true
commands: ['conqvote dovote %PLAYER%']
UWRAD stack trace:
[18:42:06] [Thread-14/ERROR]: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
Possible solutions: Find possible causes in the stack trace below and report to the corresponding mod authors
java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
at com.ishland.uwrad.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:51) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at com.ishland.uwrad.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at com.ishland.uwrad.common.CheckedThreadLocalRandom.method_43156(CheckedThreadLocalRandom.java:82) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at net.minecraft.class_6566.method_43058(class_6566.java:61) ~[server-intermediary.jar:?]
at net.minecraft.class_1542.<init>(net/minecraft/class_1542.java:59) ~[server-intermediary.jar:?]
at net.minecraft.class_1657.method_7329(net/minecraft/class_1657.java:722) ~[server-intermediary.jar:?]
at net.minecraft.class_3222.method_7329(net/minecraft/class_3222.java:1616) ~[server-intermediary.jar:?]
at net.minecraft.class_1657.method_7328(net/minecraft/class_1657.java:707) ~[server-intermediary.jar:?]
at net.minecraft.class_3068.method_13401(class_3068.java:74) ~[server-intermediary.jar:?]
at net.minecraft.class_3068.method_13403(class_3068.java:42) ~[server-intermediary.jar:?]
at com.mojang.brigadier.CommandDispatcher.execute(com/mojang/brigadier/CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
at net.minecraft.class_2170.method_9249(net/minecraft/class_2170.java:285) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_44252(net/minecraft/class_2170.java:278) ~[server-intermediary.jar:?]
at carpet.script.api.Auxiliary.lambda$apply$26(Auxiliary.java:687) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$17.lazyEval(Expression.java:684) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:163) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.Functions$1.lazyEval(Functions.java:60) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$5(ControlFlow.java:36) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$16.lazyEval(Expression.java:652) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:163) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.Functions$1.lazyEval(Functions.java:60) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$call$28(CarpetScriptHost.java:869) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.evalValue(Expression.java:1034) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.call(CarpetScriptHost.java:868) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$handleCommand$21(CarpetScriptHost.java:723) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.utils.GlocalFlag.whileValueReturn(GlocalFlag.java:44) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.utils.GlocalFlag.getWhileDisabled(GlocalFlag.java:30) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.handleCommand(CarpetScriptHost.java:723) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.execute(CarpetScriptHost.java:153) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$addPathToCommand$3(CarpetScriptHost.java:177) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at com.mojang.brigadier.CommandDispatcher.execute(com/mojang/brigadier/CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
at net.minecraft.class_2170.method_9249(net/minecraft/class_2170.java:285) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_44252(net/minecraft/class_2170.java:278) ~[server-intermediary.jar:?]
at me.drex.votifier.VoteReceiver.run(VoteReceiver.java:121) ~[fabric-votifier-1.1.5.jar:?]
More information about that, it seems that the spawn() function is causing problems
[08:29:49] [Thread-14/INFO]: Vote pour 2Djis enregistré, roll: 6
[08:29:49] [Thread-14/ERROR]: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
Possible solutions: Find possible causes in the stack trace below and report to the corresponding mod authors
java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
at com.ishland.uwrad.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:51) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at com.ishland.uwrad.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at com.ishland.uwrad.common.CheckedThreadLocalRandom.method_43156(CheckedThreadLocalRandom.java:82) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at net.minecraft.class_6566.method_43058(class_6566.java:61) ~[server-intermediary.jar:?]
at net.minecraft.class_5819.method_43385(class_5819.java:75) ~[server-intermediary.jar:?]
at net.minecraft.class_1308.method_5943(net/minecraft/class_1308.java:1087) ~[server-intermediary.jar:?]
at net.minecraft.class_1296.method_5943(class_1296.java:46) ~[server-intermediary.jar:?]
at net.minecraft.class_3988.method_5943(class_3988.java:66) ~[server-intermediary.jar:?]
at carpet.script.api.Entities.lambda$apply$5(Entities.java:155) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$17.lazyEval(Expression.java:684) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$2(ControlFlow.java:28) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$5.lazyEval(Expression.java:364) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$17(Expression.java:1504) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:163) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.Functions$1.lazyEval(Functions.java:60) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$9(ControlFlow.java:55) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$15.lazyEval(Expression.java:614) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$5(ControlFlow.java:38) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$16.lazyEval(Expression.java:652) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:163) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.Functions$1.lazyEval(Functions.java:60) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$call$28(CarpetScriptHost.java:869) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.evalValue(Expression.java:1034) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.call(CarpetScriptHost.java:868) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$handleCommand$21(CarpetScriptHost.java:723) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.utils.GlocalFlag.whileValueReturn(GlocalFlag.java:44) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.utils.GlocalFlag.getWhileDisabled(GlocalFlag.java:30) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.handleCommand(CarpetScriptHost.java:723) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.execute(CarpetScriptHost.java:153) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$addPathToCommand$3(CarpetScriptHost.java:177) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at com.mojang.brigadier.CommandDispatcher.execute(com/mojang/brigadier/CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
at net.minecraft.class_2170.method_9249(net/minecraft/class_2170.java:285) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_44252(net/minecraft/class_2170.java:278) ~[server-intermediary.jar:?]
at me.drex.votifier.VoteReceiver.run(VoteReceiver.java:121) ~[fabric-votifier-1.1.5.jar:?]
[08:29:49] [Thread-14/ERROR]: Unexpected exception while running Scarpet code
com.ishland.uwrad.common.CheckedThreadLocalRandom$1: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
Possible solutions: Find possible causes in the stack trace below and report to the corresponding mod authors
(You may make this a fatal warning instead of a hard crash with enforce_safe_world_random_access setting in uwrad.properties)
Caused by: java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
at com.ishland.uwrad.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:51) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at com.ishland.uwrad.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at com.ishland.uwrad.common.CheckedThreadLocalRandom.method_43156(CheckedThreadLocalRandom.java:82) ~[unsafe-world-random-access-detector-1.1.0.jar:?]
at net.minecraft.class_6566.method_43058(class_6566.java:61) ~[server-intermediary.jar:?]
at net.minecraft.class_5819.method_43385(class_5819.java:75) ~[server-intermediary.jar:?]
at net.minecraft.class_1308.method_5943(net/minecraft/class_1308.java:1087) ~[server-intermediary.jar:?]
at net.minecraft.class_1296.method_5943(class_1296.java:46) ~[server-intermediary.jar:?]
at net.minecraft.class_3988.method_5943(class_3988.java:66) ~[server-intermediary.jar:?]
at carpet.script.api.Entities.lambda$apply$5(Entities.java:155) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$17.lazyEval(Expression.java:684) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$2(ControlFlow.java:28) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$5.lazyEval(Expression.java:364) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$17(Expression.java:1504) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:163) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.Functions$1.lazyEval(Functions.java:60) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$9(ControlFlow.java:55) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$15.lazyEval(Expression.java:614) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.ControlFlow.lambda$apply$5(ControlFlow.java:38) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression$16.lazyEval(Expression.java:652) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:163) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.language.Functions$1.lazyEval(Functions.java:60) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.lambda$extractOp$20(Expression.java:1513) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.value.FunctionValue.execute(FunctionValue.java:271) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$call$28(CarpetScriptHost.java:869) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.Expression.evalValue(Expression.java:1034) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.call(CarpetScriptHost.java:868) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$handleCommand$21(CarpetScriptHost.java:723) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.utils.GlocalFlag.whileValueReturn(GlocalFlag.java:44) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.utils.GlocalFlag.getWhileDisabled(GlocalFlag.java:30) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.handleCommand(CarpetScriptHost.java:723) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.execute(CarpetScriptHost.java:153) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at carpet.script.CarpetScriptHost.lambda$addPathToCommand$3(CarpetScriptHost.java:177) ~[fabric-carpet-1.19.4-1.4.101+v230319.jar:?]
at com.mojang.brigadier.CommandDispatcher.execute(com/mojang/brigadier/CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
at net.minecraft.class_2170.method_9249(net/minecraft/class_2170.java:285) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_44252(net/minecraft/class_2170.java:278) ~[server-intermediary.jar:?]
at me.drex.votifier.VoteReceiver.run(VoteReceiver.java:121) ~[fabric-votifier-1.1.5.jar:?]
[08:29:49] [Thread-14/INFO]: ... in _spawnWanderingTrader[conqvote]/27:28
[08:29:49] [Thread-14/INFO]: ... in _runwithply[conqvote]/17:18
[08:29:49] [Thread-14/INFO]: Error while running custom command: run(str('tellform %s <c:>[Votes]</c> <gray>Votre 6 vous a octroyé un Wandering Trader</gray>', ply, roll));
HERE>> spawn('minecraft:wandering_trader', pos(player(ply)))
)
Internal error (please report this issue to Carpet) while evaluating: com.ishland.uwrad.common.CheckedThreadLocalRandom$1: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: Thread-14)
Possible solutions: Find possible causes in the stack trace below and report to the corresponding mod authors
(You may make this a fatal warning instead of a hard crash with enforce_safe_world_random_access setting in uwrad.properties) in conqvote at line 29, pos 4
``
Seems like it's not running on the server thread so it's getting multithreading issues.
As a workaround, running these functions in a scheduled call (schedule(0, ...)
) is likely to fix it, as I'm quite sure schedules always run on the server thread.
Seems like it's not running on the server thread so it's getting multithreading issues.
As a workaround, running these functions in a scheduled call (
schedule(0, ...)
) is likely to fix it, as I'm quite sure schedules always run on the server thread.
Works fine thanks
yeah, that's weird. I thought commands do run from the server thread. Maybe with so many mods they don't. schedule(0,
is a hack to ensure this, but command should run from server thread, right?
I believe this is an issue in Fabric-Votifier, from a quick look it seems to be running the vote received commands directly in their receiver thread instead of (as it's expected by the game and mods) in the server thread.
They do it here (assuming this is the one you're using): https://github.com/DrexHD/Fabric-Votifier/blob/6f9fd3928ad07a1abe752ae6ec05d8bc18733957/src/main/java/me/drex/votifier/VoteReceiver.java#L121
You should report it to them, this wouldn't be an issue with carpet once that's fixed.
The author of Fabric-Votifier has fixed this issue on their end; please update the mod on the server to version 1.1.6 or later for a proper fix.
Crash happened while running a command from a scarpet script
Scarpet script:
Crash dump: