Bug 160956 - OutOfMemoryError: Requested array size exceeds VM limit
OutOfMemoryError: Requested array size exceeds VM limit
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Debugger
6.x
All All
: P2 with 1 vote (vote)
: 6.x
Assigned To: rmatous
issues@php
:
: 159296 161056 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-23 21:46 UTC by charlie_smith
Modified: 2009-03-31 07:54 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Messages Log (34.28 KB, text/plain)
2009-03-23 21:47 UTC, charlie_smith
Details
suggested fix (732 bytes, text/plain)
2009-03-25 18:37 UTC, rmatous
Details
stacktrace (932 bytes, text/plain)
2009-03-26 14:38 UTC, Filip Zamboj
Details
stacktrace (932 bytes, text/plain)
2009-03-31 07:54 UTC, yudiset
Details

Note You need to log in before you can comment on or make changes to this bug.
Description charlie_smith 2009-03-23 21:46:21 UTC
When clicking the variables tab while debugging this error is received.
Comment 1 charlie_smith 2009-03-23 21:47:47 UTC
Created attachment 78694 [details]
Messages Log
Comment 2 rmatous 2009-03-24 21:52:20 UTC
*** Issue 161056 has been marked as a duplicate of this issue. ***
Comment 3 rmatous 2009-03-24 21:53:10 UTC
increasing to P2
Comment 4 rmatous 2009-03-24 22:08:24 UTC
*** Issue 159296 has been marked as a duplicate of this issue. ***
Comment 5 rmatous 2009-03-24 22:10:42 UTC
P2 or P1 will be evaluated and priority will be changed appropriately
Comment 6 Exceptions Reporter 2009-03-25 17:12:24 UTC
This issue has already 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=148126
Comment 7 rmatous 2009-03-25 18:37:52 UTC
Created attachment 78853 [details]
suggested fix
Comment 8 rmatous 2009-03-25 18:42:48 UTC
Deserves evaluation if  NestedTreeModelFilter.getChildrenCount is right? Please comment!
NestedTreeModelFilter:
        public int getChildrenCount(TreeModel original, Object node) throws UnknownTypeException {
            return Integer.MAX_VALUE; // [TODO]
        }


Called in this thread:
"Debugger Values Evaluator" daemon prio=1 tid=0x083ff9d8 nid=0xb65 runnable [0x808f7000..0x808f7dc0]
        at
org.netbeans.modules.debugger.ui.views.ViewModelListener$NestedTreeModelFilter.getChildrenCount(ViewModelListener.java:659)
        at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:714)
        at org.netbeans.modules.php.dbgp.models.VariablesModelFilter.getFilteredChildren(VariablesModelFilter.java:145)
        at org.netbeans.modules.php.dbgp.models.VariablesModelFilter.getChildrenCount(VariablesModelFilter.java:112)
        at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:714)
        at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildrenCount(Models.java:3158)
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.evaluateLazily(TreeModelNode.java:804)
        at org.netbeans.modules.viewmodel.TreeModelNode$LazyEvaluator.run(TreeModelNode.java:1253)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Comment 9 Filip Zamboj 2009-03-25 18:45:37 UTC
suggested fix by rmatous was checkes and appears to behave properly. 
Comment 10 Martin Entlicher 2009-03-26 10:46:11 UTC
FYI: The getChildrenCount() was fixed by Dan in http://hg.netbeans.org/main-silver?cmd=changeset;node=e0a9fb9f70da

Anyway, since many models have to do almost the same work in getChildren() and getChildrenCount(), we just return
Integer.MAX_VALUE in such models for performance reasons. There's no real use for getChildrenCount() yet.
Therefore it's always a good idea to work with Math.min(<my children count>, <requested children count>).
Comment 11 Filip Zamboj 2009-03-26 14:38:09 UTC
Build: NetBeans IDE Dev (Build 090326)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b02
OS: Linux, 2.6.27-11-generic, amd64

User Comments: 
Thrown when opening variables window in debugging session. 

Stacktrace: 
java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        at java.util.ArrayList.<init>(ArrayList.java:112)
        at org.netbeans.modules.php.dbgp.models.VariablesModelFilter.getFilteredChildren(VariablesModelFilter.java:146)
        at org.netbeans.modules.php.dbgp.models.VariablesModelFilter.getChildrenCount(VariablesModelFilter.java:112)
        at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:714)
        at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildrenCount(Models.java:3158)
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.evaluateLazily(TreeModelNode.java:804)
Comment 12 Filip Zamboj 2009-03-26 14:38:13 UTC
Created attachment 78908 [details]
stacktrace
Comment 13 rmatous 2009-03-26 14:40:26 UTC
Fixed in web-main:
http://hg.netbeans.org/web-main/rev/6c8ef9ceab89

Filip, this fix probably should be fixed also into M3 clone when its ready. Do you agree? 
Comment 14 rmatous 2009-03-27 13:24:48 UTC
Fixed into M3:
http://hg.netbeans.org/release67_m3/rev/f799b2cb28a3
Comment 15 Filip Zamboj 2009-03-30 11:57:08 UTC
this should and was fixed in 6.7 M3. issue verified 
Comment 16 yudiset 2009-03-31 07:54:04 UTC
Build: NetBeans IDE Dev (Build 200903250219)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        at java.util.ArrayList.<init>(ArrayList.java:112)
        at org.netbeans.modules.php.dbgp.models.VariablesModelFilter.getFilteredChildren(VariablesModelFilter.java:146)
        at org.netbeans.modules.php.dbgp.models.VariablesModelFilter.getChildrenCount(VariablesModelFilter.java:112)
        at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildrenCount(Models.java:714)
        at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildrenCount(Models.java:3158)
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.evaluateLazily(TreeModelNode.java:804)
Comment 17 yudiset 2009-03-31 07:54:09 UTC
Created attachment 79111 [details]
stacktrace


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo