5

Background

We have a problem that sometimes the grid in Devexpress raise exception "Raised EConvertError: Cannot assign a nil to a TFont".

But to trace the real cause of this we have changed Font in cxEdit to be a public property instead with a get and set method. Here I want to log the callstack.

My question

Normally JCL is used to log callstacks when exceptions appear. But how can I log the callstack without using raise exception and show a dialog for the user about this ?

I have found the lines:

var
  GlobalStackList: TJclGlobalStackList;

in JclDebug but I fail to use it. If someone have a example how to get the callstack I would be happy.

Regards Roland Bengtsson

dsolimano
  • 8,870
  • 3
  • 48
  • 63
Roland Bengtsson
  • 5,058
  • 9
  • 58
  • 99
  • Not a full duplicate, but you need the same info as answered under [Need a way to periodically log the call stack/stack trace for EVERY method/procedure/function called](http://stackoverflow.com/questions/2326980/need-a-way-to-periodically-log-the-call-stack-stack-trace-for-every-method-proced) – Jeroen Wiert Pluimers Mar 21 '11 at 08:04
  • This is not a exact duplicate of another question, it's specific to JCL. The other question mentioned ended up wanting a call trace and not a call stack. – Robert Love Mar 22 '11 at 04:34

1 Answers1

9

This answer shows how to do it with JCL by calling JclCreateStackList.

Community
  • 1
  • 1
Lars Truijens
  • 42,837
  • 6
  • 126
  • 143