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.

Bug 246702 - OOME due to SOFE in org.jdesktop.application invoked by QuiteEditorPane
Summary: OOME due to SOFE in org.jdesktop.application invoked by QuiteEditorPane
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-26 11:59 UTC by stayprime
Modified: 2015-02-05 10:21 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205790


Attachments
stacktrace (2.64 KB, text/plain)
2014-08-26 11:59 UTC, stayprime
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stayprime 2014-08-26 11:59:13 UTC
Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.51-b03, Java(TM) SE Runtime Environment, 1.7.0_51-b13
OS: Windows 7

User Comments:
GUEST: ?

GUEST: Same as last time

GUEST: Working for 4 hours - must be memory leak

GUEST: Editing JPanel Source

GUEST: writing code, this appears to happen when the IDE draws the red line around the suggested variable when auto completing a method by using the tab key.

GUEST: Netbeans became unresponsive (froze) for several minutes after typing code in the editor;
this happened after more than an hour coding; did not happen again after 
restarting the ide and continued editing.

GUEST: Selecting and copying text with keyboard causes heap to run out of space - happens every time.

GUEST: Copying text

GUEST: attempting to select line to copy

GUEST: Se bloquea y se ve que el uso de CPU es excesivo.

stayprime: Running out of memory..

GUEST: copying

GUEST: Editing files




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2367)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
   at java.lang.StringBuffer.append(StringBuffer.java:237)
   at java.io.StringWriter.write(StringWriter.java:112)
Comment 1 stayprime 2014-08-26 11:59:15 UTC
Created attachment 148901 [details]
stacktrace
Comment 2 Jaroslav Tulach 2014-10-16 08:36:59 UTC
Evaluating 
http://statistics.netbeans.org/exceptions/exception.do?id=735709
as it has a funny description: When i have copying this string "\" to java app, app goes slow and uses 90% of CPU all the time.

5.5M of stacktraces occupies 243M of memory - this is probably caused by uihandler and also core.startup.logging.NbFormatter
trying to dump all the errors that are happening in AWT event thread.

There is a really deep stack trace in AWT thread. Looks like an infinite recursion in 

org.jdesktop.application.ApplicationAction.actionPerformed(:698)
org.jdesktop.application.TextActions.invokeTextAction(TextActions.java:172)     org.jdesktop.application.TextActions.paste(TextActions.java:211)
sun.reflect.GeneratedMethodAccessor316.invoke(<unknown string>)
org.jdesktop.application.ApplicationAction.noProxyActionPerformed(:662)        

who's using org.jdesktop inside of NetBeans!? It should be gone for a long time! I've managed to find an instance of QuiteEditorPane (on stack) that is source for ~1000 ActionEvents. Passing to editor guys to investigate why that happens.

I've also modified the NbFormatter to limit its recursion to 10 nested exceptions: https://hg.netbeans.org/ergonomics/rev/3a91904c59f4 Possibly Martin wants to do something similar in uihandler.
Comment 3 Jaroslav Tulach 2014-10-16 08:38:55 UTC
One idea for the reporter: Does your problem occur also when you remove

net.java.dev.nbmodules.copypastehistory/3

module? If it does, please close this bug and report it to the module owner.
Comment 4 Martin Entlicher 2014-10-16 09:44:58 UTC
Thanks Jarda for notifying me about long nested recursions in uihandler. I've already fixed that few days ago in issue #246731.
Comment 5 Quality Engineering 2014-10-29 11:44:01 UTC
Integrated into 'main-silver', will be available in build *201410290913* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3a91904c59f4
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: In response to #246702 limit the number of nested exception by ten