ICEfaces
  1. ICEfaces
  2. ICE-8694

showcase - ace:tree dragDrop IndexOutOfBoundException

    Details

    • Assignee Priority:
      P1
    • Affects:
      Sample App./Tutorial

      Description

      In showcase - ace:tree - Drag/Drop page:
      if dragging and dropping nodes starting from the second node, so that each node becomes the child of an upper node (see attached screen shot), at one certain drag movement, a java.lang.IndexOutOfBoundsException is thrown in the tomcat log.

      24-Oct-2012 3:06:00 PM com.sun.faces.context.PartialViewContextImpl processPartial
      INFO: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
      java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      at java.util.ArrayList.get(ArrayList.java:322)
      at org.icefaces.samples.showcase.example.ace.tree.LocationNodeImpl.getChildAt(LocationNodeImpl.java:69)
      at org.icefaces.ace.model.tree.ListNodeDataModel.navToChild(ListNodeDataModel.java:111)
      at org.icefaces.ace.model.tree.ListNodeDataModel.navToKey(ListNodeDataModel.java:92)
      at org.icefaces.ace.model.tree.ListNodeDataModel.navToKey(ListNodeDataModel.java:8)
      at org.icefaces.ace.component.tree.Tree.setNodeToKey(Tree.java:159)
      at org.icefaces.ace.component.tree.Tree.setKey(Tree.java:127)
      at org.icefaces.ace.component.tree.TreeDecoder.decodeReordering(TreeDecoder.java:83)
      at org.icefaces.ace.component.tree.TreeDecoder.decode(TreeDecoder.java:70)
      at org.icefaces.ace.component.tree.TreeRenderer$1.<init>(TreeRenderer.java:63)
      at org.icefaces.ace.component.tree.TreeRenderer.decode(TreeRenderer.java:62)
      at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
      at org.icefaces.ace.component.tree.Tree.processDecodes(Tree.java:301)
      at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:506)
      at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
      at org.icefaces.ace.component.tree.Tree.visitTree(Tree.java:390)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
      at javax.faces.component.UIForm.visitTree(UIForm.java:344)

        Activity

        Hide
        Nils Lundquist added a comment - - edited

        This error would occur if the tree traversal logic had a bug or if the client side tree component had produced incorrect indexes due to a bug or race condition. Without a precise test case there is no way to determine the cause of this error.

        Show
        Nils Lundquist added a comment - - edited This error would occur if the tree traversal logic had a bug or if the client side tree component had produced incorrect indexes due to a bug or race condition. Without a precise test case there is no way to determine the cause of this error.
        Hide
        Ken Fyten added a comment - - edited

        I saw this once yesterday in Showcase myself, after I reloaded the page after playing with tree selections. Could not reproduce again this morning when I tried a similar action.

        Show
        Ken Fyten added a comment - - edited I saw this once yesterday in Showcase myself, after I reloaded the page after playing with tree selections. Could not reproduce again this morning when I tried a similar action.
        Hide
        Carmen Cristurean added a comment - - edited

        The steps from the description may not be complete; I am getting this exception once in a while when dragging /dropping nodes on this page, however could not identify the exact sequence of steps to reproduce it.
        I also got this exception in the ace:tree regression test application.

        Show
        Carmen Cristurean added a comment - - edited The steps from the description may not be complete; I am getting this exception once in a while when dragging /dropping nodes on this page, however could not identify the exact sequence of steps to reproduce it. I also got this exception in the ace:tree regression test application.
        Hide
        Nils Lundquist added a comment - - edited

        The JS drag logic has border case bugs that can cause stack traces of this sort by submitting incorrect indexes. However these bugs are very difficult to reproduce in the cases we've observered to the point of not being a concern to regular operation.
        Should anyone discover a test that reproduces these bugs with ease this issue should be reopened to profile the erroneous logic and see if there is a way we can avoid them.

        Show
        Nils Lundquist added a comment - - edited The JS drag logic has border case bugs that can cause stack traces of this sort by submitting incorrect indexes. However these bugs are very difficult to reproduce in the cases we've observered to the point of not being a concern to regular operation. Should anyone discover a test that reproduces these bugs with ease this issue should be reopened to profile the erroneous logic and see if there is a way we can avoid them.
        Hide
        Migration added a comment -

        I saw this once yesterday in Showcase myself, after I reloaded the page after playing with tree selections. Could not reproduce again this morning when I tried a similar action.

        Show
        Migration added a comment - I saw this once yesterday in Showcase myself, after I reloaded the page after playing with tree selections. Could not reproduce again this morning when I tried a similar action.
        Hide
        Liana Munroe added a comment - - edited

        We found consistent steps on how to reproduce this error. Because of this we have reopened this JIRA

        Icefaces3 trunk revision# 34972/35014/ ICEfaces 3.2
        Server:tomcat7
        Browser: FF3.6/20, GoogleChrome26

        Tree
        > Overview Page:
        Server Internal error popup and server side error when selecting a province and dragging the node to the right into the selection box. See attached screen shot.
        May 14, 2013 11:02:24 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
        WARNING: Index: 3, Size: 1
        java.lang.IndexOutOfBoundsException: Index: 3, Size: 1
        at java.util.ArrayList.add(ArrayList.java:367)
        at org.icefaces.ace.model.tree.ListNodeDataModel.insert(ListNodeDataModel.java:198)
        at org.icefaces.ace.model.tree.ListNodeDataModel.insert(ListNodeDataModel.java:24)
        at org.icefaces.ace.component.tree.Tree.insertNode(Tree.java:98)
        at org.icefaces.ace.component.tree.TreeDecoder.decodeReordering(TreeDecoder.java:86)
        at org.icefaces.ace.component.tree.TreeDecoder.decode(TreeDecoder.java:66)
        at org.icefaces.ace.component.tree.TreeRenderer$1.<init>(TreeRenderer.java:64)
        at org.icefaces.ace.component.tree.TreeRenderer.decode(TreeRenderer.java:63)
        at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:793)
        at org.icefaces.ace.component.tree.Tree.processDecodes(Tree.java:299)
        at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:504)
        at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
        This is a partial listing of the error.

        Show
        Liana Munroe added a comment - - edited We found consistent steps on how to reproduce this error. Because of this we have reopened this JIRA Icefaces3 trunk revision# 34972/35014/ ICEfaces 3.2 Server:tomcat7 Browser: FF3.6/20, GoogleChrome26 Tree > Overview Page: Server Internal error popup and server side error when selecting a province and dragging the node to the right into the selection box. See attached screen shot. May 14, 2013 11:02:24 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute WARNING: Index: 3, Size: 1 java.lang.IndexOutOfBoundsException: Index: 3, Size: 1 at java.util.ArrayList.add(ArrayList.java:367) at org.icefaces.ace.model.tree.ListNodeDataModel.insert(ListNodeDataModel.java:198) at org.icefaces.ace.model.tree.ListNodeDataModel.insert(ListNodeDataModel.java:24) at org.icefaces.ace.component.tree.Tree.insertNode(Tree.java:98) at org.icefaces.ace.component.tree.TreeDecoder.decodeReordering(TreeDecoder.java:86) at org.icefaces.ace.component.tree.TreeDecoder.decode(TreeDecoder.java:66) at org.icefaces.ace.component.tree.TreeRenderer$1.<init>(TreeRenderer.java:64) at org.icefaces.ace.component.tree.TreeRenderer.decode(TreeRenderer.java:63) at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:793) at org.icefaces.ace.component.tree.Tree.processDecodes(Tree.java:299) at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:504) at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) This is a partial listing of the error.
        Hide
        Ken Fyten added a comment -

        Just to augment the instructions above, for me, I saw this if I first did a successful Drag and Drop operation within the left-hand tree. Then tried to move a tree node to the right-hand list caused the error.

        Show
        Ken Fyten added a comment - Just to augment the instructions above, for me, I saw this if I first did a successful Drag and Drop operation within the left-hand tree. Then tried to move a tree node to the right-hand list caused the error.
        Hide
        Nils Lundquist added a comment -

        Revision #35534
        Committed by nils.lundquist
        4 minutes ago
        ICE-8694 - Use ui.item parent when we've confirmed that our reorder drop is within the same parent. the drop point referenced by 'this' is unreliable in this context, and ui.item parent is assured to have the correct 'new' drop parent.

        Show
        Nils Lundquist added a comment - Revision #35534 Committed by nils.lundquist 4 minutes ago ICE-8694 - Use ui.item parent when we've confirmed that our reorder drop is within the same parent. the drop point referenced by 'this' is unreliable in this context, and ui.item parent is assured to have the correct 'new' drop parent.
        Hide
        Carmen Cristurean added a comment -

        Verified with icefaces3/trunk revision# 35543 in Firefox21, Chrome26, IE8.

        Show
        Carmen Cristurean added a comment - Verified with icefaces3/trunk revision# 35543 in Firefox21, Chrome26, IE8.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: