HiveGamesOSS / Chunker

Convert Minecraft worlds between Java Edition and Bedrock Edition
https://oss.chunker.app/
MIT License
282 stars 13 forks source link

Crash when converting #148

Closed TofTrial closed 4 days ago

TofTrial commented 4 days ago

Chunker Version

1.4.0-main-86becbf

Input World Version

Bedrock 1.21.40

Output World Version

Bedrock 1.21.30

Platform / Operating System

win32-x64-10.0.19045

Issue Description

Hi !

Please find the log behind. That-s seems to be an out of memory probleme. My world's size is 1.30 Gb on my hard sisk. I'v checked the JRE 1.8 MaxHeapSize, it is 4 276 092 928.

Can you please help me ? Thanks in advance.

Error Displayed: A fatal error occurred during conversion. Stack Trace:

java.util.concurrent.CompletionException: com.google.common.util.concurrent.ExecutionError: java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
    at com.hivemc.chunker.scheduling.task.Environment.cancel(Environment.java:85)
    at com.hivemc.chunker.conversion.WorldConverter.cancel(WorldConverter.java:609)
    at com.hivemc.chunker.conversion.WorldConverter.logFatalException(WorldConverter.java:441)
    at com.hivemc.chunker.scheduling.task.executor.TaskExecutor.handleException(TaskExecutor.java:109)
    at com.hivemc.chunker.scheduling.task.WrappedTask.lambda$setupFuture$0(WrappedTask.java:57)
    at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
    at com.hivemc.chunker.scheduling.task.executor.TaskExecutorSupplier.run(TaskExecutorSupplier.java:44)
    at com.hivemc.chunker.scheduling.task.executor.TaskExecutor.threadLoop(TaskExecutor.java:178)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.OutOfMemoryError: Java heap space
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2083)
    at com.google.common.cache.LocalCache.get(LocalCache.java:4017)
    at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898)
    at org.iq80.leveldb.util.LRUCache.load(LRUCache.java:56)
    at org.iq80.leveldb.table.Table.readBlock(Table.java:164)
    at org.iq80.leveldb.table.Table.openBlock(Table.java:137)
    at org.iq80.leveldb.table.Table.internalGet(Table.java:226)
    at org.iq80.leveldb.impl.TableCache.get(TableCache.java:101)
    at org.iq80.leveldb.impl.Level.get(Level.java:125)
    at org.iq80.leveldb.impl.Version.get(Version.java:144)
    at org.iq80.leveldb.impl.DbImpl.get(DbImpl.java:837)
    at org.iq80.leveldb.impl.DbImpl.get(DbImpl.java:806)
    at com.hivemc.chunker.conversion.encoding.bedrock.v1_18_30.reader.ColumnReader.readEntity(ColumnReader.java:58)
    at com.hivemc.chunker.conversion.encoding.bedrock.v1_18_30.reader.ColumnReader.readEntities(ColumnReader.java:48)
    at com.hivemc.chunker.scheduling.function.ThrowableConsumer.invoke(ThrowableConsumer.java:20)
    at com.hivemc.chunker.scheduling.function.ThrowableConsumer.invoke(ThrowableConsumer.java:8)
    at com.hivemc.chunker.scheduling.task.WrappedTask.apply(WrappedTask.java:84)
    at com.hivemc.chunker.scheduling.task.WrappedTask$WrappedTaskConstant.apply(WrappedTask.java:129)
    at com.hivemc.chunker.scheduling.task.WrappedTask.get(WrappedTask.java:77)
    at com.hivemc.chunker.scheduling.task.executor.TaskExecutorSupplier.run(TaskExecutorSupplier.java:42)
    ... 2 more
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.base/java.nio.HeapByteBuffer.<init>(Unknown Source)
    at java.base/java.nio.ByteBuffer.allocate(Unknown Source)
    at org.iq80.leveldb.util.ZLib.uncompress(ZLib.java:49)
    at org.iq80.leveldb.table.Table.readRawBlock(Table.java:202)
    at org.iq80.leveldb.table.Table.lambda$readBlock$1(Table.java:164)
    at org.iq80.leveldb.table.Table$$Lambda$411/0x0000000800235358.call(Unknown Source)
    at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4903)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3574)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2189)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2079)
    at com.google.common.cache.LocalCache.get(LocalCache.java:4017)
    at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898)
    at org.iq80.leveldb.util.LRUCache.load(LRUCache.java:56)
    at org.iq80.leveldb.table.Table.readBlock(Table.java:164)
    at org.iq80.leveldb.table.Table.openBlock(Table.java:137)
    at org.iq80.leveldb.table.Table.internalGet(Table.java:226)
    at org.iq80.leveldb.impl.TableCache.get(TableCache.java:101)
    at org.iq80.leveldb.impl.Level.get(Level.java:125)
    at org.iq80.leveldb.impl.Version.get(Version.java:144)
    at org.iq80.leveldb.impl.DbImpl.get(DbImpl.java:837)
    at org.iq80.leveldb.impl.DbImpl.get(DbImpl.java:806)
    at com.hivemc.chunker.conversion.encoding.bedrock.v1_18_30.reader.ColumnReader.readEntity(ColumnReader.java:58)
    at com.hivemc.chunker.conversion.encoding.bedrock.v1_18_30.reader.ColumnReader.readEntities(ColumnReader.java:48)
    at com.hivemc.chunker.conversion.encoding.bedrock.base.reader.BedrockColumnReader$$Lambda$511/0x00000008002748c0.accept(Unknown Source)
    at com.hivemc.chunker.scheduling.function.ThrowableConsumer.invoke(ThrowableConsumer.java:20)
    at com.hivemc.chunker.scheduling.function.ThrowableConsumer.invoke(ThrowableConsumer.java:8)
    at com.hivemc.chunker.scheduling.task.WrappedTask.apply(WrappedTask.java:84)
    at com.hivemc.chunker.scheduling.task.WrappedTask$WrappedTaskConstant.apply(WrappedTask.java:129)
    at com.hivemc.chunker.scheduling.task.WrappedTask.get(WrappedTask.java:77)
    at com.hivemc.chunker.scheduling.task.executor.TaskExecutorSupplier.run(TaskExecutorSupplier.java:42)
    at com.hivemc.chunker.scheduling.task.executor.TaskExecutor.threadLoop(TaskExecutor.java:178)
FormallyMyles commented 4 days ago

This can depend on how much memory you have, there is currently an issue where Chunker doesn't allocate enough which we'll hopefully have fixed in the next release - https://github.com/HiveGamesOSS/Chunker/issues/125

As a note, due to how Minecraft compression / LevelDB works you may need more RAM to convert the map as LevelDB does a great job of compressing the map.