This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE Dev (Build 201502090001) VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17 OS: Linux User Comments: jkovalsky: Occurred when trying to reproduce issue #250305. Stacktrace: java.lang.OutOfMemoryError: Java heap space at sun.font.StandardTextSource.<init>(StandardTextSource.java:100) at sun.font.TextLabelFactory.createExtended(TextLabelFactory.java:132) at java.awt.font.TextLine.createComponentsOnRun(TextLine.java:1030) at java.awt.font.TextLine.getComponents(TextLine.java:1099) at java.awt.font.TextMeasurer.generateComponents(TextMeasurer.java:287) at java.awt.font.TextMeasurer.ensureComponents(TextMeasurer.java:499)
Created attachment 151899 [details] stacktrace
I've reproduced this :-(
This is reproducible only with special characters that are displayed in a TextArea. This is a shortest sequence that I've identified: "\uDC00\uD802\uDFFF" which when repeated 5000 times, creates cca 600MB objects on heap. This looks like a Swing memory defect. To fix this, i need to find out what triggers this insane behavior and then limit the number of displayed characters more severely.
This is a regression in JDK. In JDK 7 the memory usage is O.K. It may be a result of http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/aca4a67e560d
I've submitted a defect for JDK: https://bugs.openjdk.java.net/browse/JDK-8072775
"Fixed" in NetBeans by lowering the limit to 1000 characters on JDK 8: changeset: 283903:f2a9b7fce1b6 http://hg.netbeans.org/core-main/rev/f2a9b7fce1b6
Integrated into 'main-silver', will be available in build *201502100301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f2a9b7fce1b6 User: mentlicher@netbeans.org Log: #250307: Limit the maximum String length to 1000 characters on JDK 8, due to big memory consumption spent on some Strings in JDK 8.
Product Version: NetBeans IDE Dev (Build 201502100301) Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17 System: Linux version 3.13.0-24-generic running on amd64; UTF-8; en_US (nb) Seems to work fine now with the limit. There is still possibility to save the property's value to file. Thanks for the quick fix.
The JDK bug was fixed in 1.8.0 update 60. Therefore I've added a check for the update number: changeset: 289348:88cf772ace61 http://hg.netbeans.org/core-main/rev/88cf772ace61
Integrated into 'main-silver', will be available in build *201507040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/88cf772ace61 User: mentlicher@netbeans.org Log: #250307: The JDK bug was fixed in 1.8.0 update 60, therefore present severely shorted values only on updates less than 60.
*** Bug 256191 has been marked as a duplicate of this bug. ***