nicho92 / MtgDesktopCompanion

Cards manager for magic the gathering
Apache License 2.0
165 stars 35 forks source link

HeapSpace Error when closing #216

Closed nicho92 closed 1 year ago

nicho92 commented 2 years ago

Configuration

Describe the bug HeapSpace error when auditable File is too big (exemple: after a large cards import).

Screenshots Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.base/java.util.Arrays.copyOf(Arrays.java:3537) at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:228) at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:682) at java.base/java.lang.StringBuffer.append(StringBuffer.java:388) at java.base/java.io.StringWriter.write(StringWriter.java:122) at com.google.gson.stream.JsonWriter.string(JsonWriter.java:617) at com.google.gson.stream.JsonWriter.value(JsonWriter.java:426) at com.google.gson.internal.bind.TypeAdapters$15.write(TypeAdapters.java:397) at com.google.gson.internal.bind.TypeAdapters$15.write(TypeAdapters.java:381) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:126) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:244) at com.google.gson.internal.bind.ObjectTypeAdapter.write(ObjectTypeAdapter.java:126) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61) at com.google.gson.Gson.toJson(Gson.java:747) at com.google.gson.Gson.toJson(Gson.java:726) at com.google.gson.Gson.toJson(Gson.java:681) at com.google.gson.Gson.toJson(Gson.java:661) at org.magic.api.exports.impl.JsonExport.toJson(JsonExport.java:78) at org.magic.services.TechnicalServiceManager.storeItems(TechnicalServiceManager.java:127) at org.magic.services.TechnicalServiceManager.storeAll(TechnicalServiceManager.java:95) at org.magic.services.MTGControler.closeApp(MTGControler.java:128) at org.magic.gui.MagicGUI$1.windowClosing(MagicGUI.java:105)