"Please report this error: [See console] java.lang.OutOfMemoryError: Java heap space"
mk-pmb opened this issue · 5 comments
WorldEdit Version
Fabric-Official(7.2.15-SNAPSHOT+6460-c518821)
Platform Version
Fabric Loader v0.14.21, Fabric API 0.83.1+1.20.1
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
I was trying to delete (//set air) a huge selection. After a long time, WE said in chat I shall report this error. After that, Minecraft was very sluggish, so I had to kill and restart it.
I assume this is about determining how much heap space is available and dividing the area to be worked on accordingly.
(Click to see log messages)
[00:43:26] [Render thread/INFO]: [CHAT] Global mask disabled.
[00:43:27] [Render thread/INFO]: [CHAT] Type: cuboid
[00:43:27] [Render thread/INFO]: [CHAT] Position 1: (-640, 139, -640)
[00:43:27] [Render thread/INFO]: [CHAT] Position 2: (639, 181, 639)
[00:43:27] [Render thread/INFO]: [CHAT] Size: (1280, 43, 1280)
[00:43:27] [Render thread/INFO]: [CHAT] Cuboid distance: 1809.2667022857631
[00:43:27] [Render thread/INFO]: [CHAT] # of blocks: 70451200
[00:45:53] [Server thread/ERROR]: An unexpected error while handling a WorldEdit command
java.lang.OutOfMemoryError: Java heap space
at it.unimi.dsi.fastutil.longs.LongArrays.forceCapacity(LongArrays.java:126) ~[fastutil-8.5.9.jar:?]
at it.unimi.dsi.fastutil.longs.LongArrayList.grow(LongArrayList.java:317) ~[fastutil-8.5.9.jar:?]
at it.unimi.dsi.fastutil.longs.LongArrayList.add(LongArrayList.java:333) ~[fastutil-8.5.9.jar:?]
at com.sk89q.worldedit.util.collection.LongPositionList.add(LongPositionList.java:43) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.util.collection.LocatedBlockList.add(LocatedBlockList.java:61) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.history.changeset.BlockOptimizedHistory.add(BlockOptimizedHistory.java:61) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.ChangeSetExtent.setBlock(ChangeSetExtent.java:65) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.MaskingExtent.setBlock(MaskingExtent.java:69) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.validation.BlockChangeLimiter.setBlock(BlockChangeLimiter.java:87) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extent.validation.DataValidatorExtent.setBlock(DataValidatorExtent.java:64) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.EditSession.setBlock(EditSession.java:737) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.EditSession.setBlock(EditSession.java:780) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.function.block.BlockReplace.apply(BlockReplace.java:53) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.function.visitor.RegionVisitor.resume(RegionVisitor.java:60) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.function.operation.Operations.completeBlindly(Operations.java:74) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.command.RegionCommands.set(RegionCommands.java:106) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.command.RegionCommandsRegistration.cmd$_set(RegionCommandsRegistration.java:408) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.command.RegionCommandsRegistration$$Lambda$4247/0x0000000801ae4000.run(Unknown Source) ~[?:?]
at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommand(PlatformCommandManager.java:497) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at java.lang.invoke.LambdaForm$DMH/0x000000080108b000.invokeSpecial(LambdaForm$DMH) ~[?:?]
at java.lang.invoke.LambdaForm$MH/0x0000000801a90000.invoke(LambdaForm$MH) ~[?:?]
at java.lang.invoke.LambdaForm$MH/0x0000000801288000.invokeExact_MT(LambdaForm$MH) ~[?:?]
at com.sk89q.worldedit.util.eventbus.MethodHandleEventHandler.dispatch(MethodHandleEventHandler.java:51) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.util.eventbus.EventHandler.handleEvent(EventHandler.java:73) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.util.eventbus.EventBus.dispatch(EventBus.java:193) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.util.eventbus.EventBus.post(EventBus.java:181) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.fabric.CommandWrapper.lambda$register$0(CommandWrapper.java:62) ~[worldedit-fabric-mc1.20-7.2.15-SNAPSHOT-dist.jar:?]
at com.sk89q.worldedit.fabric.CommandWrapper$$Lambda$7617/0x0000000801f4c720.run(Unknown Source) ~[?:?]
[00:45:53] [Render thread/INFO]: [CHAT] Please report this error: [See console]
[00:45:53] [Render thread/INFO]: [CHAT] java.lang.OutOfMemoryError: Java heap space
Expected Behavior
WorldEdit reports how many blocks have been set to air.
Reproduction Steps
- Go to the nether, set game mode to creative, fly in midair.
/tp @s -330 150 -330 facing 319 140 319
//pos1 -320,139,-320
//pos2 319,181,319
//gmask
//# confirm_we_done=set air
Anything Else?
"Please report this error:" should maybe be clarified with "(unless already reported)".
In that case, obviously the bug is the wrong message "Please report this error:". It should instead say "You need to allocate more RAM to work on this huge selection."
There may also be some kind of memory management problem because the sluggishness continues even when I manage to quit the world and start it anew without restarting Minecraft entirely.
Thanks, that's good to know. I wasn't clear enough: In the case where I didn't have to restart Minecraft entirely, I used a smaller selection, so //set finished with success. In that entire session of the Minecraft client running, there was no out-of-memory error. Nonetheless, after the successful //set, Minecraft was suspiciously slow, so I left the world in hopes that this would clean up everything. I joined the world again and it was still slow.