Thursday, August 14, 2008

memory leak in Axapta 3.0

Recently having got an error message after using AOS for batch processing I started digging this problem and finally found out that was described in Fixlist of Service Pack 5.
(Problem #1748 Processing some X++ code constructions resulted in a memory leak.)


You may see the same error by creating a job like the following one as it was suggested in Fixlist in order to reproduce the message. I just increased the number of iteration and an info to see the progress.

static void MemoryLeakTest(Args _args)
{
container custcont;
int loop;
Custtable custtable;
;
select custtable;
custcont = conins(custcont,1,custtable.data());
for(loop = 1; loop <= 100000; loop++)
{
infolog.add(exception::Info, strfmt('loop %1', loop));
[custtable] = conpeek(custcont,1); //memory leak
}
}

4 comments:

gl00mie said...
This comment has been removed by the author.
gl00mie said...

Cannot reproduce this with kernel version 3.0.1951.7609 (KR3). I've changed the loop to execute 500 000 times and still couldn't make Axapta to crash with this job. By the way, I used print instead of infolog to see the progress - it works much faster this way and consumes less memory.

wojzeh said...

that's correct because this issue was fixed in SP5 when your 1951.7609 corresponds SP6

Anonymous said...

Nice Info...

FYI:
# The Best SAP Training Video You Ever Seen...

Visit WWW.SAPVISUAL.COM

We Guarantee...!!! You CAN be a certified SAP consultant fast...