java.lang.NullPointerException

Atlassian JIRA | pWestrich | 3 years ago
  1. 0

    The PDF preview can't render certain PDFs and will display only blank, white pages. The problem occurred with scanned documents which where saved with JBIG2 image compression (the default for Acrobat 5.0 and newer). This is the resulting stack trace: {code} Error reading image com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode at com.sun.pdfview.decode.PDFDecoder.decodeStream(PDFDecoder.java:114) at com.sun.pdfview.PDFObject.decodeStream(PDFObject.java:344) at com.sun.pdfview.PDFObject.getStream(PDFObject.java:276) at com.sun.pdfview.PDFObject.getStream(PDFObject.java:270) at com.sun.pdfview.PDFImage.getImage(PDFImage.java:224) at com.sun.pdfview.PDFRenderer.drawImage(PDFRenderer.java:284) at com.sun.pdfview.PDFImageCmd.execute(PDFPage.java:643) at com.sun.pdfview.PDFRenderer.iterate(PDFRenderer.java:583) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:100) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27) at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) java.lang.NullPointerException at com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171) at com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270) at com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130) at com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308) at com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155) at com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115) at com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274) at com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269) at com.sun.pdfview.PDFParser.iterate(PDFParser.java:745) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263) at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197) at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27) at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} Saving the file with CCITT Group 4 compression (see screenshot) will serve as workaround, i.e. the preview will be able to render the image, but the parser still outputs an (different) error: {code} java.lang.NullPointerException at com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171) at com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270) at com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130) at com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308) at com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155) at com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115) at com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274) at com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269) at com.sun.pdfview.PDFParser.iterate(PDFParser.java:745) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263) at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197) at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27) at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code}

    Atlassian JIRA | 3 years ago | pWestrich
    java.lang.NullPointerException
  2. 0

    The PDF preview can't render certain PDFs and will display only blank, white pages. The problem occurred with scanned documents which where saved with JBIG2 image compression (the default for Acrobat 5.0 and newer). This is the resulting stack trace: {code} Error reading image com.sun.pdfview.PDFParseException: Unknown coding method:JBIG2Decode at com.sun.pdfview.decode.PDFDecoder.decodeStream(PDFDecoder.java:114) at com.sun.pdfview.PDFObject.decodeStream(PDFObject.java:344) at com.sun.pdfview.PDFObject.getStream(PDFObject.java:276) at com.sun.pdfview.PDFObject.getStream(PDFObject.java:270) at com.sun.pdfview.PDFImage.getImage(PDFImage.java:224) at com.sun.pdfview.PDFRenderer.drawImage(PDFRenderer.java:284) at com.sun.pdfview.PDFImageCmd.execute(PDFPage.java:643) at com.sun.pdfview.PDFRenderer.iterate(PDFRenderer.java:583) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:100) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27) at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) java.lang.NullPointerException at com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171) at com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270) at com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130) at com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308) at com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155) at com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115) at com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274) at com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269) at com.sun.pdfview.PDFParser.iterate(PDFParser.java:745) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263) at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197) at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27) at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} Saving the file with CCITT Group 4 compression (see screenshot) will serve as workaround, i.e. the preview will be able to render the image, but the parser still outputs an (different) error: {code} java.lang.NullPointerException at com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171) at com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270) at com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130) at com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308) at com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155) at com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115) at com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274) at com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269) at com.sun.pdfview.PDFParser.iterate(PDFParser.java:745) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263) at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197) at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86) at com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27) at com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code}

    Atlassian JIRA | 3 years ago | pWestrich
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.sun.pdfview.font.TTFFont.getOutline()
    2. PDF Renderer
      PDFFile.getPage
      1. com.sun.pdfview.font.TTFFont.getOutline(TTFFont.java:171)
      2. com.sun.pdfview.font.CIDFontType2.getOutline(CIDFontType2.java:270)
      3. com.sun.pdfview.font.OutlineFont.getGlyph(OutlineFont.java:130)
      4. com.sun.pdfview.font.PDFFont.getCachedGlyph(PDFFont.java:308)
      5. com.sun.pdfview.font.PDFFontEncoding.getGlyphFromCMap(PDFFontEncoding.java:155)
      6. com.sun.pdfview.font.PDFFontEncoding.getGlyphs(PDFFontEncoding.java:115)
      7. com.sun.pdfview.font.PDFFont.getGlyphs(PDFFont.java:274)
      8. com.sun.pdfview.PDFTextFormat.doText(PDFTextFormat.java:269)
      9. com.sun.pdfview.PDFParser.iterate(PDFParser.java:745)
      10. com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
      11. com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:263)
      12. com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:197)
      13. com.sun.pdfview.PDFFile.getPage(PDFFile.java:1546)
      13 frames
    3. com.benryan.conversion
      AbstractSlideConversionTask.call
      1. com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:86)
      2. com.benryan.conversion.PdfSlideConversionBatchTask.convertFile(PdfSlideConversionBatchTask.java:27)
      3. com.benryan.conversion.AbstractSlideConversionTask.call(AbstractSlideConversionTask.java:44)
      3 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      5. java.lang.Thread.run(Thread.java:662)
      5 frames