0

Iam having one application, in that i need to clear the Memory Leaks by using FastMM. I have added FullDebugMode, LogMemoryLeakDetailToFile in conditional defines. And while closing the application in debug mode, I got List index out of Bounds(0) and the application is terminating without writing any Memory Leaks in the File. At that time Stack also empty. And in bugreport, also it was not mentioned clearly. And my application might have n-number of Lists which is created in different forms in different ways. And iam using Delphi 6 and FastMM4. TbitbtnClour, KbmMemtable, QuickReport and Indy components are third parts components that iam using here. Iam totally confused, Please help me to solve this issue.

  • Impossible to diagnose without details – David Heffernan Feb 21 '14 at 11:04
  • Otherwise can we comment the Close and Destroy Event Code in all over the application and do it? Or is there any possible way to find out the exception where it is coming? – Work 2 Enjoy - Enjoy 2 Work Feb 21 '14 at 11:33
  • Well, what happens in the debugger. Where does it break. What does the call stack look like. Have you learnt how to use the debugger yet? Did you install fastmm correctly. The very first unit in your .dpr file? – David Heffernan Feb 21 '14 at 11:43
  • Yah. I know how to debug and how to use FastMM. And past one week clearing memory Leaks for other application and it happen properly. And for this time Stack(ctrl+alt+s) is empty. When iam running the application in debug mode, where it is breaking is not coming. – Work 2 Enjoy - Enjoy 2 Work Feb 21 '14 at 11:58
  • But you don't know which line of code throws the error? – David Heffernan Feb 21 '14 at 11:59
  • I vl tell one more thing. IF i am not adding FullDebugMode, LogMemoryLeakDetailToFile in conditional defines then List Out Of bounds exception is not coming. And if i add this then iam getting exception and and it's not showing from where it is coming – Work 2 Enjoy - Enjoy 2 Work Feb 21 '14 at 12:02
  • And i tried with TapplicationEvent for handling the Exception also. In that also it is not handling. – Work 2 Enjoy - Enjoy 2 Work Feb 21 '14 at 12:06
  • 1
    Hard the believe the error cannot be trapped in the debugger. You've got debug enabled? Even in fastmm? – David Heffernan Feb 21 '14 at 12:17
  • Yah. Debugger is enabled and FastMM is also enabled. Is there any way to solve this issue.? – Work 2 Enjoy - Enjoy 2 Work Feb 21 '14 at 12:30
  • 1
    There is of course a way to solve the problem. But first the problem must be understood. You need to isolate it. Find some information. Gather facts. You still have not shown the code which fails. Identify and show the code which raises the exception. Look at the call stack. You will need to use some debugging. Either debugger in IDE, or something like madExcept. That's the only advice anyone can offer until you supply actionable facts. – David Heffernan Feb 21 '14 at 12:40
  • 1
    I've seen exceptions where the debugger only shows an empty or junk call stack before. I use EurekaLog - its reports sometimes help. Often it can be an exception in a thread - put exception catch blocks around whatever's in your Execute() method. Also, if you were patching memory leaks, maybe you have a pointer/reference to once-leaked memory that now points nowhere valid? Finally, see [this question](http://stackoverflow.com/questions/4719175/how-do-i-debug-a-difficult-to-reproduce-crash-with-no-useful-call-stack) about debugging with no useful call stack. – David Feb 21 '14 at 14:21
  • Thanks. EurakaLog is working fine and it is creating memory leak file without any exception, – Work 2 Enjoy - Enjoy 2 Work Feb 25 '14 at 07:53

0 Answers0