Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IW memory and exception
#1
Hello,
 
I’m working on a Delphi 10.4 migration of our IW project.
I’ve got some memory issue, mostly.
 
First of all, the program seems to have a different behavior compared to our 10.1 version. For example, we had some IW frames automatically deleted (kind of garbage collector), but we have to free it manually since this 10.4 version.
 
The second point is about the memory leak. The program doesn’t seem to accept any of it. I know that we worked with some leaks for years. Now any Freeing with memory leaks causes a crash of the application (we have of course try except everywhere, but the exception get back to servercontroller).
 
Did you ever met this points ? Do you have some advices about it ? I use Delphi 10.4.1 and IW 15.2.18.
 
Best regards,
Reply
#2
With out much more info.. some things to ramble off

1) What are you using if anything for memory leak checking?
1a) We have used MadExcepts Memory Leak for checking.
1b) If don't have MadExcept, can try using the FastMM4 built in memory leak detection.

2) not sure Try/Except is best thing to use if blind applying it, as this eats any exception errors.

If you suspect memory leaks, really need something like above to report back to you at the end and examine the report on what objects are leaking.
Then to look over those areas. To find what you are creating manually and possibly missing out on doing a free. Such as doing an EXIT somewhere and
having the free way past that point to where EXIT bypasses your code to free objects.
Reply
#3
(05-18-2021, 07:17 AM)gabin1405 Wrote: Hello,
 
I’m working on a Delphi 10.4 migration of our IW project.
I’ve got some memory issue, mostly.
 
First of all, the program seems to have a different behavior compared to our 10.1 version. For example, we had some IW frames automatically deleted (kind of garbage collector), but we have to free it manually since this 10.4 version.
 
The second point is about the memory leak. The program doesn’t seem to accept any of it. I know that we worked with some leaks for years. Now any Freeing with memory leaks causes a crash of the application (we have of course try except everywhere, but the exception get back to servercontroller).
 
Did you ever met this points ? Do you have some advices about it ? I use Delphi 10.4.1 and IW 15.2.18.
 
Best regards,


I don't think that the migration form D 10.1 to 10.4 is able to change the behavior like that. Probably what is happening is that some memory corruption has a different side effect now (memory layout of objects changed from 10.1 to 10.4) and something wrong before could pass unnoticed but causes some nasty problem now.

I would start by disabling this "garbage collector" because it doesn't seem to be working as expected. Do you mind sharing how you do that?

Secondly I would track down the memory leaks.
More often than not, memory leaks indicate design problems that can have more consequences than anticipated. There is no reason to have memory leaks and they are extremely harmful in server applications supposed to run uninterruptedly for months.
I suggest FastMM4 (there is a version included with IW) to track down the memory leaks. If you have never done it using FastMM, please let me know and I'll see if I can find some info or provide you a simple how to.
Reply
#4
That sounds like a blog post to me  Cool

Dan
Reply
#5
Hi there,

Thank you for your answers. Actually, we're already using FastMM4. I was pretty worried by the fact that the application could be really unstable.

Actually, I noticed the same (or pretty same) reactions on my VCL apps.

If someone try to reach a solution :
There's a trouble with RIO components in Delphi 10.4.1 (again !), I resolved my weird behavior by updating my IDE (to 10.4.2).
Reply
#6
(05-19-2021, 06:30 AM)DanBarclay Wrote: That sounds like a blog post to me  Cool

Dan

Here we go  Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)