GoldenDelicios / Lite2Edit

Java application: Converts Litematics to WorldEdit schematics
MIT License
117 stars 11 forks source link

Can't convert litematic #6

Closed IZeeXeS closed 1 year ago

IZeeXeS commented 1 year ago

I tried to convert a 33 MB litematic and converter gives this error:

Error while converting terra.litematic: java.lang.OutOfMemoryError: Java heap space

I checked how much memory process took and its about 770 MB, instead of 4 gigs of ram that i have installed in pc.

Why is there this limitations?

And I checked that this litematic is not broken

fix please

GoldenDelicios commented 1 year ago

Hello, sorry for the delayed response.

Litematic and schematic files are compressed files. Lite2Edit uncompresses the original file, converts it to a schematic in memory, and then compresses it back before writing to file.

The litematic you provided has an uncompressed size of 520 MB with over 430 million blocks. The default heap size Java allocates is not enough to convert this schematic. If you're on Windows you can open Command Prompt (likely called a Terminal in other OSes) and run java -Xmx3G -jar path/to/Lite2Edit.jar to allow Java to use up to 3 GB of RAM, which is enough to convert the litematic you provided.

Let me know if you need additional help.

IZeeXeS commented 1 year ago

thanks