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 244960 - OutOfMemoryError: GC overhead limit exceeded
Summary: OutOfMemoryError: GC overhead limit exceeded
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-09 14:25 UTC by khtank18
Modified: 2015-09-11 01:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 210175


Attachments
stacktrace (1.04 KB, text/plain)
2014-06-09 14:26 UTC, khtank18
Details

Note You need to log in before you can comment on or make changes to this bug.
Description khtank18 2014-06-09 14:25:59 UTC
Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.60-b09, Java(TM) SE Runtime Environment, 1.7.0_60-b19
OS: Windows 8

User Comments:
khtank18: I was trying to add the button using the ctr+ down arrow button but  instead of moving , but it started to copy multiple times. leading to this problem.




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at java.lang.Class.getField(Class.java:1579)
   at com.sun.jna.Native.getLibraryOptions(Native.java:445)
   at com.sun.jna.Native.getStructureAlignment(Native.java:511)
   at com.sun.jna.Structure.setAlignType(Structure.java:237)
   at com.sun.jna.Structure.<init>(Structure.java:185)
   at com.sun.jna.Structure.<init>(Structure.java:181)
Comment 1 khtank18 2014-06-09 14:26:01 UTC
Created attachment 147620 [details]
stacktrace
Comment 2 Jaroslav Havlin 2014-06-23 08:08:34 UTC
Retained size of instances of o.n.m.form.RADVisualComponent is 778 MB.

Reassigning to guibuilder/Code. Please evaluate it. Thank you.
Comment 3 Tomas Pavek 2015-09-10 13:35:36 UTC
Ctrl + arrow key duplicates the selected components in given direction. I've found out that when being held for some time, the repeated key events are delivered so quickly that the selected components may be duplicated several times before the GUI builder processes the update events in the designer (invoked later).

So for example if the selected component is duplicated twice before the designer is updated then on the designer update the two new duplicates are selected. Now with the next processed key two components are being duplicated. If again there are more key events in the queue already, the duplication happens twice or more times with the two components and so on the next update there will be 4 or more new components selected. So just by holding Ctrl + arrow the number of duplicated components quickly grows exponentially and the IDE hangs and runs out of memory.

I've made a fix that prevents to run another duplication when the previous one has not updated the designer yet.

http://hg.netbeans.org/jet-main/rev/7a2479b96dc9
Comment 4 Quality Engineering 2015-09-11 01:23:36 UTC
Integrated into 'main-silver', will be available in build *201509110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7a2479b96dc9
User: Tomas Pavek <tpavek@netbeans.org>
Log: #244960: prevent exponential multiplying of selection/duplication when Ctrl+arrow key is held continually