java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:569) at java.lang.StringBuilder.append(StringBuilder.java:190) at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1003) at com.google.gson.stream.JsonReader.nextString(JsonReader.java:815) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:418) at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:406) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at
The fix: Clean up Minecraft\installs\options.txt by removing any entries that looked bad.
The explanation:
Searching the internet didn't provide much help other than 'reinstall'. Rather than risk losing saves, I poked around some of the files and was able to fix it. I noticed the file Minecraft\installs\options.txt was 300MB. This seemed a little large for a txt file that was supposed to be options. Looking through the file there are a bunch of key:value entries. One of them called 'resourcePacks' had a value that looked like 300MB of garbage. Looking at Options.txt said these should be readable names. Since it was random non-printable characters, I removed the whole 300MB entry. Minecraft now loads just fine.
Seems Minecraft was choaking on trying to load of 300MB of resourcePack names. StringBuilder was called to keep appending and ran of of room. After all a 300MB string is rather large.