Fop
  1. Fop
  2. FOP-1695

NullPointerException related to white-space handling in retrieved markers

    Details

    • Type: Bug Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: fo/unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      47710

      Description

      If a fo:marker only contains inline-content, this may produce 'dangling'
      references to the inlines that are never released, and can lead to a
      NullPointerException in some cases.

      See attached, minimized FO, for an example.

      1. whitespace-issue2.fo
        2 kB
        Andreas L. Delmelle
      2. marker_white-space.patch
        5 kB
        Andreas L. Delmelle

        Activity

        Hide
        Andreas L. Delmelle added a comment -

        Attachment whitespace-issue2.fo has been added with description: FO file reproducing the issue

        Show
        Andreas L. Delmelle added a comment - Attachment whitespace-issue2.fo has been added with description: FO file reproducing the issue
        Hide
        Andreas L. Delmelle added a comment -

        The patch in attach fixes the problem by resetting the XMLWhiteSpaceHandler every time a new page-sequence starts. (Note: doing this at the end of the page-sequence does not help, because marker white-space handling is performed in between the start- and endPageSequence events)

        Show
        Andreas L. Delmelle added a comment - The patch in attach fixes the problem by resetting the XMLWhiteSpaceHandler every time a new page-sequence starts. (Note: doing this at the end of the page-sequence does not help, because marker white-space handling is performed in between the start- and endPageSequence events)
        Hide
        Andreas L. Delmelle added a comment -

        Attachment marker_white-space.patch has been added with description: Proposed quick-fix

        Show
        Andreas L. Delmelle added a comment - Attachment marker_white-space.patch has been added with description: Proposed quick-fix
        Hide
        Andreas L. Delmelle added a comment -

        (In reply to comment #1)
        > (Note: doing this at the end of the
        > page-sequence does not help, because marker white-space handling is performed
        > in between the start- and endPageSequence events)

        Correction: of course, I actually mean 'between end- and startPageSequence' of two consecutive page-sequences. The endPageSequence event is triggered before the marker's white-space is handled, and currently, that leads to references being carried over.

        Technically, the cause is that white-space handling does not really 'continue' from the surrounding block, so the normal cleanup of the 'pending' inline is never triggered.

        Show
        Andreas L. Delmelle added a comment - (In reply to comment #1) > (Note: doing this at the end of the > page-sequence does not help, because marker white-space handling is performed > in between the start- and endPageSequence events) Correction: of course, I actually mean 'between end- and startPageSequence' of two consecutive page-sequences. The endPageSequence event is triggered before the marker's white-space is handled, and currently, that leads to references being carried over. Technically, the cause is that white-space handling does not really 'continue' from the surrounding block, so the normal cleanup of the 'pending' inline is never triggered.
        Hide
        Andreas L. Delmelle added a comment -

        Quick fix committed in r806361.

        I'm inclined to leave this bug open for the moment, as this is not really the cleanest way to solve it. The real issue may ultimately still cause incorrect preservation of trailing white-space in such markers. Likely to be hardly noticeable, but still...

        Show
        Andreas L. Delmelle added a comment - Quick fix committed in r806361. I'm inclined to leave this bug open for the moment, as this is not really the cleanest way to solve it. The real issue may ultimately still cause incorrect preservation of trailing white-space in such markers. Likely to be hardly noticeable, but still...
        Hide
        Glenn Adams added a comment -

        resetting P2 open bugs to P3 pending further review

        Show
        Glenn Adams added a comment - resetting P2 open bugs to P3 pending further review

          People

          • Assignee:
            Unassigned
            Reporter:
            Andreas L. Delmelle
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development