pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-1774) StackOverflowError; Preflight->Font
Date Tue, 03 Jun 2014 09:22:01 GMT

    [ https://issues.apache.org/jira/browse/PDFBOX-1774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14016345#comment-14016345
] 

Tilman Hausherr commented on PDFBOX-1774:
-----------------------------------------

The stack trace has changed:
{code}
Exception in thread "main" java.lang.NullPointerException
	at org.apache.pdfbox.pdmodel.font.PDType0Font.getFontWidth(PDType0Font.java:146)
	at org.apache.pdfbox.preflight.font.container.FontContainer.checkGlyphWith(FontContainer.java:114)
	at org.apache.pdfbox.preflight.content.ContentStreamWrapper.validText(ContentStreamWrapper.java:374)
	at org.apache.pdfbox.preflight.content.ContentStreamWrapper.validStringArray(ContentStreamWrapper.java:298)
	at org.apache.pdfbox.preflight.content.ContentStreamWrapper.validStringArray(ContentStreamWrapper.java:294)
	at org.apache.pdfbox.preflight.content.ContentStreamWrapper.checkShowTextOperators(ContentStreamWrapper.java:210)
	at org.apache.pdfbox.preflight.content.ContentStreamWrapper.processOperator(ContentStreamWrapper.java:182)
	at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:254)
	at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:221)
	at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:203)
	at org.apache.pdfbox.preflight.content.ContentStreamWrapper.validPageContentStream(ContentStreamWrapper.java:76)
	at org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess.validateContent(SinglePageValidationProcess.java:180)
	at org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess.validate(SinglePageValidationProcess.java:88)
	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:52)
	at org.apache.pdfbox.preflight.process.PageTreeValidationProcess.validatePage(PageTreeValidationProcess.java:58)
	at org.apache.pdfbox.preflight.process.PageTreeValidationProcess.validate(PageTreeValidationProcess.java:47)
	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:88)
	at org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:169)
	at testpreflight.TestPreflight.main(TestPreflight.java:47)
{code}


> StackOverflowError; Preflight->Font
> -----------------------------------
>
>                 Key: PDFBOX-1774
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1774
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Preflight
>    Affects Versions: 2.0.0
>         Environment: JDK6
>            Reporter: William Palmer
>
> StackOverflowError when using this code:
> 			PreflightParser parser = new PreflightParser(pFile);
> 			parser.parse();
> 			PreflightDocument document = parser.getPreflightDocument();
> 			document.validate();
> With this file: http://digitalcorpora.org/corp/nps/files/govdocs1/659/659756.pdf
> Stack trace:
> Exception in thread "main" java.lang.StackOverflowError
> 	at java.net.URLClassLoader$2.run(URLClassLoader.java:385)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findResource(URLClassLoader.java:382)
> 	at java.lang.ClassLoader.getResource(ClassLoader.java:1002)
> 	at java.lang.ClassLoader.getResource(ClassLoader.java:997)
> 	at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192)
> 	at org.apache.pdfbox.util.ResourceLoader.loadResource(ResourceLoader.java:60)
> 	at org.apache.pdfbox.pdmodel.font.PDSimpleFont.determineEncoding(PDSimpleFont.java:314)
> 	at org.apache.pdfbox.pdmodel.font.PDFont.<init>(PDFont.java:123)
> 	at org.apache.pdfbox.pdmodel.font.PDSimpleFont.<init>(PDSimpleFont.java:73)
> 	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:102)
> 	at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:100)
> 	at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:204)
> 	at org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess.validateFonts(ResourcesValidationProcess.java:91)
> 	at org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess.validate(ResourcesValidationProcess.java:74)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:52)
> 	at org.apache.pdfbox.preflight.xobject.XObjFormValidator.validateXObjectResources(XObjFormValidator.java:178)
> 	at org.apache.pdfbox.preflight.xobject.XObjFormValidator.validate(XObjFormValidator.java:75)
> 	at org.apache.pdfbox.preflight.process.reflect.GraphicObjectPageValidationProcess.validate(GraphicObjectPageValidationProcess.java:77)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:52)
> 	at org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess.validateXObjects(ResourcesValidationProcess.java:191)
> 	at org.apache.pdfbox.preflight.process.reflect.ResourcesValidationProcess.validate(ResourcesValidationProcess.java:78)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:52)
> 	at org.apache.pdfbox.preflight.xobject.XObjFormValidator.validateXObjectResources(XObjFormValidator.java:178)
> 	at org.apache.pdfbox.preflight.xobject.XObjFormValidator.validate(XObjFormValidator.java:75)
> 	at org.apache.pdfbox.preflight.process.reflect.GraphicObjectPageValidationProcess.validate(GraphicObjectPageValidationProcess.java:77)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message