Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 5.1.2
-
Fix Version/s: 6.0.1
-
Component/s: Core/Rendering
-
Labels:None
-
Environment:JPedal JBIG2
-
Support Case References:Support Case #13561 - https://icesoft.my.salesforce.com/5007000001Py55r
-
Workaround Exists:Yes
-
Workaround Description:Use the levigo JBIG2 image library
Description
With the provided PDF file the following exception is thrown and the image is rendered incorrectly:
WARNING: Problem loading JBIG2 image:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.icepdf.core.pobjects.ImageUtility.jbig2Decode(ImageUtility.java:727)
at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:635)
at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:348)
at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:291)
at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:98)
at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:39)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at org.jpedal.jbig2.io.StreamReader.readByte(StreamReader.java:93)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.handleSegmentNumber(JBIG2StreamDecoder.java:506)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegmentHeader(JBIG2StreamDecoder.java:472)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegments(JBIG2StreamDecoder.java:225)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.decodeJBIG2(JBIG2StreamDecoder.java:134)
at org.jpedal.jbig2.JBIG2Decoder.decodeJBIG2(JBIG2Decoder.java:148)
... 14 more
Using the Levigo library on the classpath doesn't have this issue.
WARNING: Problem loading JBIG2 image:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.icepdf.core.pobjects.ImageUtility.jbig2Decode(ImageUtility.java:727)
at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:635)
at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:348)
at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:291)
at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:98)
at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:39)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at org.jpedal.jbig2.io.StreamReader.readByte(StreamReader.java:93)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.handleSegmentNumber(JBIG2StreamDecoder.java:506)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegmentHeader(JBIG2StreamDecoder.java:472)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegments(JBIG2StreamDecoder.java:225)
at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.decodeJBIG2(JBIG2StreamDecoder.java:134)
at org.jpedal.jbig2.JBIG2Decoder.decodeJBIG2(JBIG2Decoder.java:148)
... 14 more
Using the Levigo library on the classpath doesn't have this issue.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
PRO version loads this file correctly.