Bigtext Memory Leak

kriki
Member, Moderator Posts: 9,121
If you use a bigtext in a function (or a codeunit) and you call that function (or codeunit) a lot of times, Navision doesn't free the memory for it. Not even with a CLEAR of the variable.
In the taskmanager I notice that the Navision client (or NAS) takes a huge amount of memory.
So the only way I found is to close Navision and restart.
I also have had the strange event that the taskmanager reports that a lot of memory is in use, but in the processes-list I don't find the process who has eaten the memory (even if I know it is Navision and closing Navision doesn't even free the memory).
I have also noticed that 5.0 has the same problem.
Someone has some better trick to avoid this memory loss?
In the taskmanager I notice that the Navision client (or NAS) takes a huge amount of memory.
So the only way I found is to close Navision and restart.
I also have had the strange event that the taskmanager reports that a lot of memory is in use, but in the processes-list I don't find the process who has eaten the memory (even if I know it is Navision and closing Navision doesn't even free the memory).
I have also noticed that 5.0 has the same problem.
Someone has some better trick to avoid this memory loss?
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
0
Comments
-
you could avoid using big text and use blob instead.0
-
But on those, I cannot use the text-functions (STRPOS,GETSUBTEXT).
I was already thinking about an array [1..1000] of Text 1000 and program all operations I need....Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
You could implement textPOS and GETSUBTEXT with blob as well.0
-
Bigtext in Navision it’s a feature that has never well implemented.
It’s a feature that I always try to avoid.0 -
ara3n wrote:You could implement textPOS and GETSUBTEXT with blob as well.
To be honest, I don't see how to do it with a blob. Or do you mean with streaming it in text variables?.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Yes. converting it to text variable0
-
If your bigtext is defined as Local change it to Global that sometimes helps with memory leaks.0
-
Lin wrote:If your bigtext is defined as Local change it to Global that sometimes helps with memory leaks.
And if it doesn't help enough. I program a temptable to simulate bigtexts.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I faced with the same error, but CLEAR(BigText) was solution in my case.
I've tested it on NAV 4,5,6 and the behaviour is same. If CLEAR(BigText) is missed, memory is leaking.
Code example:FOR j := 1 TO 300 DO BEGIN InFile.OPEN('C:\temp\metadata.xml'); InFile.CREATEINSTREAM(InStr); BigTxt.READ(InStr); i := 1; TextLenght := BigTxt.LENGTH; WHILE i <= BigTxt.LENGTH DO BEGIN TextLine := ''; BigTxt.GETSUBTEXT(TextLine,i,1024); i := i + 1024; END; InFile.CLOSE; CLEAR(BigTxt); END;
Oleg Dovgalenko0 -
See KB 2728774, 2735461, 27368910
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions