ICEpdf
  1. ICEpdf
  2. PDF-1239

Form initialization issue after interrupt exception

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 6.3.1
    • Labels:
      None
    • Environment:
      any

      Description

      A client has provided a test case were they are seeing an issue with the first page of PDF not rendering on the initial load.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52341 Tue Mar 06 07:28:16 MST 2018 patrick.corless creation of NISC tag for application of PDF-1239 patch.
        Files Changed
        Commit graph ADD /icepdf/tags/icepdf-6.2.5_NISC-1239_1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52340 Mon Mar 05 14:33:11 MST 2018 patrick.corless PDF-1239 pack port of patch from trunk to NISC branch.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/annotations/Annotation.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52339 Mon Mar 05 14:30:56 MST 2018 patrick.corless PDF-1239 pack port of patch from trunk to NISC branch.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/graphics/SoftMask.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52338 Mon Mar 05 14:27:03 MST 2018 patrick.corless PDF-1239 pack port of patch from trunk to NISC branch.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/annotations/TextWidgetAnnotation.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/annotations/ChoiceWidgetAnnotation.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/annotations/FreeTextAnnotation.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/util/content/AbstractContentParser.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/annotations/AppearanceState.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/graphics/SoftMask.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/annotations/Annotation.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.5_NISC/icepdf/core/src/org/icepdf/core/pobjects/Form.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52337 Mon Mar 05 13:52:13 MST 2018 patrick.corless creating development branch fore NISC patch for PDF-1239
        Files Changed
        Commit graph ADD /icepdf/branches/icepdf-6.2.5_NISC
        Ken Fyten made changes -
        Attachment NewEmailMarkup.html [ 22847 ]
        Ken Fyten made changes -
        Attachment NewEmailExample.pdf [ 22846 ]
        Ken Fyten made changes -
        Comment [ Attaching a new Email format/styling template.

        This has been tested on various email clients successfully (Outlook, various webmails, iOS Mail, Android gmail/mail apps, mac mail, etc.).

        * NewEmailExample.pdf - Shows an example of the rendered email with sample data.

        * NewEmailMarkup.html - Contains the new template with pseudo-coded variable placeholders where the notification data is to be inserted.
        ]
        Ken Fyten made changes -
        Attachment NewEmailExample.pdf [ 22846 ]
        Attachment NewEmailMarkup.html [ 22847 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52334 Tue Feb 27 12:45:45 MST 2018 patrick.corless PDF-1239 further work to correctly bubble up the interrupt exception so
        the page state can be correctly reset.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/util/content/AbstractContentParser.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/annotations/AppearanceState.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/Form.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/annotations/TextWidgetAnnotation.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/annotations/Annotation.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/annotations/ChoiceWidgetAnnotation.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/annotations/FreeTextAnnotation.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/graphics/SoftMask.java
        Hide
        Patrick Corless added a comment -

        I had to take another look at this one as I managed to see the problem again. The second issue seems to be related to the style of the PDF encoder with a do->... Our current code won't correctly pass the interrupt exception up the 'do' stack we end up with a page state that isn't correctly initialized.

        Show
        Patrick Corless added a comment - I had to take another look at this one as I managed to see the problem again. The second issue seems to be related to the style of the PDF encoder with a do->... Our current code won't correctly pass the interrupt exception up the 'do' stack we end up with a page state that isn't correctly initialized.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 6.3.1 [ 13113 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52333 Mon Feb 26 13:48:36 MST 2018 patrick.corless PDF-1239 fixed an initialization bug with an interrupted form initialization.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/Form.java
        Hide
        Patrick Corless added a comment -

        The test case is pretty specific, if they set a page fit mode then they see the black page, otherwise they do not. I can reproduce the problem only but only after putting a few debugger breaks on the AWT thread.

        I'm pretty sure that it's possible that a a page initialization can be interrupted as various view settings are applied during the commonDocumentLoading() method call. There are various property change event that are fired during the document loading and with finer logging turned on an interrupt exception boils up from the the Form class. When the Form interrupt exception is thrown we don't mark the page as not initialized and on the next initialization request we have an empty Form object that won't paint anything. In PDF in question this results in no content being draw as there is a root form object that spans the rest.

        I remember seeing something similar in the past but couldn't narrow it down. This test case seems to highlight the initialization issue.

        Show
        Patrick Corless added a comment - The test case is pretty specific, if they set a page fit mode then they see the black page, otherwise they do not. I can reproduce the problem only but only after putting a few debugger breaks on the AWT thread. I'm pretty sure that it's possible that a a page initialization can be interrupted as various view settings are applied during the commonDocumentLoading() method call. There are various property change event that are fired during the document loading and with finer logging turned on an interrupt exception boils up from the the Form class. When the Form interrupt exception is thrown we don't mark the page as not initialized and on the next initialization request we have an empty Form object that won't paint anything. In PDF in question this results in no content being draw as there is a root form object that spans the rest. I remember seeing something similar in the past but couldn't narrow it down. This test case seems to highlight the initialization issue.
        Patrick Corless created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: