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.
NB 6.0 M2 w/Profiler M2 running on JDK5u8. I am not sure if this is a bug or not. The attached heap snapshot file demonstrates the problem: 1. Open the heap snapshot. 2. In the Classes window use the filter to locate the ProductionModel class. 3. Right-click it and choose Show in Instances View. 4. Select instance #1. 5. Over in the Fields window there is an entry for [] values. Click the plus sign icon next to it. This resulted in an OutOfMemoryError, even though the IDE was running with -Xmx512m. Note that the source for ProductionModel looks like: public class ProductionModel { private final static int size = 25; private byte[] values = new byte[size*1024*1024]; /** Creates a new instance of ProductionModel */ public ProductionModel() { } } So even with a 512mb heap, the heap walker was unable to expand the 25mb byte array. Is that a known limitation?
Created attachment 33082 [details] sample heap snapshot
Yes, we know about this problem. The same happens when you have dump with 1000000 instances of same class. It is current limitation, which Jirka plans to fix.
The problem is that HeapWalker tries to display 26214400 items of the array - for each item a TreeNode has to be created. OutOfMemoryError is quite expectable for such case. This will be solved soon by showing only first N items of the array and collapsing the others as described in Issue 82051.
Fixed in trunk.