How Get Full Call Stack in Delphi Server Application
Asked Answered
O

4

7

I have a multi-tier software that is two application(GUI,DataSnap Server) . My DataSnap server application has a bug cause occur EAccessViolation in Some times. such this :

Exception EAccessViolation  in module unidac160.bpl at 00010CB1.
Access Violation at 002B77832 in module unidac160.bpl. Read of  address 0000000C

I want get full Call Stack and log that in file. also i use eurekalog but it is effective just for gui application.

Ochs answered 3/5, 2012 at 5:59 Comment(0)
A
9

EurekaLog is extremely effective for all applications. Just configure it so that it will log the exceptions to a file and doesn't display exception dialogs at all.

Allot answered 3/5, 2012 at 6:19 Comment(1)
+1 but "effective" is not fully correct, more like "extremely effective" (:Linchpin
U
7

Our Open-Source logging classes have an exception interceptor with full call stack, including source code lines.

The debugging information is highly compressed (better than zip or any other formats), optionally into the exe.

Open Source, works with Delphi 5 up to XE2.

In its latest version (use the one from the source code repository - i.e. currently 1.16), it is also able to log exceptions within libraries (i.e. within .dll or .bpl), as your request explicitly state.

There are other features, like customer-side profiling, which may help your customer support, and application enhancements, from real data (not only in test benchs).

Understand answered 3/5, 2012 at 16:17 Comment(4)
Wow Arnaud! Your stuff just keeps getting better and better!Trilbie
If you recommend it as solution, it would be nice to have at least minimal example of code, how to add/activate such exception interceptor etc. For specialized libraries it is enough usually to add unit to the project, but not in this case i guess. Compression of MAP-file fails on 36Mb file (some fixed-size internal buffer is too small, it should be calculated from filesize probably).Haro
@AndreiGalatyn The issue with huge .map file has been fixed yesterday. And you can find samples at github.com/synopse/mORMot/tree/master/SQLite3/Samples/…Understand
@Arnaud Seems nighty build 2015-02-21_170025 still doesn't include the fix, i will check it tomorrow. But at first view it looks very interesting (just 3 units with full sourcecode and they do all what i need and more). Will try to test on real projects. Thank you!Haro
C
4

You can also use MadExcept to get the stack for your application. Here you have a similar question madExcept, getting top of current stack

Also, related to your question this can also help you

Display the call stack in a Delphi Win32 application

Christiano answered 3/5, 2012 at 8:1 Comment(0)
T
0

I've been using MemCheck before to render call stacks, but I'm not sure it still works with the most recent Delphi versions.

Teneshatenesmus answered 3/5, 2012 at 12:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.