[
https://issues.apache.org/jira/browse/IMAGING-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306699#comment-16306699
]
Bruno P. Kinoshita commented on IMAGING-202:
--------------------------------------------
Added a breakpoint after the line which I believe should trigger the error
(attached screen shot), but could not reproduce it. Not sure if the code
changed before or after the issue was reported, but at least from trying to
find the code affected from reading the exception stack trace, I could not find
a way to trigger the issue.
There's also the question on whether the image is valid or not. It could be
something that we could change in the default behaviour of the parser, to give
a warning instead of throwing an exception, but first we would need to properly
reproduce the issue.
It was really helpful to have the stack trace and the test image, but now we
would need some sample code. Feel free to re-open it in case the issue
persists, and if it's possible to share some code for a
[SSCCE|http://sscce.org/].
Thanks
Bruno
> java.io.IOException: Could not read block
> -----------------------------------------
>
> Key: IMAGING-202
> URL: https://issues.apache.org/jira/browse/IMAGING-202
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: JPEG, Format: TIFF
> Affects Versions: 1.0
> Reporter: Srijan Bhatnagar
> Priority: Critical
> Attachments:
> breakpoint-after-line-supposed-to-trigger-issue-i-think.png
>
>
> Some images could not be read with imaging. The following exception appears -
> {code}
> java.io.IOException: Could not read block (block start: 1024, block length:
> 211680000, data length: 108598491).
> at
> org.apache.commons.imaging.common.bytesource.ByteSourceInputStream.getBlock(ByteSourceInputStream.java:216)
> at
> org.apache.commons.imaging.formats.tiff.TiffReader.getTiffRawImageData(TiffReader.java:447)
> at
> org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:224)
> at
> org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:122)
> at
> org.apache.commons.imaging.formats.tiff.TiffReader.readDirectories(TiffReader.java:115)
> at
> org.apache.commons.imaging.formats.tiff.TiffReader.read(TiffReader.java:427)
> at
> org.apache.commons.imaging.formats.tiff.TiffReader.readContents(TiffReader.java:419)
> at
> org.apache.commons.imaging.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:123)
> at
> org.apache.commons.imaging.ImageParser.getMetadata(ImageParser.java:144)
> at
> com.day.cq.dam.commons.handler.StandardImageHandler.extractMetadata(StandardImageHandler.java:385)
> at
> com.day.cq.dam.commons.handler.StandardImageHandler.extractMetadata(StandardImageHandler.java:201)
> at
> com.day.cq.dam.core.process.MetadataExtractor.extractMetadata(MetadataExtractor.java:82)
> at
> com.day.cq.dam.core.process.MetadataProcessorProcess.execute(MetadataProcessorProcess.java:121)
> at
> com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
> at
> com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:189)
> at
> com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:244)
> at
> org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:500)
> at
> org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)
> at
> org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)
> at
> org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> {code}
> The zipped TIF file can be downloaded from -
> https://files.acrobat.com/a/preview/9ac91668-221f-479a-a45b-c5f685b9c021
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)