Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with GrokProcessor/OpenJPEGProcessor #7

Open
donaldgray opened this issue May 24, 2023 · 1 comment
Open

Issue with GrokProcessor/OpenJPEGProcessor #7

donaldgray opened this issue May 24, 2023 · 1 comment

Comments

@donaldgray
Copy link
Member

Description

Due to issue #6 we tried to switch to using Grok or OpenJPEG processors. These processors handled all of the items liste in the linked ticket, however on a number of others we received a IndexOutOfBoundsException.

Sample breaking images:

  • b21525559_0065.jp2
  • b21525559_0165.jp2
  • b21525559_0265.jp2

This happens regardless of whether it is an image or info.json request

Error

 java.lang.IndexOutOfBoundsException: pos < flushedPos!
    at java.desktop/javax.imageio.stream.FileImageInputStream.seek(FileImageInputStream.java:143)
    at edu.illinois.library.cantaloupe.source.stream.BufferedImageInputStream.seek(BufferedImageInputStream.java:120)
    at java.desktop/javax.imageio.stream.ImageInputStreamImpl.skipBytes(ImageInputStreamImpl.java:759)
    at edu.illinois.library.cantaloupe.processor.codec.jpeg2000.JPEG2000MetadataReader.skipBox(JPEG2000MetadataReader.java:316)
    at edu.illinois.library.cantaloupe.processor.codec.jpeg2000.JPEG2000MetadataReader.readBox(JPEG2000MetadataReader.java:310)
    at edu.illinois.library.cantaloupe.processor.codec.jpeg2000.JPEG2000MetadataReader.readData(JPEG2000MetadataReader.java:282)
    at edu.illinois.library.cantaloupe.processor.codec.jpeg2000.JPEG2000MetadataReader.getEXIF(JPEG2000MetadataReader.java:174)
    at edu.illinois.library.cantaloupe.processor.OpenJpegProcessor.readInfo(OpenJpegProcessor.java:424)
    at edu.illinois.library.cantaloupe.cache.InfoService.readInfo(InfoService.java:220)
    at edu.illinois.library.cantaloupe.cache.InfoService.getOrReadInfo(InfoService.java:153)
    at edu.illinois.library.cantaloupe.cache.CacheFacade.getOrReadInfo(CacheFacade.java:67)
    at edu.illinois.library.cantaloupe.resource.AbstractRequestHandler.getOrReadInfo(AbstractRequestHandler.java:39)
    at edu.illinois.library.cantaloupe.resource.ImageRequestHandler.handle(ImageRequestHandler.java:378)
    at edu.illinois.library.cantaloupe.resource.iiif.v2.ImageResource.doGET(ImageResource.java:128)
    at edu.illinois.library.cantaloupe.resource.HandlerServlet.handle(HandlerServlet.java:97)
    at edu.illinois.library.cantaloupe.resource.HandlerServlet.doGet(HandlerServlet.java:35)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
    at org.eclipse.jetty.server.Server.handle(Server.java:516)
    at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
    at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
    at java.base/java.lang.Thread.run(Thread.java:829)

Next Steps

We need to identify:

We need to identify:

  • Is this an issue with Grok or OpenJPEG?
    • Something to do with how we are building?
    • Specific versions only?
  • Or Cantaloupes use of Grok/OpenJPEG?
    • Seems more likely as the same error is seen in both instances.
@donaldgray
Copy link
Member Author

Still seeing issues with Grok 12.0.3 and OpenJPEG 2.5.2 but Kakadu 8.4.1 can process these okay.

OpenJPEG error:

"Unsupported color conversion request"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant