Community
Participate
Working Groups
3.1 Debug to a breakpoint and expand variables to make a recursive data structure visible. Terminate program and re-launch to the same breakpoint. The variables viewer will begin to infinitely expand the variables tree as it attempts to restore the expansion state of the viewer. Example program. Set a breakpoint on the first line of the main method. Step thru a few lines, expand variables & terminate. Re-launch to the same breakpoint to see the problem. package a.b.c; import java.util.ArrayList; public class RecursiveVars { /** * @param args */ public static void main(String[] args) { ArrayList list = new ArrayList(); list.add(list); list.add("one"); list.add("two"); list.add("three"); System.out.println(list); } }
Marking as 3.1.1 candidate
Created attachment 24703 [details] patch This is another case where we're broken because the tree viewer assumes that an item will not be placed into a tree in more than one place. This time we try to expand "foo", and the wrong "foo" gets expanded. Patch hacks the variables viewer to prevent this. It's an ugly work around though. Will investigate better solutions (including fixing the tree) before releasing any changes.
Problem is that we call TreeViewer.expandToLevel(object, level) and object exists in the tree in many places. The tree viewer keeps finding the wrong one which triggers the retrieval of more children (loop).
Created attachment 25299 [details] refinement Please take a look at the following patch. It modifies the fix by avoiding the creation of new arrays. As well, the top level loop to iterate thru segments is not required, as it is a top down traversal.
looks good to me
Released fix to 3.1.1
Released to HEAD
*** Bug 122991 has been marked as a duplicate of this bug. ***