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

Free Support Forum - aspose.com

Memory leaks in MboxrdStorageReader

Hello Team,


I have to read MBOX file and convert it in to PST file on Mac OS X. I am using Aspose.Email for Java API. While reading MBOX file using MboxrdStorageReader, it is taking huge memory greater than 1GB. My MBOX file is of 2GB. Memory is not deallocated from your side please take care of it. Please find the below code for your reference.

******** Source Code *******

MboxrdStorageReader objMBOXReader = null;

try
{

objMBOXReader = new MboxrdStorageReader(this.m_StrSourceFilePath, true);


int f_intMailCount = 0;


while ((f_objMailMessage = objMBOXReader.readNextMessage()) != null //iterate mails

{

try

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #931a68} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco} span.Apple-tab-span {white-space:pre}

{

f_intMailCount++;

}

catch(Exception pObj)

{

pObj.printStackTrace();

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco}

}


}//end of while loop


}//end of outer try

catch(Exception pObj)

{

pObj.printStackTrace();

}


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco} p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco} span.s1 {color: #931a68} span.Apple-tab-span {white-space:pre}
Hi Ajinath,

Thank you for writing to Aspose Support team.

Could you please share how you have observed the memory leaks? We have created a 2.5 GB MBox file and were not able to observe any such issue at our end. We appreciate further information from you in this regard.

I am using Mac OS X 10.10.3 Operating System.Open Activity monitor to see the increasing memory there.In the activity monitor you can see the CPU,Memory,Energy,Disk,Network Tabs.You have to see the Memory Tab.See Your application in Memory Tabs and look memory column.

Hi,


We have tested this at our end on Mac OS X 10.11.5 and were not able to reproduce any such problem at our end. We generated a sample MBox file of size 2.5 GB and read all the messages from it. The maximum memory that the application occupied was only 520 MB. Please use MailMessage.dispose() method after processing the message extracted from MBox file and let us know if this is of help to you?

Code

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #931a68} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7e504f} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #4e9072} span.s1 {color: #7e504f} span.s2 {color: #931a68} span.s3 {color: #3933ff} span.s4 {color: #000000} span.s5 {text-decoration: underline} span.s6 {color: #4e9072} span.Apple-tab-span {white-space:pre}

try

{


objMBOXReader = new MboxrdStorageReader("835821//sample.mbox", true);


int f_intMailCount = 0;


MailMessage f_objMailMessage = null;


while (( f_objMailMessage = objMBOXReader.readNextMessage()) != null) //iterate mails

{

try

{

f_intMailCount++;

//dispose after processing

f_objMailMessage.dispose();

}

catch(Exception pObj)

{

pObj.printStackTrace();

}


}//end of while loop


}//end of outer try

catch(Exception pObj)

{

pObj.printStackTrace();

}

Hello,


I have tried you given solution. But it is not work for me. Every aspose object i have disposed. I have a 2GB of RAM and I have 2GB of MBOX file. My Operation System taking 700 MB of Memory. And my application taking huge memory. I have limited memory.Please help me.

Hi Ajinath,


Please share your sample MBox file with us as we are not able to reproduce the issue at our end with the latest version of Aspose.Email for Java 17.4.0.

Hello Team,


I have send a large mbox sample in .zip format.please test this sample using aspose.email for java api on mac os x.Please update me.

Hi Ajinath,


Thank you for sharing the sample MBox file.

We were able to reproduce the issue at our end using your sample MBox fiel and have logged it as EMAILJAVA-34260 for further investigation by our Product team. We’ll update you here once there is some information or a fix version available in this regard.

Hello Kashif,


What about this issue. Give us solution for this issue i have purchase Aspose License. I have waste more time on it.

Hi Ajinath,


As you may know that an issue logged in our system is addressed upon its turn after the ones that are logged prior to it. This issue will also be addressed upon its turn and as soon as there is some information or a fix version available for this problem, we’ll update you here via this thread. We appreciate your patience until then.

Hello Kashif Iqbal,

We have already purchase aspose license. Still there are many issues in aspose library. I got very bad experience with aspose. I need refund for Aspose.Email for Java purchased API.

Hi Ajinath,


We regret the inconvenience caused to you.

We try our best to implement API in a way so that the functionality is not compromised as far as quality is concerned. However, there are still some cases where issues do arise. Our Product team looks into these and try to rectify those in the next version to be released.

Just to update you, this issue has also been fixed and will be available in the upcoming release of the API, which is due for release by the end of this month. We’ll update you here once the fix version is available for download.

Hello Kashif,

You said you will be release API on end of the April 2017, but still i did not got any update regarding this. Please update me.

Hi Ajinath,


We usually give an approximate time to our users about release of new version. I have inquired from our Product team and we’ll be releasing next version of the API at the end of next week. You will be notified automatically here about the availability of new release for download. We appreciate your patience until then.

The issues you have found earlier (filed as EMAILJAVA-34260) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.