[Openmcl-devel] How to deal with random Hemlock errors
Ron Garret
ron at flownet.com
Tue Aug 25 09:44:50 PDT 2009
I occasionally (still) get random errors from Hemlock. The last time
this happened I opened a ticket, which was promptly closed with a
comment to the effect that unless the problem could be reliably
reproduced there was no way to fix it. The problem is that Hemlock is
*mostly* reliable nowadays. When these crashes happen it's usually
deep in the bowels of a long hacking session, and God only knows what
the actual cause of the problem was (it may have been something that
happened long before the actual crash). And often the problem
completely kills the environment. So what should I do when these
crashes happen? I don't think simply ignoring them is the right
answer. If CCL is going to gain in popularity these problems
eventually need to get fixed. Having an IDE crash on even just a semi-
regular basis is not widely considered acceptable behavior nowadays.
BTW, I tried to dive into the Hemlock code to fix one of these
problems myself (ticket #570) and got hopelessly lost in a twisty
little maze of macros, all different. (For those of you on this list
who are younger than 40, that's an allusion to one of the puzzles in
the original Crowther and Woods adventure game.) I gather there are
some people on this list who participated in the original development
of Hemlock. If one of you can shed some light on the rationale for
this design and some suggestions for how to debug code written in this
style this humble student would be most grateful.
Just for the record, my latest Hemlock crash output is attached to
this message.
rg
---
Lisp error: "value NIL is not of the expected type REAL."
(442378) : 0 (PRINT-CALL-HISTORY :CONTEXT NIL :PROCESS NIL :ORIGIN
NIL :DETAILED-P T :COUNT 1152921504606846975 :START-FRAME-NUMBER
0 :STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x300041BC2C4D> :PRINT-
LEVEL 2 :PRINT-LENGTH 5 :SHOW-INTERNAL-FRAMES
NIL :FORMAT :TRADITIONAL) 845
(&KEY :CONTEXT :PROCESS :ORIGIN :DETAILED-P :COUNT :START-FRAME-
NUMBER :STREAM :PRINT-LEVEL :PRINT-LENGTH :SHOW-INTERNAL-FRAMES :FORMAT)
CCL::CONTEXT: NIL
PROCESS: NIL
CCL::ORIGIN: NIL
CCL::DETAILED-P: T
COUNT: 1152921504606846975
CCL::START-FRAME-NUMBER: 0
STREAM: #<SYNONYM-STREAM to *TERMINAL-IO* #x300041BC2C4D>
CCL::PRINT-LEVEL: 2
CCL::PRINT-LENGTH: 5
CCL::SHOW-INTERNAL-FRAMES: NIL
FORMAT: :TRADITIONAL
CCL::FRAME-NUMBER: 0
*BACKTRACE-PRINT-LEVEL*: 2
*BACKTRACE-PRINT-LENGTH*: 5
*BACKTRACE-FORMAT*: :TRADITIONAL
COMMON-LISP:*STANDARD-OUTPUT*: #<SYNONYM-STREAM to *TERMINAL-IO*
#x300041BC2C4D>
*PRINT-CIRCLE*: NIL
(4424E0) : 1 (MAYBE-LOG-CALLBACK-ERROR #<TYPE-ERROR #x30004265E5FD>)
1605
(CONDITION)
CONDITION: #<TYPE-ERROR #x30004265E5FD>
GUI::EMSG: "value NIL is not of the expected type REAL."
#:G5569: (ERROR)
CCL::%HANDLERS%: ((ERROR) (ERROR) (CONDITION #) (CONDITION #))
(442538) : 2 (FUNCALL #'#<#<STANDARD-METHOD HEMLOCK-EXT:REPORT-
HEMLOCK-ERROR (HI:HEMLOCK-VIEW T T)>> #<HI:HEMLOCK-VIEW
#x300042631E0D> #<TYPE-ERROR #x30004265E5FD> T) 53
(GUI::VIEW CONDITION GUI::DEBUG-P)
GUI::VIEW: #<HI:HEMLOCK-VIEW #x300042631E0D>
CONDITION: #<TYPE-ERROR #x30004265E5FD>
GUI::DEBUG-P: T
(442568) : 3 (LISP-ERROR-ERROR-HANDLER #<TYPE-ERROR
#x30004265E5FD> :DEBUG-P T) 445
(CONDITION &KEY :DEBUG-P)
CONDITION: #<TYPE-ERROR #x30004265E5FD>
HI::DEBUG-P: T
COMMON-LISP:*STANDARD-OUTPUT*: #<SYNONYM-STREAM to *TERMINAL-IO*
#x300041BC2CCD>
#:G12025: (ERROR)
CCL::%HANDLERS%: ((ERROR) (CONDITION #) (CONDITION #))
(4425D8) : 4 (SIGNAL #<TYPE-ERROR #x30004265E5FD>) 973
(CONDITION &REST CCL::ARGS)
CONDITION: #<TYPE-ERROR #x30004265E5FD>
CCL::ARGS: NIL
CCL::%HANDLERS%: ((CONDITION #) (CONDITION #))
CCL::TAG: (ERROR #<Compiled-function # (Non-Global) #x30004156751F>)
CCL::HANDLERS: (ERROR #<Compiled-function # (Non-Global)
#x30004156751F>)
CCL::FN: #<Compiled-function (:INTERNAL #) (Non-Global)
#x30004156751F>
(442630) : 5 (%ERROR #<TYPE-ERROR #x30004265E5FD> NIL 558302) 117
(CONDITION CCL::ARGS CCL::ERROR-POINTER)
CONDITION: #<TYPE-ERROR #x30004265E5FD>
CCL::ARGS: NIL
CCL::ERROR-POINTER: 558302
(442658) : 6 (FUNCALL #'#<CCL::DEFAULT-REQUIRE-TYPE-RESTARTS> 558302
NIL REAL) 1045
(CCL::FRAME-PTR CCL::VALUE CCL::TYPESPEC)
CCL::FRAME-PTR: 558302
CCL::VALUE: NIL
CCL::TYPESPEC: REAL
CONDITION: #<TYPE-ERROR #x30004265E5FD>
#:USE-VALUE: #<RESTART USE-VALUE #x49359D>
#:G135060: (#<RESTART USE-VALUE #x49359D>)
CCL::%RESTARTS%: ((#<# # #x49359D>) (#<# # #x4936FD>) (#<# #
#x49399D> #<# # #x4939ED>) (#<# # #x493F3D>))
#:G135061: #<TYPE-ERROR #x30004265E5FD>
CCL::*CONDITION-RESTARTS*: ((#<# # #x49359D> . #))
(4426F0) : 7 (>-2 0 NIL) 413
(CCL::X CCL::Y)
CCL::X: 0
CCL::Y: NIL
#:G164212: 0
#:G164215: 3
(442720) : 8 (<=-2 0 NIL) 37
(CCL::X CCL::Y)
CCL::X: 0
CCL::Y: NIL
(442740) : 9 (COPY-LINE-CHARPROPS #<Hemlock Line "? (let ((*standard-
output* nil))"> :START 2 :END 2) 1149
(HI:LINE &KEY :START :END)
HI:LINE: #<Hemlock Line "? (let ((*standard-output* nil))">
HI::START: 2
HI::END: 2
HI::CHANGES: #(#S(HI::CHARPROPS-CHANGE :INDEX 2 :PLIST #))
HI::NEW-CHANGES: #()
HI::START-IDX: 0
HI::END-IDX: NIL
HI::I: 0
(4427B0) : 10 (COPY-REGION #<Hemlock Region "(let ((*standard-
output* nil))/(print "If you can see this something is wrong")/t)">)
1549
(HEMLOCK-INTERFACE:REGION)
HEMLOCK-INTERFACE:REGION: #<Hemlock Region "(let ((*standard-
output* nil))/(print "If you can see this something is wrong")/t)">
HI::START: #<Hemlock Mark "? ^(let ((*standard-output* nil))">
HI::END: #<Hemlock Mark "t)^">
HI::FIRST-LINE: #<Hemlock Line "? (let ((*standard-output* nil))">
HI::LAST-LINE: #<Hemlock Line "t)">
HI::FIRST-CHARPOS: 2
HI::LAST-CHARPOS: 2
COUNT: 1148
HI::FIRST-CHARS: "? (let ((*standard-output* nil))"
LENGTH: 30
HI::CHARS: "(let ((*standard-output* nil))"
HI::FIRST-COPIED-LINE: #<Hemlock Line "(let ((*standard-output*
nil))">
(442838) : 11 (INPUT-REGION-CONTAINING-MARK #<Hemlock Mark "t)^">
((#) (#) (# . #) (#))) 309
(HEMLOCK::M HEMLOCK::HISTORY-LIST)
HEMLOCK::M: #<Hemlock Mark "t)^">
HEMLOCK::HISTORY-LIST: ((#) (#) (# . #) (#))
#:G21840: ((#) (# . #) (#))
HEMLOCK::PAIR: (#<Hemlock Region "(let ((*standard-output* nil))/
(print "If you can see this something is wrong")/t)">)
HEMLOCK::ACTUAL: #<Hemlock Region "(let ((*standard-output* nil))/
(print "If you can see this something is wrong")/t)">
HEMLOCK::START: #<Hemlock Mark "? ^(let ((*standard-output* nil))">
HEMLOCK::END: #<Hemlock Mark "t)^">
(442880) : 12 (CONFIRM-LISTENER-INPUT-COMMAND NIL) 445
(HEMLOCK::P)
HEMLOCK::P: NIL
(4428A0) : 13 (FUNCALL #'#<#<STANDARD-METHOD HI::EXECUTE-HEMLOCK-KEY
(HI:HEMLOCK-VIEW T)>> #<HI:HEMLOCK-VIEW #x300042631E0D> #<Key-Event
Return>) 1061
(HI::VIEW HI::KEY)
HI::VIEW: #<HI:HEMLOCK-VIEW #x300042631E0D>
HI::KEY: #<Key-Event Return>
HI::*SAVED-STANDARD-OUTPUT*: #<SYNONYM-STREAM to *TERMINAL-IO*
#x300041BC2CCD>
COMMON-LISP:*STANDARD-OUTPUT*: #<GUI::COCOA-LISTENER-OUTPUT-STREAM
#x3000426319BD>
HI::MAIN-BINDING: #<Hemlock Command "Confirm Listener Input">
HI::TRANSPARENT-BINDINGS: NIL
HI::*LAST-LAST-COMMAND-TYPE*: NIL
HI::*LAST-PREFIX-ARGUMENT*: NIL
(442948) : 14 (FUNCALL #'#<(:INTERNAL (HI::HANDLE-HEMLOCK-EVENT
(HI:HEMLOCK-VIEW T)))>) 517
NIL
#:G12196: #<RESTART HI::EXIT-EVENT-HANDLER #x4936FD>
#:G12192: (#<RESTART HI::EXIT-EVENT-HANDLER #x4936FD>)
CCL::%RESTARTS%: ((#<# # #x4936FD>) (#<# # #x49399D> #<# #
#x4939ED>) (#<# # #x493F3D>))
#:G12197: #<Compiled-function (:INTERNAL #) (Non-Global)
#x30004156751F>
#:G12198: (ERROR #<Compiled-function # (Non-Global) #x30004156751F>)
CCL::%HANDLERS%: ((ERROR #) (CONDITION #) (CONDITION #))
HI::KEY: #<Key-Event Return>
HI::VIEW: #<HI:HEMLOCK-VIEW #x300042631E0D>
(4429C0) : 15 (INVOKE-MODIFYING-BUFFER-STORAGE #<Hemlock Buffer
"Listener"> #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x30004265E95F>)
445
(GUI::BUFFER GUI::THUNK)
GUI::BUFFER: #<Hemlock Buffer "Listener">
GUI::THUNK: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x30004265E95F>
GUI::OLD: NIL
(442A20) : 16 (FUNCALL #'#<#<STANDARD-METHOD HI::HANDLE-HEMLOCK-
EVENT (HI:HEMLOCK-VIEW T)>> #<HI:HEMLOCK-VIEW #x300042631E0D> #<Key-
Event Return>) 893
(HI::VIEW HI::KEY)
HI::VIEW: #<HI:HEMLOCK-VIEW #x300042631E0D>
HI::KEY: #<Key-Event Return>
#:ABORT-BREAK: #<RESTART ABORT-BREAK #x4939ED>
#:ABORT: #<RESTART ABORT #x49399D>
#:G12189: (#<RESTART ABORT #x49399D> #<RESTART ABORT-BREAK #x4939ED>)
CCL::%RESTARTS%: ((#<# # #x49399D> #<# # #x4939ED>) (#<# #
#x493F3D>))
HI::*CURRENT-VIEW*: #<HI:HEMLOCK-VIEW #x300042631E0D>
HI::*CURRENT-BUFFER*: #<Hemlock Buffer "Listener">
HI::*NEXT-VIEW-START*: NIL
HI::TEXT-BUFFER: #<Hemlock Buffer "Listener">
MOD: (3788 998 . 998)
(442AD8) : 17 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD HI::HANDLE-
HEMLOCK-EVENT #> . 558467)) 1005
(CCL::MAGIC &REST CCL::ARGS)
CCL::MAGIC: (NIL #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT #> .
558467)
CCL::ARGS: NIL
CCL::NEXT-METHODS: (#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT #>)
CCL::ARGS: 558467
CDR: NIL
METHOD-FUNCTION: #<METHOD-FUNCTION HI::HANDLE-HEMLOCK-EVENT
(HI:HEMLOCK-VIEW T)>
(442B58) : 18 (FUNCALL #'#<#<STANDARD-METHOD HI::HANDLE-HEMLOCK-
EVENT :AROUND (HI:HEMLOCK-VIEW T)>> #<HI:HEMLOCK-VIEW #x300042631E0D>
#<Key-Event Return>) 173
(GUI::VIEW GUI::EVENT)
GUI::VIEW: #<HI:HEMLOCK-VIEW #x300042631E0D>
GUI::EVENT: #<Key-Event Return>
#:NEXT-METHOD-CONTEXT: (NIL #<STANDARD-METHOD HI::HANDLE-HEMLOCK-
EVENT #> . 558467)
#:G26686: #<NS-AUTORELEASE-POOL <NSAutoreleasePool: 0xa8ac8a0>
(#xA8AC8A0)>
(442BC0) : 19 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD
HI::HANDLE-HEMLOCK-EVENT :AROUND #> #<STANDARD-METHOD HI::HANDLE-
HEMLOCK-EVENT #>) 558467) 693
(CCL::METHODS CCL::ARGS)
CCL::METHODS: (#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT :AROUND
#> #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT #>)
CCL::ARGS: 558467
CCL::CAR-METHS: #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT :AROUND
(HI:HEMLOCK-VIEW T)>
CCL::CELL-2: (#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT #> . 558467)
CCL::MAGIC: (NIL #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT #> .
558467)
#:G103037: #<METHOD-FUNCTION HI::HANDLE-HEMLOCK-EVENT :AROUND
(HI:HEMLOCK-VIEW T)>
(442C30) : 20 (FUNCALL #'#<GUI::|-[HemlockTextstorageTextView
keyDown:]|> 17591849975328) 1253
(#:G26652)
#:G26652: 17591849975328
#:G26667: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFF100>
#:G26653: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFF100>
#:COMPILER-VAR: (NIL)
#:G26657: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-
[HemlockTextstorageTextView keyDown:]|) #x493BDF>
#:G26668: (CONDITION #<COMPILED-LEXICAL-CLOSURE # #x493BDF>)
CCL::%HANDLERS%: ((CONDITION #) (CONDITION #))
GUI::SELF: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0xb400290>
Frame = {{0.00, 0.00}, {592.00, 910.00}}, Bounds = {{0.00, 0.00},
{592.00, 910.00}}
Horizontally resizable: NO, Vertically resizable: YES
MinSize = {592.00, 910.00}, MaxSize = {10000000.00, 10000000.00}
(#xB400290)>
GUI::EVENT: #<NS-EVENT NSEvent: type=KeyDown loc=(0,962)
time=550133.4 flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>
GUI::VIEW: #<HI:HEMLOCK-VIEW #x300042631E0D>
GUI::QUOTE-P: NIL
GUI::HEMLOCK-KEY: #<Key-Event Return>
(442CB0) : 21 (%PASCAL-FUNCTIONS% 73 17591849975328) 365
(CCL::INDEX CCL::ARGS-PTR-FIXNUM)
CCL::INDEX: 73
CCL::ARGS-PTR-FIXNUM: 17591849975328
CCL::LISP-FUNCTION: #<Compiled-function GUI::|-
[HemlockTextstorageTextView keyDown:]| (Non-Global) #x3000417F58CF>
WITHOUT-INTERRUPTS: NIL
CCL::*CALLBACK-TRACE-P*: NIL
(442D70) : 22 (FUNCALL #'#<Anonymous Function #x30004142838F> #<A
Foreign Pointer [stack-allocated] (:* #) #x7FFF5FBFF5B0> #<A Foreign
Pointer #x7FFF830E7D48> #<NS-EVENT NSEvent: type=KeyDown loc=(0,962)
time=550133.4 flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>) 365
(#:G4925 #:G4926 CCL::ARG0)
#:G4925: #<A Foreign Pointer [stack-allocated] (:* #)
#x7FFF5FBFF5B0>
#:G4926: #<A Foreign Pointer #x7FFF830E7D48>
CCL::ARG0: #<NS-EVENT NSEvent: type=KeyDown loc=(0,962)
time=550133.4 flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>
(442D98) : 23 (%CALL-NEXT-OBJC-METHOD #<LISP-APPLICATION
<LispApplication: 0x1cb380> (#x1CB380)> #<OBJC:OBJC-CLASS GUI::LISP-
APPLICATION (#x1342F0)> #<A Foreign Pointer #x7FFF830E7D48>
(:VOID :ID) #<NS-EVENT NSEvent: type=KeyDown loc=(0,962) time=550133.4
flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>) 773
(CCL::SELF CLASS CCL::SELECTOR CCL::SIG &REST CCL::ARGS)
CCL::SELF: #<LISP-APPLICATION <LispApplication: 0x1cb380>
(#x1CB380)>
CLASS: #<OBJC:OBJC-CLASS GUI::LISP-APPLICATION (#x1342F0)>
CCL::SELECTOR: #<A Foreign Pointer #x7FFF830E7D48>
CCL::SIG: (:VOID :ID)
CCL::ARGS: (#<NS-EVENT NSEvent: type=KeyDown loc=(0,962)
time=550133.4 flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>)
CCL::S: #<A Foreign Pointer [stack-allocated] (:* #) #x7FFF5FBFF5B0>
CCL::SIGINFO: #S(CCL::OBJC-METHOD-SIGNATURE-INFO :TYPE-SIGNATURE
(:VOID :ID) :FUNCTION #<Anonymous Function #x3000414286FF> ...)
FUNCTION: #<Anonymous Function #x30004142838F>
(442DF8) : 24 (FUNCALL #'#<GUI::|-[LispApplication sendEvent:]|>
17591849975520) 965
(#:G5747)
#:G5747: 17591849975520
#:G5762: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFF700>
#:G5748: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFF700>
#:COMPILER-VAR: (NIL)
#:G5752: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-
[LispApplication sendEvent:]|) #x493D6F>
#:G5763: (CONDITION #<COMPILED-LEXICAL-CLOSURE # #x493D6F>)
CCL::%HANDLERS%: ((CONDITION #))
GUI::SELF: #<LISP-APPLICATION <LispApplication: 0x1cb380> (#x1CB380)>
GUI::E: #<NS-EVENT NSEvent: type=KeyDown loc=(0,962) time=550133.4
flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>
CCL::ARGS: (#<NS-EVENT NSEvent: type=KeyDown loc=(0,962)
time=550133.4 flags=0x100 win=0x0 winNum=8455 ctxt=0x0 chars="
" unmodchars="
" repeat=0 keyCode=36 (#xC328E60)>)
(442E68) : 25 (%PASCAL-FUNCTIONS% 15 17591849975520) 365
(CCL::INDEX CCL::ARGS-PTR-FIXNUM)
CCL::INDEX: 15
CCL::ARGS-PTR-FIXNUM: 17591849975520
CCL::LISP-FUNCTION: #<Compiled-function GUI::|-[LispApplication
sendEvent:]| (Non-Global) #x300041474DAF>
WITHOUT-INTERRUPTS: NIL
CCL::*CALLBACK-TRACE-P*: NIL
(442F28) : 26 (FUNCALL #'#<Anonymous Function #x30004138379F> #<LISP-
APPLICATION <LispApplication: 0x1cb380> (#x1CB380)> #S(CCL::OBJC-
SELECTOR :NAME "run" :%SEL #<A Foreign Pointer #x7FFF8319ED68>)) 173
(#:G3175 #:G3176)
#:G3175: #<LISP-APPLICATION <LispApplication: 0x1cb380> (#x1CB380)>
#:G3176: #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<A Foreign
Pointer #x7FFF8319ED68>)
(442F48) : 27 (FUNCALL #'#<(:INTERNAL CCL::SEND-UNAMBIGUOUS-MESSAGE
(SHARED-INITIALIZE :AFTER (CCL::OBJC-DISPATCH-FUNCTION T)))> #<LISP-
APPLICATION <LispApplication: 0x1cb380> (#x1CB380)>) 485
(CCL::RECEIVER &REST CCL::ARGS)
CCL::RECEIVER: #<LISP-APPLICATION <LispApplication: 0x1cb380>
(#x1CB380)>
CCL::ARGS: NIL
CCL::SELECTOR: #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<A Foreign
Pointer #x7FFF8319ED68>)
FUNCTION: #<Anonymous Function #x30004138379F>
(442F88) : 28 (EVENT-LOOP NIL) 989
(&OPTIONAL GUI::END-TEST)
GUI::END-TEST: NIL
GUI::APP: #<LISP-APPLICATION <LispApplication: 0x1cb380> (#x1CB380)>
GUI::THREAD: #<APPKIT-PROCESS Initial(0) [Active] #x3000404C3F3D>
#:ABORT: #<RESTART ABORT #x493F3D>
#:G7834: (#<RESTART ABORT #x493F3D>)
CCL::%RESTARTS%: ((#<# # #x493F3D>))
More information about the Openmcl-devel
mailing list