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.
java.lang.OutOfMemoryError: Java heap space at org.netbeans.modules.editor.lib.impl.MarkVector.enlargeGap(MarkVector.java:722) at org.netbeans.modules.editor.lib.impl.MarkVector.insert(MarkVector.java:158) at org.netbeans.editor.DocumentContent.createPosition(DocumentContent.java:125) at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:816) at org.netbeans.modules.editor.lib2.view.ViewBuilder.createNextView(ViewBuilder.java:413) at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:291) at org.netbeans.modules.editor.lib2.view.ViewUpdates.reinitViews(ViewUpdates.java:136) at org.netbeans.modules.editor.lib2.view.DocumentView$1.run(DocumentView.java:488) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1409) at org.netbeans.modules.editor.lib2.view.DocumentView.reinitViews(DocumentView.java:478) at org.netbeans.modules.editor.lib2.view.DocumentView.propertyChange(DocumentView.java:1140) at org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(WeakListenerImpl.java:196) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at org.netbeans.editor.BaseDocument$LazyPropertyMap.put(BaseDocument.java:2429) at org.netbeans.modules.editor.NbEditorDocument$4.put(NbEditorDocument.java:303) at javax.swing.text.AbstractDocument.putProperty(AbstractDocument.java:529) at org.netbeans.modules.options.indentation.FormattingPanelController$2.run(FormattingPanelController.java:197) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.jemmy.QueueTool$JemmyQueue.dispatchEvent(QueueTool.java:610) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) [catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
/net/vvv-qa.russia.sun.com/export/home/tester/dump/heapdump.hprof
Valera, does turning off line wrapping helps? As I understand test started to fail exactly after the first NB version with line wrapping on?
Yes. If I add such line into code: System.setProperty("org.netbeans.editor.linewrap", "false"); then OutOfMemoryError disappeares
Thanks for the dump. There's 19 NbEditorDocument instances, they are mostly <1K. There's 1,955,223 instances of ParagraphView and they are all created from a single ViewBuilder so the code if (doCreateViews) { // Create all new views while (createNextView()) { } } have endless-looped. I have reconstructed the document's text and I'll attempt to reproduce the problem so that I can fix it.
Created attachment 101640 [details] Document at time of endless loop
I would like to ask CND people if they could direct me to the test that fails? Thanks.
(In reply to comment #6) > I would like to ask CND people if they could direct me to the test that fails? > Thanks. Very very thanks, Miloslav Now I can reproduce bug. Scenario: - Start NetBeans with fresh user directory and with -J-da - Push Tools|Options - Select Editor > Formatting tab - Select C language - Select ANSI, Apache, ... styles - Select C++ language - Select ANSI, Apache, ... styles - Press OK button ==> OOM
I was unable to reproduce OOME however when running with assertions enabled an assertion in ViewBuilder triggered. I have found the problem and I expect to have a fix within 2 hours.
Integrated into 'main-golden', will be available in build *201008260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/12fdd8f7fa12 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #189681 - Automatic tests fails with OutOfMemoryError.
I launched automatic tests on 201008260001 build and tests finished without OOME. P.S. Also I see empty "Preview" text area for C/C++/Fortran language (before and after fix). Is it other or related bug?
I think that the preview bug is unrelated to this.
http://hg.netbeans.org/jet-main/rev/12fdd8f7fa12 transplanted into release610_m1: http://hg.netbeans.org/releases/rev/83347c556099
*** Bug 187330 has been marked as a duplicate of this bug. ***