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 226901 - OOM: css.visual.RuleHandle holds a css source model element (Rule)
Summary: OOM: css.visual.RuleHandle holds a css source model element (Rule)
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-01 16:03 UTC by Vladimir Riha
Modified: 2013-05-26 02:22 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199185


Attachments
stacktrace (1.61 KB, text/plain)
2013-03-01 16:03 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-03-01 16:03:04 UTC
Build: NetBeans IDE Dev (Build web-main-10006-on-20130301)
VM: Java HotSpot(TM) Client VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Linux

User Comments:
vriha: This is caused by using css inspection on php file in php project from remote server with upload on save feature. Basically I ran php file, turn inspection on, select some text and then started changing it's css property font-size using up/down button. After several (not a small number) changes, IDE became sluggish and OOM popped out.

I'm not sure how much is this issue or not with respect to real world usage, I just wanted to try it how it will behave,




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2367)
   at java.lang.StringCoding.safeTrim(StringCoding.java:89)
   at java.lang.StringCoding.decode(StringCoding.java:230)
   at java.lang.String.<init>(String.java:453)
   at java.lang.String.<init>(String.java:505)
   at org.netbeans.modules.extbrowser.plugins.ExternalBrowserPlugin$BrowserPluginHandler.read(ExternalBrowserPlugin.java:280)
Comment 1 Vladimir Riha 2013-03-01 16:03:06 UTC
Created attachment 132073 [details]
stacktrace
Comment 2 Tomas Mysik 2013-03-04 07:27:11 UTC
Davide, would you please like to have a look at the heap dump [1]? If not, feel free to reassign to me.

Thanks.
[1] http://statistics.netbeans.org/exceptions/heaplog?id=662123
Comment 3 David Konecny 2013-03-07 04:10:36 UTC
I must admit I have not analysed heap-dump for a very long time now so I might be completely wrong but it looks to me like many objects from css.model are hold in the memory. Passing there for the evaluation.
Comment 4 Vladimir Riha 2013-03-11 13:51:40 UTC
I don't think this need to be resolved for patch1, but I'd vote for the next patch if possible
Comment 5 Marek Fukala 2013-05-02 11:26:53 UTC
I think David is right, just from the glimpse at the heap dump I see that what's definitively wrong is that the RuleHandle holds instance or Rule which is an element of the css source model which should never be held outside of the model's run/write task. I'll start with fixing this issue and then we'll see if it helps a lot or not at all.
Comment 6 Marek Fukala 2013-05-24 14:52:58 UTC
hopefully fixed in web-main#7dbf0075d26e. Now the RuleHandle doesn't hold the rule itself but an ElementHandle.
Comment 7 Quality Engineering 2013-05-26 02:22:24 UTC
Integrated into 'main-golden', will be available in build *201305252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7dbf0075d26e
User: Marek Fukala <mfukala@netbeans.org>
Log: #226901 - OOM: css.visual.RuleHandle holds a css source model element (Rule)