ICEpdf
  1. ICEpdf
  2. PDF-669

NullPointerException at arraycopy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: Font Engine
    • Labels:
      None
    • Environment:
      All
    • Salesforce Case Reference:

      Description

      The following NPE is thrown when trying to render the provided PDF file:

      Oct 22, 2013 9:42:49 AM org.icepdf.core.pobjects.Resources getFont
      WARNING: Error initializing font.
      java.lang.NullPointerException
      at java.lang.System.arraycopy(Native Method)
      at org.icepdf.core.pobjects.fonts.nfont.b.f.read(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.b.f.read(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.b.f.readFully(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.i.readRaw(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.i.getTable(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.NFontTrueType.getCmap(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.NFontTrueType.deriveFont(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.Font.setEncoding(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.Font.init(Unknown Source)
      at org.icepdf.core.pobjects.Resources.getFont(Resources.java:150)
      at org.icepdf.core.util.content.AbstractContentParser.consume_Tf(AbstractContentParser.java:722)
      at org.icepdf.core.util.content.NContentParser.parseText(Unknown Source)
      at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
      at org.icepdf.core.pobjects.Form.init(Form.java:168)
      at org.icepdf.core.pobjects.annotations.Annotation.init(Annotation.java:720)
      at org.icepdf.core.pobjects.annotations.MarkupAnnotation.init(MarkupAnnotation.java:172)
      at org.icepdf.core.pobjects.annotations.FreeTextAnnotation.init(FreeTextAnnotation.java:249)
      at org.icepdf.core.pobjects.annotations.Annotation.buildAnnotation(Annotation.java:617)
      at org.icepdf.core.util.Parser.getObject(Parser.java:427)
      at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:73)
      at org.icepdf.core.util.Library.getObject(Library.java:156)
      at org.icepdf.core.pobjects.Page.initPageAnnotations(Page.java:286)
      at org.icepdf.core.pobjects.Page.init(Page.java:338)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1064)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)

        Activity

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000WiPusAAF
        Hide
        Patrick Corless added a comment -

        I've taken a high level look at this issue and the openType fonts in question have a null data source. I'll need to take closer look to verify if the embedded font is valid and go from there.

        For the time being, font substitution is kicking in after the exception and the PDF appears to be rendering correctly despite the noisy logs.

        Show
        Patrick Corless added a comment - I've taken a high level look at this issue and the openType fonts in question have a null data source. I'll need to take closer look to verify if the embedded font is valid and go from there. For the time being, font substitution is kicking in after the exception and the PDF appears to be rendering correctly despite the noisy logs.
        Patrick Corless made changes -
        Fix Version/s 5.0.5 [ 11373 ]
        Hide
        Patrick Corless added a comment -

        Lowering the logging level to be little less verbose when encountering at found loading issue. By default only light warning message will appear. If logging is at "finner" then a full stack trace will be logged.

        Show
        Patrick Corless added a comment - Lowering the logging level to be little less verbose when encountering at found loading issue. By default only light warning message will appear. If logging is at "finner" then a full stack trace will be logged.
        Hide
        Patrick Corless added a comment -

        I'll take another look at this later to see if the font loading issue can be fixed.

        Show
        Patrick Corless added a comment - I'll take another look at this later to see if the font loading issue can be fixed.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38657 Wed Oct 23 11:21:16 MDT 2013 patrick.corless PDF-669 updated the font resource loading to be less verbose on default logging when encountering a font loadding issue. Full stack trace has been moved up to the log level finner.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Resources.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38658 Wed Oct 23 11:21:39 MDT 2013 patrick.corless PDF-669 updated the font resource loading to be less verbose on default logging when encountering a font loadding issue. Full stack trace has been moved up to the log level finner.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/Resources.java
        Patrick Corless made changes -
        Fix Version/s 5.1 [ 10675 ]
        Fix Version/s 5.0.5 [ 11373 ]
        Patrick Corless made changes -
        Affects Version/s 5.2 [ 10970 ]
        Affects Version/s 5.0.4 [ 11072 ]
        Patrick Corless made changes -
        Fix Version/s 5.2 [ 10970 ]
        Fix Version/s 5.1 [ 10675 ]
        Hide
        Patrick Corless added a comment -

        Marking as fixed, debug level has been lowered.

        Show
        Patrick Corless added a comment - Marking as fixed, debug level has been lowered.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Component/s Font Engine [ 10024 ]
        Component/s Core/Parsing [ 10022 ]
        Hide
        Patrick Corless added a comment -

        Marking as closed

        Show
        Patrick Corless added a comment - Marking as closed
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: