ICEpdf
  1. ICEpdf
  2. PDF-784

Method getPageImage gets stuck sometimes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.4
    • Fix Version/s: 6.2.4
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Windows Server 2008
    • Workaround Description:
      Set the system property -Dorg.icepdf.core.imageProxy=false

      Description

      Sometimes I see this stacktrace in javamelody:

      ajp-apr-8009-exec-40
      sun.misc.Unsafe.park(Native Method)
      java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
      java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:218)
      java.util.concurrent.FutureTask.get(FutureTask.java:83)
      org.icepdf.core.pobjects.graphics.ImageReference.createImage(ImageReference.java:107)
      org.icepdf.core.pobjects.graphics.CachedImageReference.getImage(CachedImageReference.java:55)
      org.icepdf.core.pobjects.graphics.ImageReference.drawImage(ImageReference.java:71)
      org.icepdf.core.pobjects.graphics.commands.ImageDrawCmd.paintOperand(ImageDrawCmd.java:50)
      org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:136)
      org.icepdf.core.pobjects.Page.paintPageContent(Page.java:543)
      org.icepdf.core.pobjects.Page.paint(Page.java:500)
      org.icepdf.core.pobjects.Page.paint(Page.java:432)
      org.icepdf.core.pobjects.Document.getPageImage(Document.java:1097)

      What could be the problem? The code is:

      byte[][] data = new byte[end - start + 1][];
              try {
                  int index = 0;
                  for (int i = start - 1; i < end; i++) {
                      baous = new ByteArrayOutputStream();
                      image = (BufferedImage) document.getPageImage(
                              i, GraphicsRenderingHints.PRINT, Page.BOUNDARY_CROPBOX, 0, scale);
                      ImageIO.write(image, "png", baous);
                      data[index] = baous.toByteArray();
                      index++;
                      image.flush();
                      image = null;
                      baous.flush();
                      baous.close();
                  }
              } finally {
                  document.dispose();
              }

        Activity

        Yassine El Bouamri created issue -
        Hide
        Patrick Corless added a comment -

        Do you have a test file that shows this issue?

        Show
        Patrick Corless added a comment - Do you have a test file that shows this issue?
        Patrick Corless made changes -
        Field Original Value New Value
        Workaround Description Set the system property -Dorg.icepdf.core.imageProxy=false
        Hide
        Yassine El Bouamri added a comment -

        No, it seems to appear randomly in the logs. I couldn't reproduce the error.

        Show
        Yassine El Bouamri added a comment - No, it seems to appear randomly in the logs. I couldn't reproduce the error.
        Hide
        Patrick Corless added a comment -

        I would suggest you upgrade to 5.0.7 as there as been quite a few fixes that might help address the random locks your are seeing.

        Show
        Patrick Corless added a comment - I would suggest you upgrade to 5.0.7 as there as been quite a few fixes that might help address the random locks your are seeing.
        Patrick Corless made changes -
        Fix Version/s 5.2 [ 10970 ]
        Hide
        Patrick Corless added a comment -

        We believe this issue has been addressed. ICEpdf 5.1.1 P02 can be requested for evaluation from product support.

        Show
        Patrick Corless added a comment - We believe this issue has been addressed. ICEpdf 5.1.1 P02 can be requested for evaluation from product support.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Yassine El Bouamri added a comment -

        Can you send me a 5.2 beta to try?

        Show
        Yassine El Bouamri added a comment - Can you send me a 5.2 beta to try?
        Hide
        Patrick Corless added a comment -

        Please contact product.support@icesoft.com and they should be able to get you a copy of the 5.2 beta.

        Show
        Patrick Corless added a comment - Please contact product.support@icesoft.com and they should be able to get you a copy of the 5.2 beta.
        Hide
        Yassine El Bouamri added a comment -

        It seems that really improved with the 6.0 (6.0.1 I have now), but yesterday I got another stuck document:

        http-bio-8080-exec-168
        sun.misc.Unsafe.park(Native Method)
        java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
        java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
        java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
        java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
        java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:218)
        java.util.concurrent.FutureTask.get(FutureTask.java:83)
        org.icepdf.core.pobjects.graphics.ImageReference.createImage(ImageReference.java:115)
        org.icepdf.core.pobjects.graphics.CachedImageReference.getImage(CachedImageReference.java:57)
        org.icepdf.core.pobjects.graphics.ImageReference.drawImage(ImageReference.java:78)
        org.icepdf.core.pobjects.graphics.commands.ImageDrawCmd.paintOperand(ImageDrawCmd.java:96)
        org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148)
        org.icepdf.core.pobjects.graphics.commands.ShapesDrawCmd.paintOperand(ShapesDrawCmd.java:54)
        org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148)
        org.icepdf.core.pobjects.graphics.commands.ShapesDrawCmd.paintOperand(ShapesDrawCmd.java:54)
        org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148)
        org.icepdf.core.pobjects.Page.paintPageContent(Page.java:576)
        org.icepdf.core.pobjects.Page.paint(Page.java:524)
        org.icepdf.core.pobjects.Page.paint(Page.java:453)
        org.icepdf.core.pobjects.Document.getPageImage(Document.java:1124)
        com.indenova.esigna.api.pdf.PDFToolbox.convertPDFtoJPEG(PDFToolbox.java:376)
        com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.getViewerData(DocumentViewerInterfaceImpl.java:430)
        sun.reflect.GeneratedMethodAccessor808.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
        com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
        com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
        com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
        net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        com.indenova.esigna.web.model.ESignaRequestJSPFilter.doFilter(ESignaRequestJSPFilter.java:39)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        java.lang.Thread.run(Thread.java:662)

        Show
        Yassine El Bouamri added a comment - It seems that really improved with the 6.0 (6.0.1 I have now), but yesterday I got another stuck document: http-bio-8080-exec-168 sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.park(LockSupport.java:156) java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811) java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969) java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281) java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:218) java.util.concurrent.FutureTask.get(FutureTask.java:83) org.icepdf.core.pobjects.graphics.ImageReference.createImage(ImageReference.java:115) org.icepdf.core.pobjects.graphics.CachedImageReference.getImage(CachedImageReference.java:57) org.icepdf.core.pobjects.graphics.ImageReference.drawImage(ImageReference.java:78) org.icepdf.core.pobjects.graphics.commands.ImageDrawCmd.paintOperand(ImageDrawCmd.java:96) org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148) org.icepdf.core.pobjects.graphics.commands.ShapesDrawCmd.paintOperand(ShapesDrawCmd.java:54) org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148) org.icepdf.core.pobjects.graphics.commands.ShapesDrawCmd.paintOperand(ShapesDrawCmd.java:54) org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148) org.icepdf.core.pobjects.Page.paintPageContent(Page.java:576) org.icepdf.core.pobjects.Page.paint(Page.java:524) org.icepdf.core.pobjects.Page.paint(Page.java:453) org.icepdf.core.pobjects.Document.getPageImage(Document.java:1124) com.indenova.esigna.api.pdf.PDFToolbox.convertPDFtoJPEG(PDFToolbox.java:376) com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.getViewerData(DocumentViewerInterfaceImpl.java:430) sun.reflect.GeneratedMethodAccessor808.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561) com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) javax.servlet.http.HttpServlet.service(HttpServlet.java:647) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) com.indenova.esigna.web.model.ESignaRequestJSPFilter.doFilter(ESignaRequestJSPFilter.java:39) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) java.lang.Thread.run(Thread.java:662)
        Hide
        Patrick Corless added a comment -

        The property -Dorg.icepdf.core.imageProxy=false should avoid the stuck thread you are seeing. If possible could you provide a sample document? It looks like you are using a single thread to do the document capture is that still the case?

        Show
        Patrick Corless added a comment - The property -Dorg.icepdf.core.imageProxy=false should avoid the stuck thread you are seeing. If possible could you provide a sample document? It looks like you are using a single thread to do the document capture is that still the case?
        Hide
        Patrick Corless added a comment -

        Community memory has been seeing the stuck thread issue with 6.0.1

        Show
        Patrick Corless added a comment - Community memory has been seeing the stuck thread issue with 6.0.1
        Patrick Corless made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Patrick Corless made changes -
        Fix Version/s 6.1 [ 12070 ]
        Fix Version/s 6.0 [ 10970 ]
        Hide
        Yassine El Bouamri added a comment -

        Yes, it is single-threaded. So, can i use "-Dorg.icepdf.core.imageProxy=false" safely?

        Show
        Yassine El Bouamri added a comment - Yes, it is single-threaded. So, can i use "-Dorg.icepdf.core.imageProxy=false" safely?
        Hide
        Yassine El Bouamri added a comment -

        A few minutes ago, Tomcat just went out of memory and crashed:

        02-dic-2015 10:40:57 org.quartz.plugins.history.LoggingTriggerHistoryPlugin triggerFired
        INFO: Trigger ArchiveTriggerGroup.ArchiveWeeklyTrigger fired job ArchiveGroup.ArchiveWeeklyJob at: 10:40:57 12/02/2015
        02-dic-2015 10:41:08 org.quartz.plugins.history.LoggingTriggerHistoryPlugin triggerComplete
        INFO: Trigger ArchiveTriggerGroup.ArchiveWeeklyTrigger completed firing job ArchiveGroup.ArchiveWeeklyJob at 10:41:08 12/02/2015 with resulting trigger instruction code: DO NOTHING
        java.lang.OutOfMemoryError: Java heap space
        Dumping heap to /indenova/tomcat/logs/memory.dump ...
        Unable to create /indenova/tomcat/logs/memory.dump: El archivo ya existe
        02-dic-2015 10:42:58 org.icepdf.core.pobjects.graphics.ImageStreamReference call
        ADVERTENCIA: Error loading image: 2915 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2537, Height=1, Width=7274, DecodeParms=

        {Columns=7274, Predictor=15, Colors=3}, ColorSpace=DeviceRGB} 2915 0 R
        java.lang.OutOfMemoryError: Java heap space
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.allocateByteArray(ConservativeSizingByteArrayOutputStream.java:168)
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.<init>(ConservativeSizingByteArrayOutputStream.java:40)
        at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:176)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:289)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:73)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)
        02-dic-2015 10:43:35 org.icepdf.core.pobjects.graphics.ImageStreamReference call
        ADVERTENCIA: Error loading image: 2928 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2654, Height=1, Width=7274, DecodeParms={Columns=7274, Predictor=15, Colors=3}

        , ColorSpace=DeviceRGB} 2928 0 R
        java.lang.OutOfMemoryError: Java heap space
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.allocateByteArray(ConservativeSizingByteArrayOutputStream.java:168)
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.<init>(ConservativeSizingByteArrayOutputStream.java:40)
        at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:176)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:289)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:73)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)
        02-dic-2015 10:43:35 org.icepdf.core.pobjects.graphics.ImageStreamReference call
        ADVERTENCIA: Error loading image: 2925 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2679, Height=1, Width=7274, DecodeParms=

        {Columns=7274, Predictor=15, Colors=3}, ColorSpace=DeviceRGB} 2925 0 R
        java.lang.OutOfMemoryError: Java heap space
        02-dic-2015 10:43:27 org.icepdf.core.pobjects.graphics.ImageStreamReference call
        ADVERTENCIA: Error loading image: 2880 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2686, Height=1, Width=7274, DecodeParms={Columns=7274, Predictor=15, Colors=3}

        , ColorSpace=DeviceRGB} 2880 0 R
        java.lang.OutOfMemoryError: Java heap space
        02-dic-2015 10:43:04 org.icepdf.core.util.content.NContentParser parse
        ADVERTENCIA: Error parsing content stream.
        java.lang.OutOfMemoryError: Java heap space
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.allocateByteArray(ConservativeSizingByteArrayOutputStream.java:168)
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.resizeArrayToFit(ConservativeSizingByteArrayOutputStream.java:162)
        at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.write(ConservativeSizingByteArrayOutputStream.java:77)
        at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:183)
        at org.icepdf.core.pobjects.ObjectStream.init(ObjectStream.java:64)
        at org.icepdf.core.pobjects.ObjectStream.loadObject(ObjectStream.java:86)
        at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:111)
        at org.icepdf.core.util.Library.getObject(Library.java:155)
        at org.icepdf.core.pobjects.Resources.getFont(Resources.java:140)
        at org.icepdf.core.util.content.AbstractContentParser.consume_Tf(AbstractContentParser.java:767)
        at org.icepdf.core.util.content.NContentParser.parseText(Unknown Source)
        at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
        at org.icepdf.core.pobjects.Page.init(Page.java:384)
        at org.icepdf.core.pobjects.Document.getPageDimension(Document.java:918)
        at com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.fillPageSizes(DocumentViewerInterfaceImpl.java:1253)
        at com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.getCacheFiles(DocumentViewerInterfaceImpl.java:1198)
        at com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.getViewerData(DocumentViewerInterfaceImpl.java:337)
        at sun.reflect.GeneratedMethodAccessor581.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
        at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
        02-dic-2015 10:48:52 org.quartz.impl.jdbcjobstore.JobStoreSupport recoverMisfiredJobs
        INFO: Handling 4 trigger(s) that missed their scheduled fire-time.
        02-dic-2015 10:46:39 org.icepdf.core.pobjects.graphics.ImageStreamReference call
        ADVERTENCIA: Error loading image: 2940 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2764, Height=1, Width=7274, DecodeParms=

        {Columns=7274, Predictor=15, Colors=3}

        , ColorSpace=DeviceRGB} 2940 0 R
        java.lang.OutOfMemoryError: Java heap space

        I don't have a sample document, I'm just seeing those stacktraces in the log.

        Show
        Yassine El Bouamri added a comment - A few minutes ago, Tomcat just went out of memory and crashed: 02-dic-2015 10:40:57 org.quartz.plugins.history.LoggingTriggerHistoryPlugin triggerFired INFO: Trigger ArchiveTriggerGroup.ArchiveWeeklyTrigger fired job ArchiveGroup.ArchiveWeeklyJob at: 10:40:57 12/02/2015 02-dic-2015 10:41:08 org.quartz.plugins.history.LoggingTriggerHistoryPlugin triggerComplete INFO: Trigger ArchiveTriggerGroup.ArchiveWeeklyTrigger completed firing job ArchiveGroup.ArchiveWeeklyJob at 10:41:08 12/02/2015 with resulting trigger instruction code: DO NOTHING java.lang.OutOfMemoryError: Java heap space Dumping heap to /indenova/tomcat/logs/memory.dump ... Unable to create /indenova/tomcat/logs/memory.dump: El archivo ya existe 02-dic-2015 10:42:58 org.icepdf.core.pobjects.graphics.ImageStreamReference call ADVERTENCIA: Error loading image: 2915 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2537, Height=1, Width=7274, DecodeParms= {Columns=7274, Predictor=15, Colors=3}, ColorSpace=DeviceRGB} 2915 0 R java.lang.OutOfMemoryError: Java heap space at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.allocateByteArray(ConservativeSizingByteArrayOutputStream.java:168) at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.<init>(ConservativeSizingByteArrayOutputStream.java:40) at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:176) at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362) at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:289) at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:73) at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 02-dic-2015 10:43:35 org.icepdf.core.pobjects.graphics.ImageStreamReference call ADVERTENCIA: Error loading image: 2928 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2654, Height=1, Width=7274, DecodeParms={Columns=7274, Predictor=15, Colors=3} , ColorSpace=DeviceRGB} 2928 0 R java.lang.OutOfMemoryError: Java heap space at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.allocateByteArray(ConservativeSizingByteArrayOutputStream.java:168) at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.<init>(ConservativeSizingByteArrayOutputStream.java:40) at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:176) at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362) at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:289) at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:73) at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 02-dic-2015 10:43:35 org.icepdf.core.pobjects.graphics.ImageStreamReference call ADVERTENCIA: Error loading image: 2925 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2679, Height=1, Width=7274, DecodeParms= {Columns=7274, Predictor=15, Colors=3}, ColorSpace=DeviceRGB} 2925 0 R java.lang.OutOfMemoryError: Java heap space 02-dic-2015 10:43:27 org.icepdf.core.pobjects.graphics.ImageStreamReference call ADVERTENCIA: Error loading image: 2880 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2686, Height=1, Width=7274, DecodeParms={Columns=7274, Predictor=15, Colors=3} , ColorSpace=DeviceRGB} 2880 0 R java.lang.OutOfMemoryError: Java heap space 02-dic-2015 10:43:04 org.icepdf.core.util.content.NContentParser parse ADVERTENCIA: Error parsing content stream. java.lang.OutOfMemoryError: Java heap space at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.allocateByteArray(ConservativeSizingByteArrayOutputStream.java:168) at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.resizeArrayToFit(ConservativeSizingByteArrayOutputStream.java:162) at org.icepdf.core.io.ConservativeSizingByteArrayOutputStream.write(ConservativeSizingByteArrayOutputStream.java:77) at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:183) at org.icepdf.core.pobjects.ObjectStream.init(ObjectStream.java:64) at org.icepdf.core.pobjects.ObjectStream.loadObject(ObjectStream.java:86) at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:111) at org.icepdf.core.util.Library.getObject(Library.java:155) at org.icepdf.core.pobjects.Resources.getFont(Resources.java:140) at org.icepdf.core.util.content.AbstractContentParser.consume_Tf(AbstractContentParser.java:767) at org.icepdf.core.util.content.NContentParser.parseText(Unknown Source) at org.icepdf.core.util.content.NContentParser.parse(Unknown Source) at org.icepdf.core.pobjects.Page.init(Page.java:384) at org.icepdf.core.pobjects.Document.getPageDimension(Document.java:918) at com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.fillPageSizes(DocumentViewerInterfaceImpl.java:1253) at com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.getCacheFiles(DocumentViewerInterfaceImpl.java:1198) at com.indenova.server.documentViewer.DocumentViewerInterfaceImpl.getViewerData(DocumentViewerInterfaceImpl.java:337) at sun.reflect.GeneratedMethodAccessor581.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) 02-dic-2015 10:48:52 org.quartz.impl.jdbcjobstore.JobStoreSupport recoverMisfiredJobs INFO: Handling 4 trigger(s) that missed their scheduled fire-time. 02-dic-2015 10:46:39 org.icepdf.core.pobjects.graphics.ImageStreamReference call ADVERTENCIA: Error loading image: 2940 0 R Image stream= {BitsPerComponent=8, Filter=FlateDecode, Subtype=Image, Length=2764, Height=1, Width=7274, DecodeParms= {Columns=7274, Predictor=15, Colors=3} , ColorSpace=DeviceRGB} 2940 0 R java.lang.OutOfMemoryError: Java heap space I don't have a sample document, I'm just seeing those stacktraces in the log.
        Patrick Corless made changes -
        Fix Version/s 6.1.1 [ 12975 ]
        Fix Version/s 6.1 [ 12070 ]
        Patrick Corless made changes -
        Fix Version/s 6.2 [ 12974 ]
        Fix Version/s 6.1.1 [ 12975 ]
        Patrick Corless made changes -
        Fix Version/s 6.2.4 [ 13099 ]
        Fix Version/s 6.4 [ 12974 ]
        Hide
        Patrick Corless added a comment -

        I've reworked the static nature of the ImageUtility class with the intent that it will be more friendly when called from multiple threads.

        Show
        Patrick Corless added a comment - I've reworked the static nature of the ImageUtility class with the intent that it will be more friendly when called from multiple threads.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51495 Tue May 09 14:08:36 MDT 2017 patrick.corless PDF-784 reword our ImageUtility to be a little more concurrency friendly
        when loading image via the image proxy
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/ImageUtility.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/ImageStream.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/graphics/ImageReferenceFactory.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/graphics/ScaledImageReference.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/graphics/ImageReference.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51496 Tue May 09 14:09:41 MDT 2017 patrick.corless PDF-784 reword our ImageUtility to be a little more concurrency friendly
        when loading image via the image proxy
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/graphics/commands/FormDrawCmd.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51497 Tue May 09 14:10:18 MDT 2017 patrick.corless PDF-784 reword our ImageUtility to be a little more concurrency friendly
        when loading image via the image proxy
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.0/icepdf/core/src/org/icepdf/core/pobjects/ImageStream.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.0/icepdf/core/src/org/icepdf/core/pobjects/ImageUtility.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.0/icepdf/core/src/org/icepdf/core/pobjects/graphics/ScaledImageReference.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.0/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImageReference.java
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.0/icepdf/core/src/org/icepdf/core/pobjects/graphics/commands/FormDrawCmd.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51500 Tue May 09 14:40:41 MDT 2017 patrick.corless PDF-784 reverting accidental checkin.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/graphics/ImageReferenceFactory.java
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.
        Patrick Corless made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Yassine El Bouamri
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: