Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-3063

Tika parser / POI crash with IndexOutOfBoundsException error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.23
    • Fix Version/s: 1.24
    • Component/s: parser
    • Labels:
      None
    • Environment:

      Windows 10 / java 1.8 / tika-app-1.23.jar

      Description

      Exception duing parsing caused by an IndexOutOfBoundsException error in module poi.poifs.

      This was not happenig with tika 19, the previous version i used.

      A test file that causes the crash is attached.

      Regards

      Complete stack trace :

      Exception in thread "main" java.io.IOException:
      at org.apache.tika.parser.ParsingReader.read(ParsingReader.java:277)
      at java.io.Reader.read(Unknown Source)
      at doxi.test.TikaFileParser.main(TikaFileParser.java:42)
      Caused by: org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.microsoft.OfficeParser@5520942a
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:282)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
      at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
      at org.apache.tika.parser.ParsingReader$ParsingTask.run(ParsingReader.java:236)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IndexOutOfBoundsException: Block 40394 not found
      at org.apache.poi.poifs.filesystem.POIFSFileSystem.getBlockAt(POIFSFileSystem.java:429)
      at org.apache.poi.poifs.filesystem.POIFSFileSystem.readBAT(POIFSFileSystem.java:399)
      at org.apache.poi.poifs.filesystem.POIFSFileSystem.readCoreContents(POIFSFileSystem.java:373)
      at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:232)
      at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:170)
      at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:121)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
      ... 4 more
      Caused by: java.lang.IndexOutOfBoundsException: Position 20682240 past the end of the file
      at org.apache.poi.poifs.nio.FileBackedDataSource.read(FileBackedDataSource.java:84)
      at org.apache.poi.poifs.filesystem.POIFSFileSystem.getBlockAt(POIFSFileSystem.java:427)
      ... 10 more

        Attachments

        1. test.doc
          16.83 MB
          Junior Dussouillez
        2. tika_23_POI_issue.doc
          22.65 MB
          MRIT64
        3. tika-maven-dependency.zip
          14.90 MB
          Junior Dussouillez

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mrit64 MRIT64
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: