We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

OutOfMemoryError

Hi,

I’m creating a document with 2 bookmarks (bookmark for image and bookmark text) and add rows to existent table(maybe a 1000 rows). For 1 user all things i’ts good but for 2 users generate java.lang.OutOfMemoryError: Java heap space.

This is a stacktrace;


Caused by: java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(DataBufferInt.java:75) [rt.jar:1.7.0_80]
at java.awt.image.Raster.createPackedRaster(Raster.java:467) [rt.jar:1.7.0_80]
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) [rt.jar:1.7.0_80]
at java.awt.image.BufferedImage.(BufferedImage.java:340) [rt.jar:1.7.0_80]
at asposewobfuscated.zzPR.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzPR.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzPR.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzPR.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzLD.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzLD.zzU(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzLD.(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzW.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzW.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzIF.zzE(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzIF.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzJI.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzJI.zzL(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzJK.endDocument(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at asposewobfuscated.zzHR.endDocument(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at com.aspose.words.zzZ9W.zzZLB(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at com.aspose.words.zz10.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at com.aspose.words.Document.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at com.aspose.words.Document.zzZ(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]
at com.aspose.words.Document.save(Unknown Source) [aspose-words-15.11.0-jdk16.jar:15.11.0.0]


I want to improve this code, somebody can help me?



Hi there,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word documents.
  • Please create a standalone Java application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.

Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.