Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in StreamBasedCMap.addRange #16

Open
mhitkax opened this issue Mar 25, 2019 · 0 comments
Open

NPE in StreamBasedCMap.addRange #16

mhitkax opened this issue Mar 25, 2019 · 0 comments

Comments

@mhitkax
Copy link

mhitkax commented Mar 25, 2019

We are using JPod 2.0 for extracting text from PDF files. This is working reasonably well, but recently we started encountering one specific error more and more:

de.intarsys.pdf.content.CSError: unexpected exception
    at de.intarsys.pdf.content.CSInterpreter.process(CSInterpreter.java:213) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSDeviceBasedInterpreter.process(CSDeviceBasedInterpreter.java:187) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSDeviceAdapter.doForm(CSDeviceAdapter.java:161) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSDeviceAdapter.doXObject(CSDeviceAdapter.java:202) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSDeviceBasedInterpreter.render_Do(CSDeviceBasedInterpreter.java:324) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSInterpreter.process(CSInterpreter.java:450) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSInterpreter.process(CSInterpreter.java:207) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSDeviceBasedInterpreter.process(CSDeviceBasedInterpreter.java:187) ~[jpod-2.0.jar:?]
    ...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
    at de.intarsys.pdf.font.StreamBasedCMap.addRange(StreamBasedCMap.java:124) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.font.StreamBasedCMap.do_endcodespacerange(StreamBasedCMap.java:336) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.font.StreamBasedCMap.initializeFromOperation(StreamBasedCMap.java:509) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.font.StreamBasedCMap.initializeFromContent(StreamBasedCMap.java:477) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.font.InternalCMap.initializeFromCos(InternalCMap.java:34) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.cos.COSBasedObject$MetaClass.createFromCos(COSBasedObject.java:96) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.font.PDFontType0.getCMap(PDFontType0.java:107) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.font.PDFontType0.getNextGlyphsEncoded(PDFontType0.java:183) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSBasicDevice.textShow(CSBasicDevice.java:471) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSDeviceBasedInterpreter.render_TJ(CSDeviceBasedInterpreter.java:752) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSInterpreter.process(CSInterpreter.java:236) ~[jpod-2.0.jar:?]
    at de.intarsys.pdf.content.CSInterpreter.process(CSInterpreter.java:207) ~[jpod-2.0.jar:?]
    ... 24 more

I cannot share the problematic documents, but we can test any potential fix with those documents. Any pointers on what might be the problem/fix would be highly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant