ICEpdf
  1. ICEpdf
  2. PDF-782

Intermittent empty buffer paint while painting page.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.6_P01
    • Fix Version/s: 5.0.7
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      any

      Description

      For some time now we have had an intermittent buffer creation issue with the PageViewComponentImpl. When the issue occurs the page is rendered white with no content. Change the the zoom will cause the page to refresh and be painted.

        Activity

        Hide
        Patrick Corless added a comment -

        This has taken a considerable amount of time to narrow down but basically there is a race condition in the main dirty timer action event where a page can be flagged to stop painting before the painter thread has been started. The result is a painter thread that will stop before it begins to paint.

        I've reworked two main pieces of functionality. The first is around the page state being dirty, dirty is defined as either the zoom or rotation has changed or the clipping bounds have changed. The dirty check is now made on the AWT paintComponent() call. This helps avoid the race condition int the timer action event. The timer action event is no only used for start page initialization and page painting.

        The major rework was the removal of a Timer object for each page component instance. Each page component now adds an instance of the DirtyTimerAction to a static timer. Under the covers the Timer object uses the same thread across all instances so this more of a clean up exercise but it should help minimize some over head of having all the timer instances.

        The random white buffer paint seems to be significantly reduced. Further work on this issue may have to be done in the future if we get a more easily to reproduce test case.

        Show
        Patrick Corless added a comment - This has taken a considerable amount of time to narrow down but basically there is a race condition in the main dirty timer action event where a page can be flagged to stop painting before the painter thread has been started. The result is a painter thread that will stop before it begins to paint. I've reworked two main pieces of functionality. The first is around the page state being dirty, dirty is defined as either the zoom or rotation has changed or the clipping bounds have changed. The dirty check is now made on the AWT paintComponent() call. This helps avoid the race condition int the timer action event. The timer action event is no only used for start page initialization and page painting. The major rework was the removal of a Timer object for each page component instance. Each page component now adds an instance of the DirtyTimerAction to a static timer. Under the covers the Timer object uses the same thread across all instances so this more of a clean up exercise but it should help minimize some over head of having all the timer instances. The random white buffer paint seems to be significantly reduced. Further work on this issue may have to be done in the future if we get a more easily to reproduce test case.
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: