Re: Can I take stack trace ?
Posted by Udo Schneider on Nov 01, 2005; 9:31pm
URL: https://forum.world.st/Can-I-take-stack-trace-tp3376119p3376129.html
Pavel wrote:
> Tnx for reply, that's nice, but what about take image at that moment? May be
> Dolphin VM gives an opportunity to make snapshot image on unhandled
> exception? It would be very useful for analysis of the reason of a error,
> becouse for it need state of objects at that moment.
I'm not sure whether you can (re-)create an image from a deployed exe.
Please keep in mind that nearly everything needed to examine an image
from within is stripped out during the deployment process.
If you do no strip your image it might be worth a try to use
SessionManager>>saveImage (e.g. "SessionManage current saveImage") in an
deployed app .... but I doubt it will work. Even if this works you have
to deal with the non-stripped development code which you are not allowed
to distribute according to OAs license.
Creating crash dumps during runtime is much easier. The follwing was
copied directly from Ghouls documentation:
--->8------>8------>8------>8------>8------>8------>8------>8------>8---
Crash dump files can be created programmatically using:
VMLibrary default crashDump: 'This is a test'.
which will write a crashdump file to the place indicated by the Dolphin
crash dump registry entry. For Dolphin 5.0 and 5.1 this is:
HKEY_LOCAL_MACHINE\SOFTWARE\Object Arts\Dolphin Smalltalk 5.0\CrashDump
which should be set to the name of the target file.
Alternatively you can use:
VMLibrary default
dump: 'this is a test'
path: aFilename
stackDepth: -1
walkbackDepth: -1.
which will write a similar file to aFilename. If aFilename is nil, then
it creates a file called <image-name>.ERRORS in the same directory as
your image file.
--->8------>8------>8------>8------>8------>8------>8------>8------>8---
CU,
Udo