Skip to content

Comments in odt headers/footers cause crash #3695

@caspear

Description

@caspear

This issue is unique.

  • I have used the search tool and did not find an issue describing my bug.

Operating System of DocumentServer

Docker

Version information

9.4.0.1

Expected Behavior

Document opens.
It is a valid .odt document, so I expect it to open.
9.3 also crashes, but with a different error, TypeError: e.E0a is not a function during deserialization.

Actual Behavior

The document renders completely blank. The browser console shows:

TypeError: comment.IsSolved is not a function
    at ParagraphHighlightDrawState.getComment (sdk-all.js:483454)
    at ParagraphHighlightDrawState.removeComment (sdk-all.js:483446)
    at ParaComment.Draw_HighLights (sdk-all.js:483338)
    at CHeaderFooter.Draw (sdk-all.js:...)

The crash occurs during the draw phase of CHeaderFooter.Draw when iterating comments in the header/footer. getComment calls comment.IsSolved() without first checking whether the method exists on the comment object, causing an unhandled exception that aborts rendering of all subsequent content.

Reproduction Steps

  1. Use LibreOffice to create an ODT document that contains a comment in the header or the footer of a page.
  2. Open the document in OO

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions