Java error, will only save corrupted patches


#1

Pretty often I have this problem where the axoloti patcher somehow runs out of memory (at least, that's how this looks to me). Is there a way to fix this?
This is the error report on the axoloti:

Saving preferences...
preferences path : C:\Users\Dixons\Documents\axoloti\axoloti.prefs
java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.simpleframework.xml.core.LabelExtractor.getLabel(LabelExtractor.java:268)
at org.simpleframework.xml.core.LabelExtractor.getUnion(LabelExtractor.java:217)
at org.simpleframework.xml.core.LabelExtractor.getLabels(LabelExtractor.java:169)
at org.simpleframework.xml.core.LabelExtractor.getGroup(LabelExtractor.java:142)
at org.simpleframework.xml.core.LabelExtractor.getList(LabelExtractor.java:117)
at org.simpleframework.xml.core.Support.getLabels(Support.java:258)
at org.simpleframework.xml.core.StructureBuilder.union(StructureBuilder.java:218)
at org.simpleframework.xml.core.StructureBuilder.process(StructureBuilder.java:179)
at org.simpleframework.xml.core.ObjectScanner.field(ObjectScanner.java:438)
at org.simpleframework.xml.core.ObjectScanner.scan(ObjectScanner.java:371)
at org.simpleframework.xml.core.ObjectScanner.(ObjectScanner.java:82)
at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:81)
at org.simpleframework.xml.core.Support.getScanner(Support.java:357)
at org.simpleframework.xml.core.Source.getScanner(Source.java:271)
at org.simpleframework.xml.core.Source.getCaller(Source.java:300)
at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1147)
at org.simpleframework.xml.core.Composite.writeUnion(Composite.java:1124)
at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1098)
at org.simpleframework.xml.core.Composite.writeSection(Composite.java:1004)
at org.simpleframework.xml.core.Composite.write(Composite.java:975)
at org.simpleframework.xml.core.Composite.write(Composite.java:952)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:268)
at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:245)
at org.simpleframework.xml.core.CompositeListUnion.write(CompositeListUnion.java:302)
at org.simpleframework.xml.core.CompositeListUnion.write(CompositeListUnion.java:274)
at org.simpleframework.xml.core.CompositeListUnion.write(CompositeListUnion.java:246)
at org.simpleframework.xml.core.Composite.writeElement(Composite.java:1256)
at org.simpleframework.xml.core.Composite.writeElement(Composite.java:1239)
at org.simpleframework.xml.core.Composite.writeUnion(Composite.java:1127)
at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1098)
at org.simpleframework.xml.core.Composite.writeSection(Composite.java:1004)
at org.simpleframework.xml.core.Composite.write(Composite.java:975)
at org.simpleframework.xml.core.Composite.write(Composite.java:952)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
at org.simpleframework.xml.core.Persister.write(Persister.java:1180)
at org.simpleframework.xml.core.Persister.write(Persister.java:1162)
at org.simpleframework.xml.core.Persister.write(Persister.java:1140)
at org.simpleframework.xml.core.Persister.write(Persister.java:1259)
at org.simpleframework.xml.core.Persister.write(Persister.java:1241)
at org.simpleframework.xml.core.Persister.write(Persister.java:1222)
at org.simpleframework.xml.core.Persister.write(Persister.java:1201)
at axoloti.Patch.save(Patch.java:780)
at axoloti.PatchGUI.save(PatchGUI.java:966)
at axoloti.PatchFrame.jMenuSaveAsActionPerformed(PatchFrame.java:825)
at axoloti.PatchFrame.access$600(PatchFrame.java:65)
at axoloti.PatchFrame$9.actionPerformed(PatchFrame.java:433)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.OutOfMemoryError: Java heap space


#2

You could try the duct tape solution (which is often appropriate), and just increase the memory available to Java, see https://stackoverflow.com/questions/17369522/set-default-heap-size-in-windows . If I recall correctly, at least historically the default was quite conservative (for a desktop program) at something like 96, 128 or 256 MB.