OpenXML: Crash with "add line separator as character"

Issue #647 resolved
Chase Tingley created an issue

Attached: testcase and filter config. The config is just the default with bPreferenceAddLineSeparatorAsCharacter enabled.

This will crash if you try to extract the file using the config. The stack looks like this:

java.lang.NullPointerException
    at net.sf.okapi.filters.openxml.RunMerger.append(RunMerger.java:390)
    at net.sf.okapi.filters.openxml.BlockParser.parse(BlockParser.java:164)
    at net.sf.okapi.filters.openxml.StyledTextPartHandler.process(StyledTextPartHandler.java:168)
    at net.sf.okapi.filters.openxml.StyledTextPartHandler.open(StyledTextPartHandler.java:147)
    at net.sf.okapi.filters.openxml.StyledTextPartHandler.open(StyledTextPartHandler.java:139)
    at net.sf.okapi.filters.openxml.OpenXMLFilter.nextInZipFile(OpenXMLFilter.java:482)

It appears this bug occurs whenever the option is enabled and we parse a block whose content begins with a newline.

Comments (3)

  1. Log in to comment