dj0tt / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Auto-format causes Java heap overflow #1088

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the attached file with the IDE
2. Attempt an auto-format

What is the expected output? What do you see instead?

I expect the code to be formatted.

Instead:

First time, the IDE went into a loop and had to be forced-quit.

Second time:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap 
space
    at java.util.Arrays.copyOf(Arrays.java:2882)
    at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
    at java.lang.StringBuffer.append(StringBuffer.java:224)
    at processing.app.tools.AutoFormat.indent_puts(AutoFormat.java:170)
    at processing.app.tools.AutoFormat.run(AutoFormat.java:652)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:663)
    at java.awt.EventQueue$2.run(EventQueue.java:661)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:672)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?

IDE 1.0.1
Mac OS/X
Board not relevant

Please provide any additional information below.

Original issue reported on code.google.com by n...@gammon.com.au on 30 Oct 2012 at 5:59

Attachments:

GoogleCodeExporter commented 9 years ago
It took a year, but it's now solved. See 
https://github.com/arduino/Arduino/issues/1088

Original comment by f.fiss...@arduino.cc on 15 Oct 2013 at 8:02

GoogleCodeExporter commented 9 years ago

Original comment by c.mag...@arduino.cc on 15 Oct 2013 at 8:15