<div dir="ltr">I managed to grab c stack (on linux anyways) which is nice, but not that very revealing for any bytecoded functions...<br><br>Unhandled error detected: <br>something went hairy<br>Backtrace: <br><br>C stack: <br>
/media/home/home/enerccio/<div dir="ltr">projects/gaia/gaia/Debug/gaia(c_stack+0x62) [0x4024ae]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x2a26) [0x7fe16cfc3a26]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x26d7) [0x7fe16cfc36d7]<br>
/usr/lib/libecl.so.12.12(+0x12eb99) [0x7fe170954b99]<br>/usr/lib/libecl.so.12.12(+0x12ed88) [0x7fe170954d88]<br>/usr/lib/libecl.so.12.12(cl_funcall+0x78) [0x7fe17098f9e8]<br>/usr/lib/libecl.so.12.12(cl_error+0xd6) [0x7fe1709b0406]<br>
/usr/lib/libecl.so.12.12(ecl_interpret+0x1cad) [0x7fe1709921bd]<br>/usr/lib/libecl.so.12.12(ecl_interpret+0x1ece) [0x7fe1709923de]<br>/usr/lib/libecl.so.12.12(+0x17118f) [0x7fe17099718f]<br>/usr/lib/libecl.so.12.12(si_eval_with_env+0x2eb) [0x7fe170998d3b]<br>
/usr/lib/libecl.so.12.12(si_load_source+0x191) [0x7fe1709e7e41]<br>/usr/lib/libecl.so.12.12(cl_funcall+0x78) [0x7fe17098f9e8]<br>/usr/lib/libecl.so.12.12(cl_load+0x46d) [0x7fe1709e86bd]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x2ced) [0x7fe16cfc3ced]<br>
/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x30ee) [0x7fe16cfc40ee]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(init_fas_CODE+0xc35) [0x7fe16cfc5ca5]<br>/usr/lib/libecl.so.12.12(ecl_init_module+0x409) [0x7fe1709acbb9]<br>
/usr/lib/libecl.so.12.12(si_load_binary+0x9a) [0x7fe1709e7b7a]<br>/usr/lib/libecl.so.12.12(cl_funcall+0x78) [0x7fe17098f9e8]<br>/usr/lib/libecl.so.12.12(cl_load+0x46d) [0x7fe1709e86bd]<br>/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia(init_common_lisp_subsystem+0xa0) [0x40243a]<br>
/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia(main+0x2a) [0x40226e]<br>/usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fe16fabd725]<br>/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia() [0x4019f9]<div class="">
<div id=":2fa" class="" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/31 Peter Enerccio <span dir="ltr"><<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I managed to grab c stack (on linux anyways) which is nice, but not that very revealing for any bytecoded functions...<br>
<br>Unhandled error detected: <br>something went hairy<br>Backtrace: <br><br>C stack: <br>
/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia(c_stack+0x62) [0x4024ae]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x2a26) [0x7fe16cfc3a26]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x26d7) [0x7fe16cfc36d7]<br>
/usr/lib/libecl.so.12.12(+0x12eb99) [0x7fe170954b99]<br>/usr/lib/libecl.so.12.12(+0x12ed88) [0x7fe170954d88]<br>/usr/lib/libecl.so.12.12(cl_funcall+0x78) [0x7fe17098f9e8]<br>/usr/lib/libecl.so.12.12(cl_error+0xd6) [0x7fe1709b0406]<br>
/usr/lib/libecl.so.12.12(ecl_interpret+0x1cad) [0x7fe1709921bd]<br>/usr/lib/libecl.so.12.12(ecl_interpret+0x1ece) [0x7fe1709923de]<br>/usr/lib/libecl.so.12.12(+0x17118f) [0x7fe17099718f]<br>/usr/lib/libecl.so.12.12(si_eval_with_env+0x2eb) [0x7fe170998d3b]<br>
/usr/lib/libecl.so.12.12(si_load_source+0x191) [0x7fe1709e7e41]<br>/usr/lib/libecl.so.12.12(cl_funcall+0x78) [0x7fe17098f9e8]<br>/usr/lib/libecl.so.12.12(cl_load+0x46d) [0x7fe1709e86bd]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x2ced) [0x7fe16cfc3ced]<br>
/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(+0x30ee) [0x7fe16cfc40ee]<br>/media/home/home/enerccio/projects/gaia/gaia/postinit.fas(init_fas_CODE+0xc35) [0x7fe16cfc5ca5]<br>/usr/lib/libecl.so.12.12(ecl_init_module+0x409) [0x7fe1709acbb9]<br>
/usr/lib/libecl.so.12.12(si_load_binary+0x9a) [0x7fe1709e7b7a]<br>/usr/lib/libecl.so.12.12(cl_funcall+0x78) [0x7fe17098f9e8]<br>/usr/lib/libecl.so.12.12(cl_load+0x46d) [0x7fe1709e86bd]<br>/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia(init_common_lisp_subsystem+0xa0) [0x40243a]<br>
/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia(main+0x2a) [0x40226e]<br>/usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fe16fabd725]<br>/media/home/home/enerccio/projects/gaia/gaia/Debug/gaia() [0x4019f9]<br><br>
</div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/31 Anton Vodonosov <span dir="ltr"><<a href="mailto:avodonosov@yandex.ru" target="_blank">avodonosov@yandex.ru</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Another guess (sorry if I am mistaken).<br>
<br>
Do you run this code from the main REPL thread or from another thread?<br>
<br>
I remember I debugged hunchentoot on ECL and wanted stack trace<br>
of error happened during request handling (hunchentoot runs<br>
request handlers in separate threads).<br>
<br>
As you did, I looked at the ECL backtrace functions used in SLIME<br>
and tried to use them. Stack trace was empty.<br>
<br>
I looked at their source code and have *impression* that<br>
stack trace is only maintained for the REPL thread.<br>
<br>
Juan Jose must know better how stacktraces are implemented.<br>
But if you run from another thread, try from REPL. If you<br>
run from REPL and still doesn't have stacktrace, then<br>
my guess above does not apply.<br>
<br>
Best regards,<br>
- Anton<br>
<br>
30.01.2013, 20:07, "Peter Enerccio" <<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>>:<br>
<div><div>> Well, I am trying to get with handler-bind, however, it still prints nothing at all (for the backtrace, I mean)<br>
><br>
> (defun handle-any-error-log (e)<br>
> (print "x") ; checking that we are indeed in the handler<br>
> (with-open-file (eout "errors.txt"<br>
> :direction :output)<br>
> (format eout "Unhandled error detected: ~%")<br>
> (format eout "~A~%" e)<br>
> (format eout "Backtrace: ~%")<br>
> (loop for x from (si::ihs-top)<br>
> to 0 do<br>
> (format eout "~A~%" (si::ihs-fun x)))<br>
> (format eout "~%")))<br>
><br>
> (eval-when (:load-toplevel :execute)<br>
> (handler-bind<br>
> ((error #'handle-any-error-log))<br>
> (post-initialization)))<br>
><br>
> Output:<br>
><br>
> enerccio@G73Jh-Arch:~/projects/gaia/gaia$ cat errors.txt<br>
> Unhandled error detected:<br>
> LOAD: Could not load file #P"/media/home/home/enerccio/projects/gaia/gaia/plugins/crap.fas" (Error: "/media/home/home/enerccio/projects/gaia/gaia/plugins/crap.fas: file too short")<br>
> Backtrace:<br>
> NIL<br>
><br>
> 2013/1/30 Anton Vodonosov <<a href="mailto:avodonosov@yandex.ru" target="_blank">avodonosov@yandex.ru</a>><br>
>> In CL you usually can't get stack trace "out of condition".<br>
>><br>
>> Usually you can get the current stack trace. I.e. before stack is unwound.<br>
>> I.e. catching error handler-bind you can get stack trace, because you are still<br>
>> inside the stack, but for example with handler-case you are invoked after<br>
>> the stack is unwound.<br>
>><br>
>> PS. also check out trivial-backtrace if you want be portable library, although<br>
>> I don't know if it supports ECL.<br>
>><br>
>> 30.01.2013, 19:49, "Peter Enerccio" <<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>>:<br>
>>> I tried looking it up there, however it uses si::ihs-top/si::ihs-fun, which at the condition handlers are for some reason 0 so there is nothing to do at that point.<br>
>>><br>
>>> 2013/1/30 Stas Boukarev <<a href="mailto:stassats@gmail.com" target="_blank">stassats@gmail.com</a>><br>
>>>> Peter Enerccio <<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>> writes:<br>
>>>><br>
>>>>> Hello, I was wondering if it is possible to get the stack of thrown<br>
>>>>> condition.<br>
>>>>> I dont think there is ansi way of doing that, however, I can see stack<br>
>>>>> generated by conditions thrown in slime with ecl, so there must be a way to<br>
>>>>> do it.<br>
>>>> You can look at swank-ecl.lisp to see how slime does it.<br>
>>>><br>
>>>> --<br>
>>>> With best regards, Stas.<br>
>>><br>
>>> --<br>
>>> Bc. Peter Vaņu¹anik<br>
>>> <a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br>
>><br>
>>> ,<br>
>>> ------------------------------------------------------------------------------<br>
>>> Everyone hates slow websites. So do we.<br>
>>> Make your web apps faster with AppDynamics<br>
>>> Download AppDynamics Lite for free today:<br>
>>> <a href="http://p.sf.net/sfu/appdyn_d2d_jan" target="_blank">http://p.sf.net/sfu/appdyn_d2d_jan</a><br>
>>> ,<br>
>>> _______________________________________________<br>
>>> Ecls-list mailing list<br>
>>> <a href="mailto:Ecls-list@lists.sourceforge.net" target="_blank">Ecls-list@lists.sourceforge.net</a><br>
>>> <a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
><br>
> --<br>
> Bc. Peter Vaņu¹anik<br>
> <a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br>
> ,<br>
> ------------------------------------------------------------------------------<br>
> Everyone hates slow websites. So do we.<br>
> Make your web apps faster with AppDynamics<br>
> Download AppDynamics Lite for free today:<br>
> <a href="http://p.sf.net/sfu/appdyn_d2d_jan" target="_blank">http://p.sf.net/sfu/appdyn_d2d_jan</a><br>
> ,<br>
> _______________________________________________<br>
> Ecls-list mailing list<br>
> <a href="mailto:Ecls-list@lists.sourceforge.net" target="_blank">Ecls-list@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Bc. Peter Vaņu¹anik<br><a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Bc. Peter Vaņu¹anik<br><a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br>
</div>