Split by page number : error in FontUtils

Bug #1781130 reported by draco
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pdfsam (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

During execution of split task by page number, the progress bar hangs at the first part of pages.

Logs are showing error with the FontUtils class :

INFO [07:32:34]: Starting PDFsam
INFO [07:32:34]: Configuring Sejda 3.2.38
INFO [07:32:35]: Démarré en 1 second
INFO [07:33:12]: Document numérisé.pdf loaded
INFO [07:33:56]: Starting task (org.sejda.impl.sambox.SplitByPageNumbersTask@6f62ad6f) execution.
WARN [07:33:57]: New fonts found, font cache will be re-built
WARN [07:33:57]: Building on-disk font cache, this may take a while
ERROR [07:33:57]: Unexpected error
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
at org.apache.fontbox.type1.Type1Lexer.readToken(Type1Lexer.java:184)
at org.apache.fontbox.type1.Type1Lexer.<init>(Type1Lexer.java:64)
at org.apache.fontbox.type1.Type1Parser.parseASCII(Type1Parser.java:86)
at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:61)
at org.apache.fontbox.type1.Type1Font.createWithPFB(Type1Font.java:56)
at org.sejda.sambox.pdmodel.font.FileSystemFontProvider.addType1Font(FileSystemFontProvider.java:606)
at org.sejda.sambox.pdmodel.font.FileSystemFontProvider.scanFonts(FileSystemFontProvider.java:255)
at org.sejda.sambox.pdmodel.font.FileSystemFontProvider.<init>(FileSystemFontProvider.java:227)
at org.sejda.sambox.pdmodel.font.FontMapperImpl$DefaultFontProvider.<clinit>(FontMapperImpl.java:123)
at org.sejda.sambox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:142)
at org.sejda.sambox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:394)
at org.sejda.sambox.pdmodel.font.FontMapperImpl.findFontBoxFont(FontMapperImpl.java:357)
at org.sejda.sambox.pdmodel.font.FontMapperImpl.getFontBoxFont(FontMapperImpl.java:334)
at org.sejda.sambox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:140)
at org.sejda.sambox.pdmodel.font.PDType1Font.<clinit>(PDType1Font.java:82)
at org.sejda.impl.sambox.util.FontUtils.<clinit>(FontUtils.java:74)
at org.sejda.impl.sambox.component.PDDocumentHandler.close(PDDocumentHandler.java:231)
at org.sejda.common.ComponentsUtility.nullSafeClose(ComponentsUtility.java:63)
at org.sejda.common.ComponentsUtility.nullSafeCloseQuietly(ComponentsUtility.java:49)
at org.sejda.impl.sambox.component.PagesExtractor.close(PagesExtractor.java:157)
at org.sejda.impl.sambox.component.PagesExtractor.reset(PagesExtractor.java:170)
at org.sejda.impl.sambox.component.split.AbstractPdfSplitter.split(AbstractPdfSplitter.java:100)
at org.sejda.impl.sambox.SplitByPageNumbersTask.execute(SplitByPageNumbersTask.java:76)
at org.sejda.impl.sambox.SplitByPageNumbersTask.execute(SplitByPageNumbersTask.java:45)
at org.sejda.core.service.DefaultTaskExecutionService.actualExecution(DefaultTaskExecutionService.java:148)
at org.sejda.core.service.DefaultTaskExecutionService.execute(DefaultTaskExecutionService.java:71)
at org.sejda.core.service.DefaultTaskExecutionService.execute(DefaultTaskExecutionService.java:58)
at org.pdfsam.task.TaskExecutionController.lambda$request$0(TaskExecutionController.java:87)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.lang.NoClassDefFoundError: Could not initialize class org.sejda.impl.sambox.util.FontUtils
at org.sejda.impl.sambox.component.PDDocumentHandler.close(PDDocumentHandler.java:231)
at org.sejda.common.ComponentsUtility.nullSafeClose(ComponentsUtility.java:63)
at org.sejda.common.ComponentsUtility.nullSafeCloseQuietly(ComponentsUtility.java:49)
at org.sejda.impl.sambox.component.PagesExtractor.close(PagesExtractor.java:157)
at org.sejda.impl.sambox.component.split.AbstractPdfSplitter.split(AbstractPdfSplitter.java:105)
... 9 common frames omitted

NOTE : I have set java alternative to java8 in order to launch PDFSam in ubuntu 18.04 bionic

$ uname -a
Linux draco-laptop 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ LANG=C lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic

$ LANG=C apt policy pdfsam
pdfsam:
  Installed: 3.3.5-1
  Candidate: 3.3.5-1
  Version table:
 *** 3.3.5-1 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status

$ LANG=C sudo apt update
Hit:1 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Ign:2 http://dell.archive.canonical.com/updates bionic-dell-service InRelease
Hit:3 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://ppa.launchpad.net/ubuntubudgie/backports/ubuntu bionic InRelease
Ign:5 http://dell.archive.canonical.com/updates bionic-dell InRelease
Hit:6 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:7 http://dell.archive.canonical.com/updates bionic-dell-service Release
Hit:8 http://dell.archive.canonical.com/updates bionic-dell Release
Hit:9 http://archive.canonical.com/ubuntu bionic InRelease
Hit:10 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

$ LANG=C java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

$ LANG=C update-alternatives --query java
Name: java
Link: /usr/bin/java
Slaves:
 java.1.gz /usr/share/man/man1/java.1.gz
Status: manual
Best: /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Value: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

Alternative: /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Priority: 1101
Slaves:
 java.1.gz /usr/lib/jvm/java-11-openjdk-amd64/man/man1/java.1.gz

Alternative: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Priority: 1081
Slaves:
 java.1.gz /usr/lib/jvm/java-8-openjdk-amd64/jre/man/man1/java.1.gz

Tags: bionic
tags: added: bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pdfsam (Ubuntu):
status: New → Confirmed
Revision history for this message
Anthony PERRIN (anthony-perrin54) wrote :

Hello,
Same problem with ubuntu 18.04 and oracle java 8, open-jdk8, open-jdk11 ...

Best regards,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.