Lisp HUG Maillist Archive

Recursive error formatting

Hi List,

Our application has an error log file, to which we write unhandled errors using the *debugger-hook* global.

But for some errors, printing the condition results in infinite recursion, so the program hangs (until it has run out of memory)

Can this be prevented somehow?

Erik


Failed to create interface #<MIDI::SONG-INTERFACE "unnamed" 236DCD0B> in its process #S(MP:PROCESS :PROCESS-NAME "unnamed" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES 
 #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Stud!
 io" :%PROCESS-PRIORITY 60000000

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Recursive error formatting

Hi Erik,

I am not 100% sure, but I think I dealt with this by setting the *debugger-hook* to nil right after entering my custom hook.


Best,
Cam



On 08 Jul 2015, at 10:48, Erik Ronström <erik.ronstrom@doremir.com> wrote:

> 
> Hi List,
> 
> Our application has an error log file, to which we write unhandled errors using the *debugger-hook* global.
> 
> But for some errors, printing the condition results in infinite recursion, so the program hangs (until it has run out of memory)
> 
> Can this be prevented somehow?
> 
> Erik
> 
> 
> Failed to create interface #<MIDI::SONG-INTERFACE "unnamed" 236DCD0B> in its process #S(MP:PROCESS :PROCESS-NAME "unnamed" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Stud!
> io" :%PROCESS-PRIORITY 60000000
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Recursive error formatting

Hi Erik,

Would it help to wrap an IGNORE-ERRORS form around the condition printing code?

Arthur

---

On Wed, 08 Jul 2015 10:48:18 +0200, Erik Ronström <erik.ronstrom@doremir.com> wrote:

>
> Hi List,
>
> Our application has an error log file, to which we write unhandled errors using the *debugger-hook* global.
>
> But for some errors, printing the condition results in infinite recursion, so the program hangs (until it has run out of memory)
>
> Can this be prevented somehow?
>
> Erik
>
>
> Failed to create interface #<MIDI::SONG-INTERFACE "unnamed" 236DCD0B> in its process #S(MP:PROCESS :PROCESS-NAME "unnamed" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Stud!
>  io" :%PROCESS-PRIORITY 60000000
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
>

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Recursive error formatting

You could prevent it by binding *print-circle* to t when logging errors.
You'll probably need to add :print-circle t to the deliver options as well.

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/


>>>>> On Wed, 8 Jul 2015 10:48:18 +0200, Erik Ronström said:
> 
> Hi List,
> 
> Our application has an error log file, to which we write unhandled errors using the *debugger-hook* global.
> 
> But for some errors, printing the condition results in infinite recursion, so the program hangs (until it has run out of memory)
> 
> Can this be prevented somehow?
> 
> Erik
> 
> 
> Failed to create interface #<MIDI::SONG-INTERFACE "unnamed" 236DCD0B> in its process #S(MP:PROCESS :PROCESS-NAME "unnamed" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000 :PROCESS-LEVEL #S(MP::PROCESS-LEVEL :SIMPLE-PROCESSES NIL :PROCESSES #S(MP:PROCESS :PROCESS-NAME "ScoreCloud Studio" :%PROCESS-PRIORITY 60000000
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:33 UTC