ICEfaces
  1. ICEfaces
  2. ICE-8991

ace:list - JSONException error thrown when double clicking list items

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.GA
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      When quickly double clicking on the list item links to move them from one side to the other, a JSONException: JSONArray[0] is not a number error is sometimes thrown.

      The following JavaScript error is also seen in the console which may not be directly related: TypeError: elem.parentNode is null (Firefox). TypeError: Cannot read property 'firstChild' of null (Chrome). Syntax Error (IE)
      1. Case11966Example.zip
        19 kB
        Arran Mccullough
      2. Case11966ExampleWAR.zip
        9.34 MB
        Arran Mccullough
      3. JSONException-stacktrace.txt
        4 kB
        Arran Mccullough

        Activity

        Hide
        Nils Lundquist added a comment -

        Resolved pending confirmation from QA / Support.

        Show
        Nils Lundquist added a comment - Resolved pending confirmation from QA / Support.
        Hide
        Arran Mccullough added a comment -

        Tested the latest fixes but I can still reproduce the JSONException and NoRowAvailableException errors in the various browsers. Is there a way to better handle these errors instead of crashing the app?

        Firefox/IE9:

        Caused by: javax.faces.model.NoRowAvailableException
        at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:149)
        at org.icefaces.impl.component.UISeriesBase.getRowData(UISeriesBase.java:109)
        at org.icefaces.ace.component.list.ListDecoder.processDeselections(ListDecoder.java:81)
        at org.icefaces.ace.component.list.ListRenderer.decode(ListRenderer.java:74)
        at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:793)
        at org.icefaces.impl.component.UISeriesBase.processDecodes(UISeriesBase.java:521)
        at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:508)
        at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
        at org.icefaces.impl.component.UISeriesBase.visitTree(UISeriesBase.java:1039)
        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
        at javax.faces.component.UIForm.visitTree(UIForm.java:371)
        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
        at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:378)
        at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:253)
        at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
        at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:264)
        at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
        at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
        at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:264)
        at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:923)
        at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
        ... 22 more

        IE9 Compat/Chrome:

        Caused by: org.icefaces.ace.json.JSONException: JSONArray[0] is not a number.
        at org.icefaces.ace.json.JSONArray.getDouble(JSONArray.java:308)
        at org.icefaces.ace.json.JSONArray.getInt(JSONArray.java:325)
        at org.icefaces.ace.component.list.ListDecoder.processSelections(ListDecoder.java:49)
        at org.icefaces.ace.component.list.ListRenderer.decode(ListRenderer.java:74)
        ... 42 more

        Show
        Arran Mccullough added a comment - Tested the latest fixes but I can still reproduce the JSONException and NoRowAvailableException errors in the various browsers. Is there a way to better handle these errors instead of crashing the app? Firefox/IE9: Caused by: javax.faces.model.NoRowAvailableException at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:149) at org.icefaces.impl.component.UISeriesBase.getRowData(UISeriesBase.java:109) at org.icefaces.ace.component.list.ListDecoder.processDeselections(ListDecoder.java:81) at org.icefaces.ace.component.list.ListRenderer.decode(ListRenderer.java:74) at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:793) at org.icefaces.impl.component.UISeriesBase.processDecodes(UISeriesBase.java:521) at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:508) at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) at org.icefaces.impl.component.UISeriesBase.visitTree(UISeriesBase.java:1039) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at javax.faces.component.UIForm.visitTree(UIForm.java:371) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:378) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:253) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183) at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:264) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183) at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:264) at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:923) at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) ... 22 more IE9 Compat/Chrome: Caused by: org.icefaces.ace.json.JSONException: JSONArray [0] is not a number. at org.icefaces.ace.json.JSONArray.getDouble(JSONArray.java:308) at org.icefaces.ace.json.JSONArray.getInt(JSONArray.java:325) at org.icefaces.ace.component.list.ListDecoder.processSelections(ListDecoder.java:49) at org.icefaces.ace.component.list.ListRenderer.decode(ListRenderer.java:74) ... 42 more
        Hide
        Nils Lundquist added a comment -

        The fact there are two different stack traces here means there are likely two different problems being caused by this case. Could be different types of erroneous data state being written by the JS depending on the browser.

        There is no way to handle this because the cause is a variety of invalid data being sent to server by overloaded component JS. It's hard to know if the changes are valid or not until an error occurs.

        I need a way to reliably reproduce the issue so work backward from the invalid state produced to some technique to prevent it from ever occurring. This issue is deprioritized at the moment due to the overhead of reproducing it.

        Show
        Nils Lundquist added a comment - The fact there are two different stack traces here means there are likely two different problems being caused by this case. Could be different types of erroneous data state being written by the JS depending on the browser. There is no way to handle this because the cause is a variety of invalid data being sent to server by overloaded component JS. It's hard to know if the changes are valid or not until an error occurs. I need a way to reliably reproduce the issue so work backward from the invalid state produced to some technique to prevent it from ever occurring. This issue is deprioritized at the moment due to the overhead of reproducing it.
        Hide
        Nils Lundquist added a comment -

        Can only reproduce this on IE9 in a VM, apparently on a fast computer the issue cannot be reproduced.

        Show
        Nils Lundquist added a comment - Can only reproduce this on IE9 in a VM, apparently on a fast computer the issue cannot be reproduced.
        Hide
        Nils Lundquist added a comment -

        Revision #35121
        Committed by nils.lundquist
        15 minutes ago
        ICE-9115 - Implemented ace:list double click delays that prevent race conditions in rapid unrelenting double click cases. Delays indetectable when clicking like a human being.

        Show
        Nils Lundquist added a comment - Revision #35121 Committed by nils.lundquist 15 minutes ago ICE-9115 - Implemented ace:list double click delays that prevent race conditions in rapid unrelenting double click cases. Delays indetectable when clicking like a human being.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: