Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-21717

Word documents with embedded images can sometimes result in OOM errors

XMLWordPrintable

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Importing a Word document with embedded images can sometimes result in OutOfMemory errors such as:

      Caused by: java.lang.OutOfMemoryError: Java heap space
      	at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
      	at java.awt.image.Raster.createPackedRaster(Raster.java:458)
      	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
      	at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:230)
      	at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:470)
      	at java.awt.image.AreaAveragingScaleFilter.accumPixels(AreaAveragingScaleFilter.java:196)
      	at java.awt.image.AreaAveragingScaleFilter.setPixels(AreaAveragingScaleFilter.java:261)
      	at sun.awt.image.OffScreenImageSource.sendPixels(OffScreenImageSource.java:159)
      	at sun.awt.image.OffScreenImageSource.produce(OffScreenImageSource.java:169)
      	at sun.awt.image.OffScreenImageSource.addConsumer(OffScreenImageSource.java:48)
      	at sun.awt.image.OffScreenImageSource.startProduction(OffScreenImageSource.java:62)
      	at java.awt.image.FilteredImageSource.startProduction(FilteredImageSource.java:166)
      	at sun.awt.image.ImageRepresentation.startProduction(ImageRepresentation.java:643)
      	at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:718)
      	at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:989)
      	at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:168)
      	at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2979)
      	at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2964)
      	at com.benryan.dom.Doc2Wiki.resizeImage(Doc2Wiki.java:980)
      	at com.benryan.dom.Doc2Wiki.visitShapeStart(Doc2Wiki.java:912)
      	at com.aspose.words.Shape.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.GroupShape.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.Paragraph.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.Body.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.Section.accept(Unknown Source)
      	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
      	at com.aspose.words.Document.accept(Unknown Source)
      	at com.benryan.webwork.WordImportAction.doFileImport(WordImportAction.java:377)
      
      Workaround

      Compress the images prior to embedding in Word, or compress the entire Word document prior to importing.

              Unassigned Unassigned
              mseager Michael S
              Votes:
              10 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: