cantaloupe-project / cantaloupe

High-performance dynamic image server in Java
https://cantaloupe-project.github.io/
Other
266 stars 107 forks source link

Exception: java.lang.IndexOutOfBoundsException: off < 0 || len < 0 || off+len > b.length || off+len < 0! #665

Open anuroopkancherla opened 1 month ago

anuroopkancherla commented 1 month ago

VERSION= Cantaloupe 5.0.5

processor.selection_strategy = AutomaticSelectionStrategy

URL: /iiif/3/<>/info.json

We are using Cantaloupe 5.0.5 server version to process the images. We use AutomaticSelectionStrategy to process the jpg images and while processing some of the jpg images we are observing the java.lang.IndexOutOfBoundsException and the image is not rendering.

500 Internal Server Error

off < 0 || len < 0 || off+len > b.length || off+len < 0! (through reference chain: edu.illinois.library.cantaloupe.processor.codec.jpeg.JPEGMetadata["exif"])

com.fasterxml.jackson.databind.JsonMappingException: off < 0 || len < 0 || off+len > b.length || off+len < 0! (through reference chain: edu.illinois.library.cantaloupe.processor.codec.jpeg.JPEGMetadata["exif"]) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:397) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:356) at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:316) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:731) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:166) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319) at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:3024) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:388) at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1838) at edu.illinois.library.cantaloupe.image.InfoSerializer.serialize(InfoSerializer.java:56) at edu.illinois.library.cantaloupe.image.InfoSerializer.serialize(InfoSerializer.java:16) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319) at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1513) at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:1215) at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:1085) at edu.illinois.library.cantaloupe.image.Info.toJSON(Info.java:513) at edu.illinois.library.cantaloupe.processor.AbstractImageIOProcessor.readInfo(AbstractImageIOProcessor.java:104) 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.InformationRequestHandler.handle(InformationRequestHandler.java:287) at edu.illinois.library.cantaloupe.resource.iiif.v3.InformationResource.doGET(InformationResource.java:85) 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) Caused by: java.lang.IndexOutOfBoundsException: off < 0 || len < 0 || off+len > b.length || off+len < 0! at java.desktop/javax.imageio.stream.MemoryCacheImageInputStream.read(MemoryCacheImageInputStream.java:100) at edu.illinois.library.cantaloupe.image.exif.Reader.readBytes(Reader.java:159) at edu.illinois.library.cantaloupe.image.exif.Reader.read(Reader.java:145) at edu.illinois.library.cantaloupe.image.exif.Reader.read(Reader.java:97) at edu.illinois.library.cantaloupe.processor.codec.jpeg.JPEGMetadata.getEXIF(JPEGMetadata.java:51) at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:689) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:723) ... 51 more

Please help us to understand the problem and potential workaround to solve this exception and also want to understand if this issue is related to cantaloupe server.

Thank you !!!!

VonUniGE commented 1 month ago

The latest version of Cantaloupe is 5.0.6. Could you please provide a test case that reproduces this error using version 5.0.6?

DiegoPino commented 1 month ago

@anuroopkancherla could you please provide a sample JPEG so we can debug? thanks!

glenrobson commented 1 month ago

Note relates to #664

anuroopkancherla commented 1 month ago

@VonUniGE @DiegoPino As per your suggestions I have tried with 5.0.6 version as well, I am still seeing same issue.

Output Logs:

2024-07-03 12:24:32 Loading config file: /home/cantaloupe/cantaloupe.properties 2024-07-03 12:24:32 16:24:32.251 [main] INFO e.i.l.c.ApplicationContextListener - Ubuntu OpenJDK 64-Bit Server VM 11.0.23 / mixed mode, sharing 2024-07-03 12:24:32 16:24:32.254 [main] INFO e.i.l.c.ApplicationContextListener - 8 available processor cores 2024-07-03 12:24:32 16:24:32.254 [main] INFO e.i.l.c.ApplicationContextListener - Heap total: 196MB; max: 16384MB 2024-07-03 12:24:32 16:24:32.254 [main] INFO e.i.l.c.ApplicationContextListener - Java home: /usr/lib/jvm/java-11-openjdk-amd64 2024-07-03 12:24:32 16:24:32.254 [main] INFO e.i.l.c.ApplicationContextListener - Java library path: /usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib 2024-07-03 12:24:32 16:24:32.261 [main] INFO e.i.l.c.ApplicationContextListener - JSR-223 script engines: org.jruby.embed.jsr223.JRubyEngineFactory@23941fb4, jdk.nashorn.api.scripting.NashornScriptEngineFactory@7486b455 2024-07-03 12:24:32 16:24:32.262 [main] INFO e.i.l.c.ApplicationContextListener - Effective temp directory: /tmp 2024-07-03 12:24:32 16:24:32.262 [main] INFO e.i.l.c.ApplicationContextListener - ? Starting Cantaloupe 5.0.6 2024-07-03 12:24:32 16:24:32.529 [main] DEBUG e.i.l.c.i.FormatRegistry - Read 15 bundled formats: avi, bmp, flv, gif, jp2, jpg, mov, mp4, mpg, pdf, png, tif, webm, webp, xpm 2024-07-03 12:24:32 16:24:32.597 [main] DEBUG e.i.l.c.p.c.IIOProviderContextListener - Image I/O readers (not in preference order): 2024-07-03 12:24:32 Format.GIF: com.sun.imageio.plugins.gif.GIFImageReader 2024-07-03 12:24:32 Format.JPEG2000: com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader 2024-07-03 12:24:32 Format.PNG: com.sun.imageio.plugins.png.PNGImageReader 2024-07-03 12:24:32 Format.TIFF: it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader, com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader 2024-07-03 12:24:32 Format.JPEG: com.sun.imageio.plugins.jpeg.JPEGImageReader 2024-07-03 12:24:32 Format.BMP: com.sun.media.imageioimpl.plugins.bmp.BMPImageReader, com.sun.imageio.plugins.bmp.BMPImageReader 2024-07-03 12:24:32 Format.PDF: 2024-07-03 12:24:32 Format.XPM: 2024-07-03 12:24:32 Format.WebP: 2024-07-03 12:24:32 16:24:32.640 [main] DEBUG e.i.l.c.p.c.IIOProviderContextListener - Image I/O writers (not in preference order): 2024-07-03 12:24:32 Format.GIF: com.sun.media.imageioimpl.plugins.gif.GIFImageWriter, com.sun.imageio.plugins.gif.GIFImageWriter 2024-07-03 12:24:32 Format.JPEG2000: com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageWriter 2024-07-03 12:24:32 Format.PNG: com.sun.imageio.plugins.png.PNGImageWriter 2024-07-03 12:24:32 Format.TIFF: it.geosolutions.imageioimpl.plugins.tiff.TIFFImageWriter, com.sun.media.imageioimpl.plugins.tiff.TIFFImageWriter, com.sun.imageio.plugins.tiff.TIFFImageWriter 2024-07-03 12:24:32 Format.JPEG: com.sun.imageio.plugins.jpeg.JPEGImageWriter 2024-07-03 12:24:32 Format.BMP: com.sun.media.imageioimpl.plugins.bmp.BMPImageWriter, com.sun.imageio.plugins.bmp.BMPImageWriter 2024-07-03 12:24:32 Format.PDF: 2024-07-03 12:24:32 Format.XPM: 2024-07-03 12:24:32 Format.WebP: 2024-07-03 12:24:32 16:24:32.643 [main] INFO o.e.j.s.h.ContextHandler - Started o.e.j.s.ServletContextHandler@22fcf7ab{/,null,AVAILABLE} 2024-07-03 12:24:32 16:24:32.675 [main] INFO o.e.j.s.AbstractConnector - Started ServerConnector@6cd28fa7{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:8182} 2024-07-03 12:24:32 16:24:32.675 [main] INFO o.e.j.s.Server - Started @1041ms 2024-07-03 12:24:44 16:24:44.215 [qtp2089016471-18] INFO e.i.l.c.r.i.v.InformationResource - Handling GET /iiif/3/76064733-01-001.jpg/info.json 2024-07-03 12:24:44 16:24:44.218 [qtp2089016471-18] DEBUG e.i.l.c.r.i.v.InformationResource - Request headers: Cookie: _ga=GA1.1.475889717.1717215540; _ga_0VS4QBSPD8=GS1.1.1719506661.11.0.1719506661.0.0.0; Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7; Connection: keep-alive; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36; Sec-Fetch-Site: none; Sec-Fetch-Dest: document; Host: localhost:8182; Accept-Encoding: gzip, deflate, br, zstd; Sec-Fetch-Mode: navigate; sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"; sec-ch-ua-mobile: ?0; Cache-Control: max-age=0; Upgrade-Insecure-Requests: 1; sec-ch-ua-platform: "Windows"; Sec-Fetch-User: ?1; Accept-Language: en-US,en;q=0.9 2024-07-03 12:24:44 16:24:44.221 [qtp2089016471-18] DEBUG e.i.l.c.i.MetaIdentifier - [Raw path component: 76064733-01-001.jpg] -> [decoded: 76064733-01-001.jpg] -> [slashes substituted: 76064733-01-001.jpg] 2024-07-03 12:24:44 16:24:44.233 [qtp2089016471-18] INFO e.i.l.c.c.InfoCache - Max InfoCache capacity: 209715 (5% max heap / 4096-byte expected average info size) 2024-07-03 12:24:44 16:24:44.264 [qtp2089016471-18] TRACE e.i.l.c.c.CacheFactory - getDerivativeCache(): implementation changed; creating a new instance 2024-07-03 12:24:44 16:24:44.264 [qtp2089016471-18] TRACE e.i.l.c.c.CacheFactory - setDerivativeCache(): initializing the new instance 2024-07-03 12:24:44 16:24:44.699 [qtp2089016471-18] DEBUG s.a.a.a.c.AwsCredentialsProviderChain - Unable to load credentials from SystemPropertyCredentialsProvider(): Unable to load credentials from system settings. Access key must be specified either via environment variable (AWS_ACCESS_KEY_ID) or system property (aws.accessKeyId). 2024-07-03 12:24:44 software.amazon.awssdk.core.exception.SdkClientException: Unable to load credentials from system settings. Access key must be specified either via environment variable (AWS_ACCESS_KEY_ID) or system property (aws.accessKeyId). 2024-07-03 12:24:44 at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111) 2024-07-03 12:24:44 at software.amazon.awssdk.auth.credentials.internal.SystemSettingsCredentialsProvider.resolveCredentials(SystemSettingsCredentialsProvider.java:58) 2024-07-03 12:24:44 at software.amazon.awssdk.auth.credentials.AwsCredentialsProvider.resolveIdentity(AwsCredentialsProvider.java:54) 2024-07-03 12:24:44 at software.amazon.awssdk.identity.spi.IdentityProvider.resolveIdentity(IdentityProvider.java:60) 2024-07-03 12:24:44 at software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain.resolveCredentials(AwsCredentialsProviderChain.java:109) 2024-07-03 12:24:44 at software.amazon.awssdk.auth.credentials.AwsCredentialsProvider.resolveIdentity(AwsCredentialsProvider.java:54) 2024-07-03 12:24:44 at software.amazon.awssdk.identity.spi.IdentityProvider.resolveIdentity(IdentityProvider.java:60) 2024-07-03 12:24:44 at software.amazon.awssdk.awscore.internal.authcontext.AwsCredentialsAuthorizationStrategy.lambda$resolveCredentials$2(AwsCredentialsAuthorizationStrategy.java:112) 2024-07-03 12:24:44 at software.amazon.awssdk.core.internal.util.MetricUtils.measureDuration(MetricUtils.java:56) 2024-07-03 12:24:44 at software.amazon.awssdk.awscore.internal.authcontext.AwsCredentialsAuthorizationStrategy.resolveCredentials(AwsCredentialsAuthorizationStrategy.java:112) 2024-07-03 12:24:44 at software.amazon.awssdk.awscore.internal.authcontext.AwsCredentialsAuthorizationStrategy.addCredentialsToExecutionAttributes(AwsCredentialsAuthorizationStrategy.java:85) 2024-07-03 12:24:44 at software.amazon.awssdk.awscore.internal.AwsExecutionContextBuilder.invokeInterceptorsAndCreateExecutionContext(AwsExecutionContextBuilder.java:136) 2024-07-03 12:24:44 at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.invokeInterceptorsAndCreateExecutionContext(AwsSyncClientHandler.java:67) 2024-07-03 12:24:44 at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$0(BaseSyncClientHandler.java:62) 2024-07-03 12:24:44 at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:182) 2024-07-03 12:24:44 at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:60) 2024-07-03 12:24:44 at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:52) 2024-07-03 12:24:44 at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:60) 2024-07-03 12:24:44 at software.amazon.awssdk.services.s3.DefaultS3Client.getObject(DefaultS3Client.java:4599) 2024-07-03 12:24:44 at software.amazon.awssdk.services.s3.S3Client.getObject(S3Client.java:7926) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.cache.S3Cache.getInfo(S3Cache.java:282) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.cache.InfoService.getInfo(InfoService.java:87) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.cache.CacheFacade.getInfo(CacheFacade.java:55) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.resource.InformationRequestHandler.handle(InformationRequestHandler.java:226) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.resource.iiif.v3.InformationResource.doGET(InformationResource.java:82) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.resource.HandlerServlet.handle(HandlerServlet.java:97) 2024-07-03 12:24:44 at edu.illinois.library.cantaloupe.resource.HandlerServlet.doGet(HandlerServlet.java:35) 2024-07-03 12:24:44 at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) 2024-07-03 12:24:44 at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) 2024-07-03 12:24:44 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) 2024-07-03 12:24:44 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) 2024-07-03 12:24:44 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 2024-07-03 12:24:44 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 2024-07-03 12:24:44 at org.eclipse.jetty.server.Server.handle(Server.java:516) 2024-07-03 12:24:44 at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) 2024-07-03 12:24:44 at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) 2024-07-03 12:24:44 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) 2024-07-03 12:24:44 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 2024-07-03 12:24:44 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 2024-07-03 12:24:44 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 2024-07-03 12:24:44 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 2024-07-03 12:24:44 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 2024-07-03 12:24:44 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) 2024-07-03 12:24:44 at java.base/java.lang.Thread.run(Thread.java:829) 2024-07-03 12:24:44 16:24:44.701 [qtp2089016471-18] DEBUG s.a.a.a.c.AwsCredentialsProviderChain - Loading credentials from EnvironmentVariableCredentialsProvider() 2024-07-03 12:24:45 16:24:45.179 [qtp2089016471-18] DEBUG s.a.a.requestId - Received failed response: 404, Request ID: R1A5N07P51WNKD3B, Extended Request ID: +KlvcjAfva5U11G8LtLaCYC26zEaqnQlBEA5qM+nPeot0w4ovBh672MYdsg5KY45gGmzS9zZrHA= 2024-07-03 12:24:45 16:24:45.205 [qtp2089016471-18] TRACE e.i.l.c.c.CacheFactory - getSourceCache(): implementation changed; creating a new instance 2024-07-03 12:24:45 16:24:45.205 [qtp2089016471-18] TRACE e.i.l.c.c.CacheFactory - setSourceCache(): initializing the new instance 2024-07-03 12:24:45 16:24:45.207 [qtp2089016471-18] DEBUG e.i.l.c.c.FilesystemCache - getSourceImageFile(): C:\Users\anuro\Desktop\Work Zone\NextGen NAC Local Setup\catalog-infrastructure\ngc-cantaloupe\cantaloupe\cache/source/cf/50/25/cf50254d713b0d004a5b97a66b7beed4 2024-07-03 12:24:45 16:24:45.213 [qtp2089016471-18] DEBUG e.i.l.c.s.FilesystemSource - Resolved 76064733-01-001.jpg to images/76064733-01-001.jpg 2024-07-03 12:24:45 OpenJDK 64-Bit Server VM warning: You have loaded library /opt/libjpeg-turbo/lib/libturbojpeg.so which might have disabled stack guard. The VM will try to fix the stack guard now. 2024-07-03 12:24:45 It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'. 2024-07-03 12:24:45 16:24:45.224 [qtp2089016471-18] DEBUG e.i.l.c.p.ProcessorFactory - Failed to initialize TurboJpegProcessor (error: /opt/libjpeg-turbo/lib/libturbojpeg.so: /opt/libjpeg-turbo/lib/libturbojpeg.so: file too short) 2024-07-03 12:24:45 16:24:45.226 [qtp2089016471-18] DEBUG e.i.l.c.p.ProcessorFactory - Java2dProcessor selected for format JPEG (AutomaticSelectionStrategy offered TurboJpegProcessor, Java2dProcessor) 2024-07-03 12:24:45 16:24:45.226 [qtp2089016471-18] DEBUG e.i.l.c.p.ProcessorConnector - File -> FileProcessor connection between FilesystemSource and Java2dProcessor 2024-07-03 12:24:45 16:24:45.259 [qtp2089016471-18] DEBUG s.a.a.requestId - Received failed response: 404, Request ID: R1A3WJ34A1WWH9VY, Extended Request ID: icoI7fj90azFUeG4ZN1+0ysGDp4mQHkS7poyOMF3eC3SMWMOnvC2Mr8DLUN1UupquPPgxjOKahE= 2024-07-03 12:24:45 16:24:45.271 [qtp2089016471-18] TRACE e.i.l.c.p.c.j.JPEGImageReader - ImageIO plugin preferences: com.sun.imageio.plugins.jpeg.JPEGImageReader 2024-07-03 12:24:45 16:24:45.271 [qtp2089016471-18] DEBUG e.i.l.c.p.c.j.JPEGImageReader - Using com.sun.imageio.plugins.jpeg.JPEGImageReader 2024-07-03 12:24:45 16:24:45.326 [qtp2089016471-18] INFO e.i.l.c.r.ErrorResource - Handling GET /iiif/3/76064733-01-001.jpg/info.json 2024-07-03 12:24:45 16:24:45.326 [qtp2089016471-18] DEBUG e.i.l.c.r.ErrorResource - Request headers: Cookie: _ga=GA1.1.475889717.1717215540; _ga_0VS4QBSPD8=GS1.1.1719506661.11.0.1719506661.0.0.0; Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7; Connection: keep-alive; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36; Sec-Fetch-Site: none; Sec-Fetch-Dest: document; Host: localhost:8182; Accept-Encoding: gzip, deflate, br, zstd; Sec-Fetch-Mode: navigate; sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"; sec-ch-ua-mobile: ?0; Cache-Control: max-age=0; Upgrade-Insecure-Requests: 1; sec-ch-ua-platform: "Windows"; Sec-Fetch-User: ?1; Accept-Language: en-US,en;q=0.9 2024-07-03 12:24:45 16:24:45.328 [qtp2089016471-18] DEBUG e.i.l.c.r.ErrorResource - Base URI assembled from X-Forwarded headers: http://localhost:8182 2024-07-03 12:24:45 16:24:45.340 [qtp2089016471-18] WARN o.a.v.deprecation - configuration key 'resource.loader' has been deprecated in favor of 'resource.loaders' 2024-07-03 12:24:45 16:24:45.341 [qtp2089016471-18] WARN o.a.v.deprecation - configuration key 'classpath.resource.loader.class' has been deprecated in favor of 'resource.loader.classpath.class' 2024-07-03 12:24:45 16:24:45.341 [qtp2089016471-18] WARN o.a.v.deprecation - configuration key 'class.resource.loader.cache' has been deprecated in favor of 'resource.loader.class.cache' 2024-07-03 12:24:45 16:24:45.341 [qtp2089016471-18] WARN o.a.v.deprecation - configuration key 'space.gobbling' has been deprecated in favor of 'parser.space_gobbling' 2024-07-03 12:24:45 16:24:45.382 [qtp2089016471-18] DEBUG e.i.l.c.r.HandlerServlet - Responded to GET /iiif/3/76064733-01-001.jpg/info.json with HTTP 500 in 1217 msec 2024-07-03 12:24:45 172.20.0.1 - - [03/Jul/2024:16:24:44 +0000] "GET /iiif/3/76064733-01-001.jpg/info.json HTTP/1.1" 500 6572 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"

Screenshot 2024-07-03 122804

Below is my Processor Selection in my properties file, I have tried with all the combination of processors for JPG but non has worked out to resolve my issue

`#----------------------------------------

Processor Selection

----------------------------------------

processor.selection_strategy = AutomaticSelectionStrategy

processor.ManualSelectionStrategy.avi = FfmpegProcessor processor.ManualSelectionStrategy.bmp = processor.ManualSelectionStrategy.flv = FfmpegProcessor processor.ManualSelectionStrategy.gif = processor.ManualSelectionStrategy.jp2 = KakaduNativeProcessor processor.ManualSelectionStrategy.jpg = processor.ManualSelectionStrategy.mov = FfmpegProcessor processor.ManualSelectionStrategy.mp4 = FfmpegProcessor processor.ManualSelectionStrategy.mpg = FfmpegProcessor processor.ManualSelectionStrategy.pdf = PdfBoxProcessor processor.ManualSelectionStrategy.png = processor.ManualSelectionStrategy.tif = processor.ManualSelectionStrategy.webm = FfmpegProcessor processor.ManualSelectionStrategy.xpm =

Fall back to this processor for any formats not assigned above.

processor.ManualSelectionStrategy.fallback = Java2dProcessor

anuroopkancherla commented 1 month ago

@anuroopkancherla could you please provide a sample JPEG so we can debug? thanks!

Sorry we cannot share the image on open forum but I can share the metadata of the image

ExifTool Version Number : 12.76 File Name : 76064733-01-001.jpg Directory : . File Size : 1374 kB File Modification Date/Time : 2023:08:02 19:41:08+00:00 File Access Date/Time : 2024:07:03 16:23:58+00:00 File Inode Change Date/Time : 2024:07:03 16:23:42+00:00 File Permissions : -rw-r--r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg JFIF Version : 1.01 Exif Byte Order : Little-endian (Intel, II) Subfile Type : Full-resolution image Compression : Uncompressed Photometric Interpretation : BlackIsZero Strip Offsets : (Binary data 38 bytes, use -b option to extract) Orientation : Horizontal (normal) Samples Per Pixel : 1 Rows Per Strip : 1024 Strip Byte Counts : (Binary data 39 bytes, use -b option to extract) X Resolution : 400 Y Resolution : 400 Planar Configuration : Chunky Resolution Unit : inches Warning : Bad offset for IFD0 ModifyDate Image Width : 3506 Image Height : 4450 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 1 Image Size : 3506x4450 Megapixels : 15.6

jcoyne commented 1 month ago

Did you notice Warning : Bad offset for IFD0 ModifyDate. I wonder if that is the problem.