TallWorlds / CubicChunks

MIT License
36 stars 7 forks source link

Tall Wrold is Resource Heavy #1

Closed AlphaFox13 closed 9 years ago

AlphaFox13 commented 9 years ago

[12:13:28] [Server thread/ERROR]: Encountered an unexpected exception java.lang.OutOfMemoryError: Java heap space

That was the error i got when attempting to run with only 1G of ram. I wouldn't call being resource a bug however i do think it needs addressing. Here is my proposed solution. In a vanilla report i get:

[12:34:47] [Server thread/INFO]: Preparing spawn area: 63% [12:34:48] [Server thread/INFO]: Changing view distance to 2, from 10

This seems like Minecraft is loading up 10 chunks distance, then taking in to account the render distance, I have no idea whether Tall Worlds runs the same way, however if it does would it be possible to lighten the load on lower end PC's by considering render distance Before Loading chunks rather than after. I am going to install a linux operating system in the mean time that way i can free up my ram (stupid windoz)

Error reports are below

//---- Vanilla Report ----\ [12:33:42] [Client thread/INFO]: Setting user: Alpha_Animations [12:33:42] [Client thread/INFO]: (Session ID is token:0220d12a96774d2bbe7a09ae323e3c01:c377d00eecf64c25b76b4a208eec9493) [12:33:45] [Client thread/INFO]: LWJGL Version: 2.9.4 [12:33:47] [Client thread/INFO]: Reloading ResourceManager: Default, 3D doors 1.5.zip [12:33:48] [Sound Library Loader/INFO]: Starting up SoundSystem... [12:33:48] [Thread-6/INFO]: Initializing LWJGL OpenAL [12:33:48] [Thread-6/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [12:33:48] [Thread-6/INFO]: OpenAL initialized. [12:33:48] [Sound Library Loader/INFO]: Sound engine started [12:33:51] [Client thread/INFO]: Created: 512x512 textures-atlas AL lib: (EE) MMDevApiProc: WaitForSingleObjectEx error: 0x102 AL lib: (EE) MMDevApiProc: Failed to get padding: 0x88890004 [12:34:44] [Server thread/INFO]: Starting integrated minecraft server version 1.8.3 [12:34:44] [Server thread/INFO]: Generating keypair [12:34:45] [Server thread/INFO]: Preparing start region for level 0 [12:34:46] [Server thread/INFO]: Preparing spawn area: 28% [12:34:47] [Server thread/INFO]: Preparing spawn area: 63% [12:34:48] [Server thread/INFO]: Changing view distance to 2, from 10 [12:34:49] [Server thread/WARN]: Invalid statistic in C:\Users\Alpha\AppData\Roaming.minecraft\saves\existence.af15\stats\c377d00e-ecf6-4c25-b76b-4a208eec9493.json: Don't know what stat.useItem.minecraft.obsidian_boat is [12:34:49] [Server thread/INFO]: Alpha_Animations[local:E:d5addef9] logged in with entity id 473 at (-26.208038521068886, 36.09221514568955, 51.695075761701254) [12:34:49] [Server thread/INFO]: Alpha_Animations joined the game

//---- Tall Worlds Report ----\ // Edit out some of the Generation pipeline stuff to save room 12:12:19.092 INFO Server thread tallworlds: Generation pipeline processed 9 cubes in 18 ms. 12:12:19.093 INFO Server thread tallworlds: Terrain: 4 processed, 0 remaining 12:12:19.093 INFO Server thread tallworlds: Biomes: 0 processed, 1826 remaining 12:12:19.093 INFO Server thread tallworlds: Features: 9 processed, 0 remaining 12:12:19.093 INFO Server thread tallworlds: Lighting: 0 processed, 3898 remaining 12:12:19.093 INFO Server thread tallworlds: Population: 9 processed, 0 remaining 12:12:19.113 INFO Server thread tallworlds: Done in 202243 ms [12:12:19] [Server thread/INFO] [bpp]: Changing view distance to 11, from 10 [12:12:19] [Netty Server IO #1/DEBUG] [el]: Set listener of el@1de01ad to ll@161af5b [12:12:22] [Netty Server IO #1/DEBUG] [el]: Enabled auto read [12:12:22] [Netty Local Client IO #0/DEBUG] [el]: Enabled auto read [12:12:22] [Client thread/DEBUG] [el]: Set listener of el@156b31d to bcy@168ffb0 [12:12:22] [Client thread/DEBUG] [el]: Disabled auto read [12:12:22] [Netty Server IO #1/DEBUG] [el]: Enabled auto read [12:12:22] [Netty Local Client IO #0/DEBUG] [el]: Enabled auto read [12:12:22] [Netty Server IO #1/DEBUG] [el]: Set listener of el@1de01ad to lp@1ff9414 [12:12:22] [Netty Local Client IO #0/DEBUG] [el]: Enabled auto read [12:12:22] [Netty Local Client IO #0/DEBUG] [el]: Set listener of el@156b31d to bcz@11bce33 [12:12:22] [Server thread/INFO] [ly]: Alpha_Animations[local:E:59d29689] logged in with entity id 0 at (-191.5, 71.0, 237.5) [12:12:22] [Server thread/DEBUG] [el]: Set listener of el@1de01ad to ln@1842431 [12:12:22] [Server thread/DEBUG] [el]: Disabled auto read [12:12:22] [Netty Server IO #1/DEBUG] [el]: Enabled auto read [12:12:26] [Server thread/INFO]: Alpha_Animations joined the gameAlpha_Animations joined the game 12:12:26.805 INFO Server thread tallworlds: Server sent 100 cubes to player, 7397 remaining //Edited out -- Server sent 100 cubes to player 12:12:34.486 INFO Server thread tallworlds: Server sent 100 cubes to player, 5297 remaining [12:12:34] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 12537ms behind, skipping 250 tick(s) 12:12:34.587 INFO Server thread tallworlds: Server sent 100 cubes to player, 5197 remaining //Edited out -- Server sent 100 cubes to player 12:12:55.120 INFO Server thread tallworlds: Server sent 100 cubes to player, 3597 remaining [12:12:55] [Server thread/INFO] [bpp]: Saving and pausing game... [12:12:55] [Server thread/INFO]: Saving chunks for level 'First Tall World'/Overworld [12:13:28] [Server thread/ERROR]: Encountered an unexpected exception java.lang.OutOfMemoryError: Java heap space at cubicchunks.world.ChunkSectionHelper.getBlockLSBArray(ChunkSectionHelper.java:33) ~[ChunkSectionHelper.class:?] at cubicchunks.server.CubeIO.writeCubeToNbt(CubeIO.java:346) ~[CubeIO.class:?] at cubicchunks.server.CubeIO.saveCube(CubeIO.java:172) ~[CubeIO.class:?] at cubicchunks.server.ServerCubeCache.a(ServerCubeCache.java:328) ~[ServerCubeCache.class:?] at lf.a(lf.java:766) ~[lf.class:?] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:362) ~[MinecraftServer.class:?] at bpp.z(bpp.java:142) ~[bpp.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25] [12:13:26] [Client thread/FATAL] [avf]: Error executing task java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_25] at net.minecraft.util.Util.a(Util.java:61) [h.class:?] at net.minecraft.main.Minecraft.runGameLoop(Minecraft.java:880) [avf.class:?] at net.minecraft.main.Minecraft.setCrashReporter|setViewEntity|displayGuiScreen|runTask|run|loadWorld|addServerStatsToSnooper|setServerData(Minecraft.java:325) [avf.class:?] at null.main(null.java:124) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) [launchwrapper-1.8.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:27) [launchwrapper-1.8.jar:?] Caused by: java.lang.OutOfMemoryError: Java heap space at cubicchunks.world.column.Column.loadCubes(Column.java:677) ~[Column.class:?] at cubicchunks.world.column.Column.a(Column.java:648) ~[Column.class:?] at net.minecraft.network.play.NetHandlerPlayClient.handleServerDifficuilty|handleRemoveEntityEffect|handleTitle|handleUpdateTeam|handleBlockBreakAnimation|handleLevelBorder|handleSpawnPainting|handleEntityMetadata|handleSpawnObject|handleSetExperience|handleSignEditorOpen|handleOpenWindow|handlePluginMessage|handleSoundEffect|handleEntityEffect|handleChunkData|handleExplosion|handleResourcePackSend|handleUpdateBlockEntity|handleTabComplete|handleListItem|handleCollectItem|handleSpawnPlayer|handleUpdateTime|handleAttachEntity|handleSpawnExperienceOrb|handleCamera|handlePlayerAbilities|handleUpdateHealth|handleWindowItems|handleMultiBlockChange|handleDisconnect|handleJoinGame|handleEntityProperties|handleMapChunkBulk|handleSetCompression|handleChangeGameState|handleRespawn|handleBlockAction|handleUseBed|handleChatMessage|handlePlayerListHeaderFooter|handleHeldItemChange|handleSpawnPosition|handleAnimation|addToSendQueue|handleEntityVelocity|handleSpawnGlobal|handleConfirmTransaction|handleUpdateObjective|handleMaps|handleCombat|handleEntityTeleport|handleEffect|handleWindowProperty|handleEntityStatus|handleBlockChange|handleDestroyEntities|handleUpdateSign|handleUpdateScore|handlePlayerpositionAndLook|handleStatistics|handleEntityHeadLook|handleSpawnMob|handleDisplayScoreboard|handleCloseWindow|handleEntityEquipment|handleEntity|handleParticle|handleSetSlot|handleUpdateEntityNBT|handleKeepAlive(NetHandlerPlayClient.java:896) ~[bcz.class:?] at net.minecraft.network.play.packet.clientbound.PacketMapChunkBulk.handle|getX|getChunkCount|read|handle(PacketMapChunkBulk.java:81) ~[gq.class:?] at net.minecraft.network.play.packet.clientbound.PacketMapChunkBulk.handle|getX|getChunkCount|read|handle(PacketMapChunkBulk.java:10) ~[gq.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil$1.java:13) ~[fi$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors$RunnableAdapter.java:511) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25] at net.minecraft.util.Util.a(Util.java:60) ~[h.class:?] ... 9 more [12:13:41] [Client thread/FATAL] [avf]: Error executing task java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_25] at net.minecraft.util.Util.a(Util.java:61) [h.class:?] at net.minecraft.main.Minecraft.runGameLoop(Minecraft.java:880) [avf.class:?] at net.minecraft.main.Minecraft.setCrashReporter|setViewEntity|displayGuiScreen|runTask|run|loadWorld|addServerStatsToSnooper|setServerData(Minecraft.java:325) [avf.class:?] at null.main(null.java:124) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) [launchwrapper-1.8.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:27) [launchwrapper-1.8.jar:?] Caused by: java.lang.OutOfMemoryError: Java heap space at net.minecraft.world.chunk.NibbleArray.(NibbleArray.java:9) ~[amx.class:?] at net.minecraft.world.chunk.storage.ChunkSection.(ChunkSection.java:25) ~[ana.class:?] at cubicchunks.world.cube.Cube.setEmpty(Cube.java:90) ~[Cube.class:?] at cubicchunks.world.column.Column.loadCubes(Column.java:671) ~[Column.class:?] at cubicchunks.world.column.Column.a(Column.java:648) ~[Column.class:?] at net.minecraft.network.play.NetHandlerPlayClient.handleServerDifficuilty|handleRemoveEntityEffect|handleTitle|handleUpdateTeam|handleBlockBreakAnimation|handleLevelBorder|handleSpawnPainting|handleEntityMetadata|handleSpawnObject|handleSetExperience|handleSignEditorOpen|handleOpenWindow|handlePluginMessage|handleSoundEffect|handleEntityEffect|handleChunkData|handleExplosion|handleResourcePackSend|handleUpdateBlockEntity|handleTabComplete|handleListItem|handleCollectItem|handleSpawnPlayer|handleUpdateTime|handleAttachEntity|handleSpawnExperienceOrb|handleCamera|handlePlayerAbilities|handleUpdateHealth|handleWindowItems|handleMultiBlockChange|handleDisconnect|handleJoinGame|handleEntityProperties|handleMapChunkBulk|handleSetCompression|handleChangeGameState|handleRespawn|handleBlockAction|handleUseBed|handleChatMessage|handlePlayerListHeaderFooter|handleHeldItemChange|handleSpawnPosition|handleAnimation|addToSendQueue|handleEntityVelocity|handleSpawnGlobal|handleConfirmTransaction|handleUpdateObjective|handleMaps|handleCombat|handleEntityTeleport|handleEffect|handleWindowProperty|handleEntityStatus|handleBlockChange|handleDestroyEntities|handleUpdateSign|handleUpdateScore|handlePlayerpositionAndLook|handleStatistics|handleEntityHeadLook|handleSpawnMob|handleDisplayScoreboard|handleCloseWindow|handleEntityEquipment|handleEntity|handleParticle|handleSetSlot|handleUpdateEntityNBT|handleKeepAlive(NetHandlerPlayClient.java:896) ~[bcz.class:?] at net.minecraft.network.play.packet.clientbound.PacketMapChunkBulk.handle|getX|getChunkCount|read|handle(PacketMapChunkBulk.java:81) ~[gq.class:?] at net.minecraft.network.play.packet.clientbound.PacketMapChunkBulk.handle|getX|getChunkCount|read|handle(PacketMapChunkBulk.java:10) ~[gq.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil$1.java:13) ~[fi$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors$RunnableAdapter.java:511) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25] at net.minecraft.util.Util.a(Util.java:60) ~[h.class:?] ... 9 more [12:13:45] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Alpha\AppData\Roaming.minecraft\crash-reports\crash-2015-04-12_12.13.45-server.txt [12:13:45] [Server thread/INFO]: Stopping server [12:13:45] [Server thread/INFO]: Saving players [12:13:48] [Server thread/INFO] [ln]: Alpha_Animations lost connection: TextComponent{text='Server closed', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}} [12:13:48] [Server thread/INFO]: Alpha_Animations left the gameAlpha_Animations left the game [12:13:50] [Server thread/INFO] [ln]: Stopping singleplayer server as player logged out [12:13:52] [Server thread/INFO]: Saving worlds [12:13:52] [Server thread/INFO]: Saving chunks for level 'First Tall World'/Overworld [12:14:04] [Server thread/ERROR]: Exception stopping the server java.lang.OutOfMemoryError: Java heap space [12:14:16] [Client thread/FATAL] [avf]: Error executing task java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_25] at net.minecraft.util.Util.a(Util.java:61) [h.class:?] at net.minecraft.main.Minecraft.runGameLoop(Minecraft.java:880) [avf.class:?] at net.minecraft.main.Minecraft.setCrashReporter|setViewEntity|displayGuiScreen|runTask|run|loadWorld|addServerStatsToSnooper|setServerData(Minecraft.java:325) [avf.class:?] at null.main(null.java:124) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) [launchwrapper-1.8.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:27) [launchwrapper-1.8.jar:?] Caused by: java.lang.OutOfMemoryError: Java heap space

ajthemacboy commented 9 years ago

I know this isn't really the right place to ask but I didn't want to create another separate issue for this.

How did you compile CubicChunks? Gradle and gradlew build are not working for me, and I really can't figure out why.

Also, CubicChunks is still in its very early stages; optimizations have not been added yet. So yes, this is an issue, but it probably won't be fixed for a while.

Razaekel commented 9 years ago

Tall worlds is going to be resource heavy compared to vanilla Minecraft due to the larger amount of data loaded. At 32 chunk render distance, vanilla loads 67,600 cubes. Tall worlds will load 274,625 cubes at maximum. That's going to be a 4x increase in memory requirements. We'll work on bringing it down as much as we can.

cuchaz commented 9 years ago

We added some memory optimizations in the last release that should help with this. The next thing to do is occlusion culling which should drastically cut down on the number of loaded cubes at a time, but it's a big change, so it won't happen any time soon. I'm closing this issue for now.

cuchaz commented 9 years ago

ie #43