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
        Arran Mccullough added a comment -

        Support Case #11966

        Show
        Arran Mccullough added a comment - Support Case #11966
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • As fast as you can double click the list items to move them to the next list.
        • At this time the error may not be thrown but the JavaScript errors likely are.
        • It may take a few turns to get the error to appear.

        Note: This issue may also be reproduces with the showcase code. My test is using identical code.

        Show
        Arran Mccullough added a comment - Attached test case that shows issue. Steps: Load welcomeICEfaces.jsf As fast as you can double click the list items to move them to the next list. At this time the error may not be thrown but the JavaScript errors likely are. It may take a few turns to get the error to appear. Note: This issue may also be reproduces with the showcase code. My test is using identical code.
        Hide
        Nils Lundquist added a comment - - edited

        Can't be reproduced in the Showcase on OS X in Safari or FF (JS bugs or otherwise). Will reattempt using Windows, IE and the provided test case.

        I believe double click migrations are tested by QA under automation which should have reproduced any speed issues. There's some question to why this issue was not observed.

        Show
        Nils Lundquist added a comment - - edited Can't be reproduced in the Showcase on OS X in Safari or FF (JS bugs or otherwise). Will reattempt using Windows, IE and the provided test case. I believe double click migrations are tested by QA under automation which should have reproduced any speed issues. There's some question to why this issue was not observed.
        Hide
        Arran Mccullough added a comment -

        In my testing I noticed it could take 3 or 4 cycles of quickly moving the items back and forth. It also seemed to throw the error more so on moving the last item to the other list. Hopefully this helps in reproducing it.

        Show
        Arran Mccullough added a comment - In my testing I noticed it could take 3 or 4 cycles of quickly moving the items back and forth. It also seemed to throw the error more so on moving the last item to the other list. Hopefully this helps in reproducing it.
        Hide
        Nils Lundquist added a comment - - edited

        Unable to reproduce the issue using the test case in Safari or Chrome for OSX, nor IE9 or FF for Windows.

        Only reproducible in IE7 & 8 thus far.

        However- Javascript errors have not been raised during the testing of any case.

        Show
        Nils Lundquist added a comment - - edited Unable to reproduce the issue using the test case in Safari or Chrome for OSX, nor IE9 or FF for Windows. Only reproducible in IE7 & 8 thus far. However- Javascript errors have not been raised during the testing of any case.
        Hide
        Nils Lundquist added a comment -

        The error specific to IE7/8 do not appear related to the speed with which double clicking occurs.

        It should be verified that this is the only issue, as it differs notably from the description- there is no cross browser component nor JS errors.

        Show
        Nils Lundquist added a comment - The error specific to IE7/8 do not appear related to the speed with which double clicking occurs. It should be verified that this is the only issue, as it differs notably from the description- there is no cross browser component nor JS errors.
        Hide
        Nils Lundquist added a comment -

        Revision #33982
        Committed by nils.lundquist
        Moments ago
        ICE-8991 - Hide element being migrated via double click to prevent continuous clicking from causing further events.

        Show
        Nils Lundquist added a comment - Revision #33982 Committed by nils.lundquist Moments ago ICE-8991 - Hide element being migrated via double click to prevent continuous clicking from causing further events.
        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: