You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2018/05/24 17:55:00 UTC

[jira] [Resolved] (PDFBOX-4230) NullpointerException in CmapSubtable

     [ https://issues.apache.org/jira/browse/PDFBOX-4230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-4230.
-------------------------------------
       Resolution: Fixed
         Assignee: Tilman Hausherr
    Fix Version/s: 3.0.0 PDFBox
                   2.0.10

Thanks for reporting! Snapshot at
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.10-SNAPSHOT/

> NullpointerException in CmapSubtable
> ------------------------------------
>
>                 Key: PDFBOX-4230
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4230
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 2.0.9
>            Reporter: Edi Weissmann
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.10, 3.0.0 PDFBox
>
>
> I'm seeing a *NullpointerException* in *CmapSubtable.java* at line *601*
> {{java.lang.NullPointerException at org.apache.fontbox.ttf.CmapSubtable.getGlyphId(CmapSubtable.java:601)}}
>  
> The cause seems to be that the *characterCodeToGlyphId* is not initialised by all code paths.
>  
> The suggested fix would be to simply initialise the variable on declaration (line 48)
> {{private Map<Integer, Integer> characterCodeToGlyphId *= new HashMap<Integer, Integer>()*;}}
>  
> Successfully tested this above suggested solution with a local build. 
> Sorry, cannot share the PDF doc causing this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org