2

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

dsolimano
  • 8,870
  • 3
  • 48
  • 63
Max
  • 19,654
  • 13
  • 84
  • 122
  • It would be good if you came back and said what happened, and accepted the answer that worked! – Warren P Apr 11 '12 at 20:32
  • Unfortunately I don't know the reason. I reinstalled everything (including IDE) and started a new project. So it might have been a number of reasons, but I didn't have time to find what it exactly was. – Max Apr 16 '12 at 18:06
  • I get the same behavior while using XE2. I find that I am 1 exception behind. meaning I get results on the second pass. – Troy Harris Jun 04 '13 at 15:30

4 Answers4

1

Try calling

JclStartExceptionTracking;

at the very start of your application.

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

Paul-Jan
  • 16,746
  • 1
  • 63
  • 95
  • He's calling it in the initialization section. Would you have him call it earlier, or later? If earlier, how? – Rob Kennedy Jan 16 '11 at 19:04
  • He hadn't mentioned that yet when I posted this answer (check the edit log). I'll update my answer to avoid confusion. – Paul-Jan Jan 17 '11 at 18:30
0

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
Stéphane B.
  • 3,260
  • 2
  • 30
  • 35
0

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.

Celal Ergün
  • 955
  • 2
  • 14
  • 30
0

I use:

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

Misha
  • 1,816
  • 1
  • 13
  • 16