JclLastExceptStackListToStrings produces an empty string list

1.5k Views Asked by At

I've installed JCL into Delphi 2010. In the following code

try
  raise Exception.Create('Error Message');
except
  on E: Exception do
  begin
    ResultStatus := JclLastExceptStackListToStrings(sl, True, True, True, True);
  end;
end;

Also I have this call in the initialization section:

initialization
  JclStartExceptionTracking;

ResultStatus is false and sl is empty. I have set options to generate map and .jdbg files. Other functions, like ProcByLevel work fine. Is there something else I need to do to make JclLastExceptStackListToStrings work?

From JclDebug.pas file:

Last modified: $Date:: 2010-09-07 19:43:19 +0200 (mar., 07 sept. 2010) Revision: $Rev:: 3331

4

There are 4 best solutions below

2
On

Try calling

JclStartExceptionTracking;

at the very start of your application.

[Edit]You already are. Then I'm currently out of suggestions. [/Edit]

0
On

I use:

JclStackTrackingOptions := [stStack, stExceptFrame, stRawMode, stAllModules, stStaticModuleList];

0
On

I've been stuck with this problem for a few days. JCL stack tracking was working with my programs and I was able to pinpoint the error location. Somehow it just stopped working.

Then I worked with JCL's demo to see if it is working without any problem. It worked very well. I set all the project options same with the demo and yet my program did not dump stack while the demo was working everytime.

Suddenly I noticed that the only difference between my program and the demo is CPU architecture. Demo is 32 bits and my program is 64 bits.

I compiled the JCL demo as 64 bits and it stopped working too. It is working only with 32 bits code. Not 64 bits.

Unfortunatelly my program needs 6-7 gigabytes of memory and I cannot use the 32 bits mode. I suggest to use Eurekalog since it is working for both architectures.

0
On

I solve this problem in Delphi XE 1.

  1. open Project Options menu
  2. open Delphi Compiler tree node
  3. select Linking tree node
  4. enable Debug Information checkbox