ICEfaces
  1. ICEfaces
  2. ICE-3052

Multiple custom charts on same page are duplicated

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When multiple custom charts are displayed on the page randomly they will be duplicated. For example, we have three charts, chartA, chartB, and chartC. When the charts are updated by the renderOnSubmit attribute sometimes chartA will be displayed where chartB is and also be displayed where chartA is supposed to be shown. In some cases chartB is show where chartB should be and where chartC is. This occurs in a random order and is not predictable. The src path for the rendered img tag is the same when this issue occurs. Attached is a test case and screen shots that show the issue occurring. This issue does not occur using 1.6.2 and is only seen in 1.7.0 jars.

        Activity

        Arran McCullough created issue -
        Arran McCullough made changes -
        Field Original Value New Value
        Summary Multiple custom charts Multiple custom charts on same page are duplicated
        Affects Version/s 1.7 [ 10080 ]
        Description When multiple custom charts are displayed on the page randomly they will be duplicated. For example, we have three charts, chartA, chartB, and chartC. When the charts are updated by the renderOnSubmit attribute sometimes chartA will be displayed where chartB is and also be displayed where chartA is supposed to be shown. In some cases chartB is show where chartB should be and where chartC is. This occurs in a random order and is not predictable. The src path for the rendered img tag is the same when this issue occurs. Attached is a test case and screen shots that show the issue occurring. When multiple custom charts are displayed on the page randomly they will be duplicated. For example, we have three charts, chartA, chartB, and chartC. When the charts are updated by the renderOnSubmit attribute sometimes chartA will be displayed where chartB is and also be displayed where chartA is supposed to be shown. In some cases chartB is show where chartB should be and where chartC is. This occurs in a random order and is not predictable. The src path for the rendered img tag is the same when this issue occurs. Attached is a test case and screen shots that show the issue occurring. This issue does not occur using 1.6.2 and is only seen in 1.7.0 jars.
        Support Customer Ref. #s https://www.icesoft.ca:4443/supportilla/show_bug.cgi?id=4805
        Hide
        Arran McCullough added a comment -

        Shows the charts displayed in the proper order with different src paths

        Show
        Arran McCullough added a comment - Shows the charts displayed in the proper order with different src paths
        Arran McCullough made changes -
        Attachment beforeTest2.JPG [ 10959 ]
        Hide
        Arran McCullough added a comment -

        Shows the second chart duplicated in the spot where the third chart should be. Also shows the duplicate src path for both charts.

        Show
        Arran McCullough added a comment - Shows the second chart duplicated in the spot where the third chart should be. Also shows the duplicate src path for both charts.
        Arran McCullough made changes -
        Attachment afterTest2.JPG [ 10960 ]
        Hide
        Arran McCullough added a comment -

        NetBeans developed test case used to duplicate the reported issue.

        Show
        Arran McCullough added a comment - NetBeans developed test case used to duplicate the reported issue.
        Arran McCullough made changes -
        Attachment Bug4805Example.zip [ 10961 ]
        Ken Fyten made changes -
        Fix Version/s 1.7.1 [ 10122 ]
        Assignee Priority P2
        Assignee Adnan Durrani [ adnan.durrani ]
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Adnan Durrani added a comment -

        I have tested the attached test case with the trunk, and not able to reproduce the problem. Sam can you please verify it?

        Show
        Adnan Durrani added a comment - I have tested the attached test case with the trunk, and not able to reproduce the problem. Sam can you please verify it?
        Adnan Durrani made changes -
        Assignee Adnan Durrani [ adnan.durrani ] Sam Xiao [ sam.xiao ]
        Hide
        Mandeep Hayher added a comment -

        Problem reproducible with the attached application.

        Show
        Mandeep Hayher added a comment - Problem reproducible with the attached application.
        Ken Fyten made changes -
        Assignee Priority P2 P1
        Assignee Sam Xiao [ sam.xiao ] Adnan Durrani [ adnan.durrani ]
        Hide
        Adnan Durrani added a comment -

        perhaps the latest 1.7.1 code resolves the issue.

        Show
        Adnan Durrani added a comment - perhaps the latest 1.7.1 code resolves the issue.
        Adnan Durrani made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]
        Hide
        Ken Fyten added a comment -

        Please try to reproduce this issue, Arran claims he can consistently, if necessary go see Arran.

        Show
        Ken Fyten added a comment - Please try to reproduce this issue, Arran claims he can consistently, if necessary go see Arran.
        Ken Fyten made changes -
        Resolution Cannot Reproduce [ 5 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Priority P1 P3
        Assignee Adnan Durrani [ adnan.durrani ] Yip Ng [ yip.ng ]
        Ken Fyten made changes -
        Fix Version/s 1.7.2 [ 10130 ]
        Fix Version/s 1.7.1 [ 10122 ]
        made changes -
        Attachment screenshot-1.jpg [ 11188 ]
        Hide
        yip.ng added a comment -

        Can't reproduce problem, no matter how many times I reload the page or press the reset button. See screenshot-1.

        Show
        yip.ng added a comment - Can't reproduce problem, no matter how many times I reload the page or press the reset button. See screenshot-1.
        Hide
        yip.ng added a comment -

        With the exact same war file, the problem occurs on Arran's machine but not mine. We have the same versions of JDK and Tomcat. The only thing different is the OS. Strange!

        Show
        yip.ng added a comment - With the exact same war file, the problem occurs on Arran's machine but not mine. We have the same versions of JDK and Tomcat. The only thing different is the OS. Strange!
        Hide
        yip.ng added a comment -

        I think the problem is in com.icesoft.faces.component.outputchart.ChartResource#calculateDigest. It is using System.currentTimeMillis() to try to generate a unique number. The resource registry must be using this number to generate the resource name. The problem is that System.currentTimeMillis() can potentially generate duplicate numbers if the machine system time doesn't have enough granularity. Need to find another way to generate a unique number.

        Show
        yip.ng added a comment - I think the problem is in com.icesoft.faces.component.outputchart.ChartResource#calculateDigest. It is using System.currentTimeMillis() to try to generate a unique number. The resource registry must be using this number to generate the resource name. The problem is that System.currentTimeMillis() can potentially generate duplicate numbers if the machine system time doesn't have enough granularity. Need to find another way to generate a unique number.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17444 Tue Aug 26 13:14:50 MDT 2008 yip.ng ICE-3052
        Changed to make sure that the generated digest is unique.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/outputchart/ChartResource.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17445 Tue Aug 26 13:35:02 MDT 2008 yip.ng ICE-3052
        Changed to make sure that the generated digest is unique.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/outputchart/ChartResource.java
        Hide
        yip.ng added a comment -

        Here is what the Java API doc has to say about currentTimeMillis():

        Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.

        Show
        yip.ng added a comment - Here is what the Java API doc has to say about currentTimeMillis(): Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.
        yip.ng made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.7.2RC1 [ 10140 ]
        Fix Version/s 1.7.2 [ 10130 ]
        Ken Fyten made changes -
        Fix Version/s 1.7.2 [ 10130 ]
        Fix Version/s 1.7.2RC1 [ 10140 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P3
        Assignee Yip Ng [ yip.ng ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Arran McCullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: