Hi All!
Can I take stack trace for debugging the program if error will araise at users? It is even better to receive the image snapshot at that moment. Is it possible with Dolphin? Pavel. |
Pavel escribió:
> Hi All! > Can I take stack trace for debugging the program if error will araise at > users? It is even better to receive the image snapshot at that moment. Is it > possible with Dolphin? > > Pavel. > > > The Stack is dumped to Professional.ERRORS (in your directory image). If you are working with .EXE then take a look at MyExeFileName.ERRORS (in .EXE directory) Regards Bruno |
Bruno wrote:
> The Stack is dumped to Professional.ERRORS (in your directory image). > > If you are working with .EXE then take a look at MyExeFileName.ERRORS > (in .EXE directory) You can use Ghoul (http://www.metagnostic.org/DolphinSmalltalk/Ghoul.html) to take a look at these files. Ghoul provides a Debugger-like View on these stack traces (w/o interaction with the dead objects of course). CU, Udo |
> Bruno wrote:
> > The Stack is dumped to Professional.ERRORS (in your directory image). > Udo wrote: > > You can use Ghoul > > (http://www.metagnostic.org/DolphinSmalltalk/Ghoul.html) to take a look > > at these files. Ghoul provides a Debugger-like View on these stack > > traces (w/o interaction with the dead objects of course). 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. |
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 |
In reply to this post by Pavel
"Pavel" <[hidden email]> wrote in message
news:4367dcf7$[hidden email]... > >> Bruno wrote: >> > The Stack is dumped to Professional.ERRORS (in your directory image). > >> Udo wrote: >> > You can use Ghoul >> > (http://www.metagnostic.org/DolphinSmalltalk/Ghoul.html) to take a look >> > at these files. Ghoul provides a Debugger-like View on these stack >> > traces (w/o interaction with the dead objects of course). > > 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. Saving the image may be a bit heavy handed and may not be useful for the reasons Udo mentions. However it may be practical to save some relevant objects to a file via STB. You can learn more here http://www.object-arts.com/Lib/EducationCentre4/htm/binaryfilingobjects.htm . You will just need to be careful that your error logging code does not cause further errors. Chris |
Free forum by Nabble | Edit this page |