Memory lack due to "Aspose.Imaging for Java"


#1

Our customer is using “Aspose.Imaging for Java”.

com.aspose.imaging.internal.fb.c
com.aspose.imaging.internal.eW.b
com.aspose.imaging.RasterCachedImage$c

3 and more library classes occupy memory, so service is not available.

The application is running under JEUS was, and every 8 minutes, the following method is called and the library is in use.

Memory dump at the time of service failure is below(this is the part of all.)

Class Name | Shallow Heap | Retained Heap | Percentage

com.aspose.imaging.internal.fb.c @ 0x7c5bdc0f0 | 96 | 107,294,624 | 6.58%
com.aspose.imaging.internal.fb.a @ 0x78887b2b8 | 80 | 38,638,504 | 2.37%
com.aspose.imaging.internal.eW.b @ 0x7af1548a8 | 120 | 35,564,696 | 2.18%
com.aspose.imaging.internal.eW.b @ 0x7b450c750 | 120 | 35,564,696 | 2.18%
com.aspose.imaging.RasterCachedImage$c @ 0x79712ecb0| 48 | 35,540,104 | 2.18%
com.aspose.imaging.RasterCachedImage$c @ 0x797624248| 48 | 35,540,104 | 2.18%

It does not seem to be the part that is caused by a particular Thread operation.

Could you please help me?

Best Regards,
James


#2

@InsuJeong,

Can you please share source file along with sample code so that we may further investigate to help you out.


#3

Hi Adnan.Ahmad,

Thank you for your reply.
This is code that I received.


import com.aspose.imaging.Image;
import com.aspose.imaging.fileformats.tiff.TiffFrame;
import com.aspose.imaging.fileformats.tiff.TiffImage;
import com.aspose.imaging.imageoptions.JpegOptions;
import com.aspose.imaging.internal.Exceptions.IO.IOException;

public static Map<Integer, String> makeImageFilesByPage(String inputFilePathName, String outputFilePath, String outputFileName, String outputFileExt){
Map<Integer, String> outputFileNameMap = new HashMap<Integer, String>();
try{
TiffImage multiPageTifImage = (TiffImage)Image.load(inputFilePathName);
TiffFrame[] pages = multiPageTifImage.getFrames();
Integer i = 1;
String outputPathFile = null;

  for (TiffFrame page : pages ){
   outputPathFile = outputFilePath + File.separator + outputFileName + "_" + i + "." + outputFileExt;
   page.save(outputPathFile, new JpegOptions());
   
   //inputImage = ImageIO.read(new File(outputPathFile));
   //outputImage = QrcodeMngUtil.resizeImage(inputImage, 1700, 2338);
   //QrcodeMngUtil.resizeImage2(outputPathFile);
   //ImageIO.write(outputImage, "jpg", new File(outputPathFile));
   outputFileNameMap.put(i, outputFileName + "_" + i + "." + outputFileExt);
   i++;
  }
 }catch(IOException ie){
  outputFileNameMap = null;
 }catch(Exception e){
  outputFileNameMap = null;
 }
 return outputFileNameMap;
}

If you need more detail, please let me know.

Thanks,
James


#4

@InsuJeong,

Can you please share source image file so that we may further investigate to help you out.


#5

Hi Adnan.Ahmad,

I requested the image to them.


#6

@InsuJeong,

Thank you.