Created attachment 24149 [details] FO file reproducing the issue 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.
Created attachment 24150 [details] Proposed quick-fix 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)
(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.
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...
resetting P2 open bugs to P3 pending further review