[Crash][Scarpet] recursive references in variables can cause entire game to crash, not just the app.
Crec0 opened this issue ยท 5 comments
code entered
/script run reduce([[1,2,3], [4,5]], _ += _, [])
traceback
[23:29:54] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.StackOverflowError: null
at java.util.stream.Collectors.joining(Collectors.java:410) ~[?:?]
at java.util.stream.Collectors.joining(Collectors.java:391) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.16.5-1.4.40+v210608.jar:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
full log
latest.log
I managed to reproduce the crash, resulting in the following error:
Log and crash report when running command
[01:39:46] [Server thread/INFO]: Input code size for system chat: 13 nodes, 4 deep
[01:39:46] [Server thread/INFO]: Optimized from 13 nodes, 4 code depth to 6 nodes, 3 code depth
[01:39:46] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.StackOverflowError: null
at Not Enough Crashes deobfuscated stack trace.(1.17+build.11) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source) ~[?:?]
... (over 9000 lines)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at carpet.script.value.ListValue.getString(ListValue.java:35) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.commands.ScriptCommand.handleCall(ScriptCommand.java:451) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.commands.ScriptCommand.compute(ScriptCommand.java:500) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.commands.ScriptCommand.lambda$register$16(ScriptCommand.java:143) ~[fabric-carpet-1.17-1.4.40+v210608.jar:?]
at carpet.commands.ScriptCommand$$Lambda$5737/0x000000005190b268.run(Unknown Source) ~[?:?]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:177) ~[brigadier-1.0.18.jar:?]
at net.minecraft.server.command.CommandManager.execute(CommandManager:251) ~[?:?]
at net.minecraft.server.network.ServerPlayNetworkHandler.executeCommand(ServerPlayNetworkHandler:1239) ~[?:?]
at net.minecraft.server.network.ServerPlayNetworkHandler.handleMessage(ServerPlayNetworkHandler:1223) ~[?:?]
at net.minecraft.server.network.ServerPlayNetworkHandler.onGameMessage(ServerPlayNetworkHandler:1206) ~[?:?]
at net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket.apply(ChatMessageC2SPacket:30) ~[?:?]
at net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket.apply(ChatMessageC2SPacket:7) ~[?:?]
at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils:21) ~[?:?]
at net.minecraft.class_2600$$Lambda$7404/0x00000000621382f0.run(Unknown Source) ~[?:?]
at net.minecraft.server.ServerTask.run(ServerTask:18) ~[?:?]
at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor:151) ~[?:?]
at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor:23) ~[?:?]
at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer:783) ~[intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer:167) ~[intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor:125) ~[?:?]
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer:765) ~[intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.server.MinecraftServer.runTask(MinecraftServer:759) ~[intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor:110) ~[?:?]
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer:743) ~[intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.server.MinecraftServer.handler$beb000$modifiedRunLoop(MinecraftServer:4902) ~[intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer:671) [intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer:274) [intermediary-minecraft-1.17-client.jar:?]
at net.minecraft.server.MinecraftServer$$Lambda$6094/0x00000000519bfb70.run(Unknown Source) [intermediary-minecraft-1.17-client.jar:?]
at java.lang.Thread.run(Thread.java:853) [?:?]
[01:39:47] [Server thread/ERROR]: This crash report has been saved to: C:\Users\james\Documents\MultiMC\instances\1.17 Main\.minecraft\crash-reports\crash-2021-06-17_01.39.47-server.txt
[01:39:47] [Server thread/INFO]: Stopping server
[01:39:47] [Server thread/INFO]: Saving players
[01:39:47] [Server thread/INFO]: James3221 lost connection: Server closed
[01:39:47] [Server thread/INFO]: James3221 left the game
[01:39:47] [Server thread/INFO]: Stopping singleplayer server as player logged out
[01:39:47] [Server thread/INFO]: Saving worlds
[01:39:47] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Test World 3]'/minecraft:overworld
[01:39:47] [Render thread/FATAL]: Minecraft ran into a problem! Report saved to: C:\Users\james\Documents\MultiMC\instances\1.17 Main\.minecraft\crash-reports\crash-2021-06-17_01.39.47-server.txt
---- Minecraft Crash Report ----
// I let you down. Sorry :(
Time: 6/17/21, 1:39 AM
Description: Exception in server tick loop
java.lang.StackOverflowError: Exception in server tick loop
at Not Enough Crashes deobfuscated stack trace.(1.17+build.11)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at carpet.script.value.ListValue.getString(ListValue.java:35)
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at carpet.script.value.ListValue.getString(ListValue.java:35)
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at carpet.script.value.ListValue.getString(ListValue.java:35)
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at carpet.script.value.ListValue.getString(ListValue.java:35)
at carpet.script.value.ListValue$$Lambda$7930/0x0000000072de2da0.apply(Unknown Source)
... (over 9000 lines)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at carpet.script.value.ListValue.getString(ListValue.java:35)
at carpet.commands.ScriptCommand.handleCall(ScriptCommand.java:451)
at carpet.commands.ScriptCommand.compute(ScriptCommand.java:500)
at carpet.commands.ScriptCommand.lambda$register$16(ScriptCommand.java:143)
at carpet.commands.ScriptCommand$$Lambda$5737/0x000000005190b268.run(Unknown Source)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:177)
at net.minecraft.server.command.CommandManager.execute(CommandManager:251)
at net.minecraft.server.network.ServerPlayNetworkHandler.executeCommand(ServerPlayNetworkHandler:1239)
at net.minecraft.server.network.ServerPlayNetworkHandler.handleMessage(ServerPlayNetworkHandler:1223)
at net.minecraft.server.network.ServerPlayNetworkHandler.onGameMessage(ServerPlayNetworkHandler:1206)
at net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket.apply(ChatMessageC2SPacket:30)
at net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket.apply(ChatMessageC2SPacket:7)
at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils:21)
at net.minecraft.class_2600$$Lambda$7404/0x00000000621382f0.run(Unknown Source)
at net.minecraft.server.ServerTask.run(ServerTask:18)
at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor:151)
at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor:23)
at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer:783)
at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer:167)
at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor:125)
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer:765)
at net.minecraft.server.MinecraftServer.runTask(MinecraftServer:759)
at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor:110)
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer:743)
at net.minecraft.server.MinecraftServer.handler$beb000$modifiedRunLoop(MinecraftServer:4902)
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer:671)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer:274)
at net.minecraft.server.MinecraftServer$$Lambda$6094/0x00000000519bfb70.run(Unknown Source)
at java.lang.Thread.run(Thread.java:853)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.17
Minecraft Version ID: 1.17
Operating System: Windows 10 (amd64) version 10.0
Java Version: 16.0.1, AdoptOpenJDK
Java VM Version: Eclipse OpenJ9 VM (JRE 16 Windows 10 amd64-64-Bit Compressed References 20210421_24 (JIT enabled, AOT enabled)
OpenJ9 - b4cc246d9
OMR - 162e6f729
JCL - cea22090ecf based on jdk-16.0.1+9), Eclipse OpenJ9
Memory: 734733464 bytes (700 MiB) / 4831838208 bytes (4608 MiB) up to 4831838208 bytes (4608 MiB)
CPUs: 6
Processor Vendor: GenuineIntel
Processor Name: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Identifier: Intel64 Family 6 Model 158 Stepping 10
Microarchitecture: Coffee Lake
Frequency (GHz): 2.90
Number of physical packages: 1
Number of physical CPUs: 6
Number of logical CPUs: 6
Graphics card #0 name: NVIDIA GeForce GTX 1660
Graphics card #0 vendor: NVIDIA (0x10de)
Graphics card #0 VRAM (MB): 4095.00
Graphics card #0 deviceId: 0x2184
Graphics card #0 versionInfo: DriverVersion=27.21.14.5671
Memory slot #0 capacity (MB): 8192.00
Memory slot #0 clockSpeed (GHz): 2.67
Memory slot #0 type: DDR4
Virtual memory max (MB): 20408.56
Virtual memory used (MB): 15100.65
Swap memory total (MB): 12288.00
Swap memory used (MB): 973.36
JVM Flags: 6 total; -Xoptionsfile=C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-openj9\lib\options.default -Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword=org/apache/harmony/luni/util/ModifiedMap$Entry,noLockword=java/util/Hashtable$Entry,noLockword=java/lang/invoke/MethodType,noLockword=java/lang/invoke/MethodHandle,noLockword=java/lang/invoke/CollectHandle,noLockword=java/lang/invoke/ConstructorHandle,noLockword=java/lang/invoke/ConvertHandle,noLockword=java/lang/invoke/ArgumentConversionHandle,noLockword=java/lang/invoke/AsTypeHandle,noLockword=java/lang/invoke/ExplicitCastHandle,noLockword=java/lang/invoke/FilterReturnHandle,noLockword=java/lang/invoke/DirectHandle,noLockword=java/lang/invoke/ReceiverBoundHandle,noLockword=java/lang/invoke/DynamicInvokerHandle,noLockword=java/lang/invoke/FieldHandle,noLockword=java/lang/invoke/FieldGetterHandle,noLockword=java/lang/invoke/FieldSetterHandle,noLockword=java/lang/invoke/StaticFieldGetterHandle,noLockword=java/lang/invoke/StaticFieldSetterHandle,noLockword=java/lang/invoke/IndirectHandle,noLockword=java/lang/invoke/InterfaceHandle,noLockword=java/lang/invoke/VirtualHandle,noLockword=java/lang/invoke/PrimitiveHandle,noLockword=java/lang/invoke/InvokeExactHandle,noLockword=java/lang/invoke/InvokeGenericHandle,noLockword=java/lang/invoke/VarargsCollectorHandle,noLockword=java/lang/invoke/ThunkTuple -Xjcl:jclse29 -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms4608m -Xmx4608m
Fabric Mods:
attributefix: Attribute Fix {FABRIC} 1.0.1
carpet: Carpet Mod 1.4.40
carpet-extra: Carpet Extra 1.4.40
clientcommands: Client Commands 2.5.1
clientcommands-scripting: Clientcommands Scripting 1.1
disable_custom_worlds_advice: Disable Custom Worlds Advice 1.3
fabric: Fabric API 0.35.2+1.17
fabric-api-base: Fabric API Base 0.3.0+a02b44633d
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.1.0+1d383bb63d
fabric-biome-api-v1: Fabric Biome API (v1) 3.1.11+c345aea83d
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.5+a02b44633d
fabric-command-api-v1: Fabric Command API (v1) 1.1.1+a02b44633d
fabric-commands-v0: Fabric Commands (v0) 0.2.2+92519afa3d
fabric-containers-v0: Fabric Containers (v0) 0.1.12+a02b44633d
fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.2+a02b44633d
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.5+be9da3103d
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.0.10+a02b44633d
fabric-entity-events-v1: Fabric Entity Events (v1) 1.1.0+a02b44633d
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.8+a02b44633d
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+92519afa3d
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.6+a02b44633d
fabric-item-api-v1: Fabric Item API (v1) 1.2.4+a02b44633d
fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.10+b7ab61213d
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.4+a02b44633d
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.2+36b77c3e3d
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.4+a02b44633d
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.4+a02b44633d
fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+92519afa3d
fabric-models-v0: Fabric Models (v0) 0.3.0+a02b44633d
fabric-networking-api-v1: Fabric Networking API (v1) 1.0.11+b7ab61213d
fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.11+a02b44633d
fabric-networking-v0: Fabric Networking (v0) 0.3.2+92519afa3d
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.10.9+b7ab61213d
fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.3+a02b44633d
fabric-particles-v1: Fabric Particles (v1) 0.2.4+a02b44633d
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.10+e2961fee3d
fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.3+676f40fa3d
fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.8+a02b44633d
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.0+a02b44633d
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+a02b44633d
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.13+a02b44633d
fabric-rendering-v0: Fabric Rendering (v0) 1.1.2+92519afa3d
fabric-rendering-v1: Fabric Rendering (v1) 1.6.0+a02b44633d
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.7+b7ab6121d5
fabric-screen-api-v1: Fabric Screen API (v1) 1.0.4+198a96213d
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.8+a02b44633d
fabric-structure-api-v1: Fabric Structure API (v1) 1.1.11+e36969833d
fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.4+a02b44633d
fabric-textures-v0: Fabric Textures (v0) 1.0.6+a02b44633d
fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.12+b7ab61213d
fabricloader: Fabric Loader 0.11.6
itemscroller: Item Scroller 0.15.0-dev.20210608.211652
java: Eclipse OpenJ9 VM 16
litematica: Litematica 0.0.0-dev.20210616.033538
malilib: MaLiLib 0.10.0+dev.22
minecraft: Minecraft 1.17
minihud: MiniHUD 0.19.0-dev.20210609.185508
modmenu: Mod Menu 2.0.2
multiconnect-api: MultiConnect API 1.4
notenoughcrashes: Not Enough Crashes 3.3.0+1.17
tweakeroo: Tweakeroo 0.10.0-dev.20210614.173711
Loaded Scarpet Apps:
mob_levels
Player Count: 1 / 8; [class_3222['James3221'/9960, l='ServerLevel[Test World 3]', x=33.70, y=-60.00, z=-46.30]]
Data Packs: vanilla (incompatible), Fabric Mods, file/CavesAndCliffsPreview.zip
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fabric'
Client Crashes Since Restart: 0
Integrated Server Crashes Since Restart: 1
[01:39:48] [Server thread/INFO]: ThreadedAnvilChunkStorage (Test World 3): All chunks are saved
[01:39:49] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Test World 3]'/minecraft:the_nether
[01:39:49] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[01:39:49] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Test World 3]'/minecraft:the_end
[01:39:49] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[01:39:50] [Server thread/INFO]: ThreadedAnvilChunkStorage (Test World 3): All chunks are saved
[01:39:50] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[01:39:50] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
Lol, its recursively adding yourself to the end of yourself.
Same story
/script run a = [1]; a += a; a
conceptually you end up with a = [1, a] = [1, [1, a]] = [1, [1, [1, a]]] ...
while you can create it (it doesn't fail on a += a
), you can't do anything with it due to cyclic reference
While I consider it a programmer's error (cyclic references of collections to itself is a standard programmers trap), it would be great if scarpet could detect it. or maybe it shoudn't. It should definitely not crash the entire game. You probably want to do something like that instead:
reduce([[1,2,3], [4,5]], put(_a,null,_,'extend'); _a, []);
- not as pretty mainly because put
doesn't return the entire object back
I was trying to implement flatten() method flatten a list of lists but ended up in this crash. :p
I got the solution with this reduce(listoflists, map(_, _a+=_);_a;, [])
Although it's a programmer's error, the outcome is too punishing that it literally crashes the game itself which can result in progress loss.