Clozure / ccl

Clozure Common Lisp
http://ccl.clozure.com
Apache License 2.0
855 stars 103 forks source link

Attempted to copy-paste code to list functions in package #320

Closed rob-williamson closed 1 year ago

rob-williamson commented 4 years ago

I don't really know what has gone wrong.

I installed Clozure CL using the Mac App Store on Mac OS X.

Everything went fine with the install. I also installed Quicklisp by hand and was able to use it to quickload "yacc" with no problem.

Then I asked it to quickload "cl-lex". That also seemed to install correctly (I could see it also installed some additional code to handle regular expressions, etc.).

Unfortunately I could not find any documentation on how to use cl-lex. So I found some code to list functions in a package at http://reference-error.org/2015/08/30/common-lisp-finding-all-functions-in-a-package.html.

At the bottom of the web page, there is a a version with "After refactoring, some optimization and error signaling, we have the final version". After pasting that code into Clozure CL, I can no longer run Clozure Common Lisp.

I have tried dragging CCL into the trash and re-installing directly from the Mac App Store.

Nothing seems to be able to get CCL running nicely again.

When I run CCL by double-clicking on the icon, I see "AltConsole" which displays:

Error: #<A Foreign Pointer #x12D0E0> has no slot named GUI::PEER. While executing: #<CCL::STANDARD-KERNEL-METHOD SLOT-MISSING (T T T T)>, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 1 >

Then, if I quit AltConsole, both AltConsole and CCL terminate.

As I mentioned before, I tried dragging the CCL icon into the trash and re-installing fresh using the Mac App Store. Unfortunately nothing seems to be able to get CCL back up and running.

This is basically a fresh install of CCL. Also the computer (MacBook Air) is about 2 weeks old so I don't mind wiping the machine or reinstalling any/all software if that's necessary.

I would love to have CCL running again!

Thank you!

phoe commented 4 years ago

Duplicate of #303

It is interesting to know that it seems to work intermittently and that you were able to run CCL earlier, and only then it broke. Hmmm.

Could you type :b and provide us with a backtrace?

rob-williamson commented 4 years ago

Here is the backtrace.

Error: #<A Foreign Pointer #x1B10820> has no slot named GUI::PEER. While executing: #<CCL::STANDARD-KERNEL-METHOD SLOT-MISSING (T T T T)>, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 1 > :b (74BCF8) : 0 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD SLOT-MISSING (T T T T)>> # #<A Foreign Pointer #x1B10820> GUI::PEER SETF #<ECHO-AREA-VIEW <EchoAreaView: 0x1b15fc0> Frame = {{0.00, 0.00}, {554.00, 15.00}}, Bounds = {{0.00, 0.00}, {554.00, 15.00}} Horizontally resizable: YES, Vertically resizable: NO MinSize = {554.00, 15.00}, MaxSize = {10000000.00, 10000000.00} (#x1B15FC0)>) 93 (74BD30) : 1 (%SLOT-ID-SET-MISSING #<A Foreign Pointer #x1B10820> #<SLOT-ID for GUI::PEER/1448 #x30004079750D> #<ECHO-AREA-VIEW <EchoAreaView: 0x1b15fc0> Frame = {{0.00, 0.00}, {554.00, 15.00}}, Bounds = {{0.00, 0.00}, {554.00, 15.00}} Horizontally resizable: YES, Vertically resizable: NO MinSize = {554.00, 15.00}, MaxSize = {10000000.00, 10000000.00} (#x1B15FC0)>) 101 (74BD58) : 2 (%HEMLOCK-FRAME-FOR-TEXTSTORAGE #<OBJC:OBJC-CLASS GUI::HEMLOCK-FRAME (#x600000C0CC30)> #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Untitled">> (#x6000029203F0)> 80 24 NIL #<NS-COLOR [uninitialized] (#x3E5E966ABC34CA69)> 0) 341 (74BDD0) : 3 (FUNCALL #'#<GUI::|-[HemlockEditorDocument makeWindowControllers]|> 17591615093638) 717 (74BE48) : 4 (%PASCAL-FUNCTIONS% 124 17591615093638) 365 (74BF00) : 5 (FUNCALL #'#<Anonymous Function #x30000105C16F> #<IDE-APPLICATION <IDEApplication: 0x600003514210> (#x600003514210)> #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<NS-NUMBER -100 (#x7FFF7D8756E1)>)) 173 (74BF20) : 6 (FUNCALL #'#<(:OBJC-DISPATCH NEXTSTEP-FUNCTIONS:|run|)> ???) 541 (74BF58) : 7 (EVENT-LOOP NIL) 421 (74BFA8) : 8 (FUNCALL #'#<(:INTERNAL GUI::COCOA-STARTUP GUI::START-COCOA-IDE)>) 1501 1 >

rob-williamson commented 4 years ago

Note that CCL has started running (the icon is visible in the task bar) but has not opened any windows. Also "Force Quit..." claims that CCL is frozen (not responding).

rob-williamson commented 4 years ago

More output has appeared in AltConsole, directly following the "1 >" above:

Error: Reader error: Illegal symbol syntax. While executing: CCL::%PARSE-TOKEN, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 2 > Error: Reader error: Illegal symbol syntax. While executing: CCL::%PARSE-TOKEN, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 3 > Error: Reader error: Illegal symbol syntax. While executing: CCL::%PARSE-TOKEN, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 4 > Error: Reader error: Illegal symbol syntax. While executing: CCL::%PARSE-TOKEN, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 5 > > Error: Unbound variable: ING While executing: CCL::TOPLEVEL-EVAL, in process Initial(0). Type :GO to continue, :POP to abort, :R for a list of available restarts. If continued: Retry getting the value of ING. Type :? for other options. 6 > > Error: Unbound variable: ITEM While executing: CCL::TOPLEVEL-EVAL, in process Initial(0). Type :GO to continue, :POP to abort, :R for a list of available restarts. If continued: Retry getting the value of ITEM. Type :? for other options. 7 > Error: Reader error: Illegal symbol syntax. While executing: CCL::%PARSE-TOKEN, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options. 8 >

phoe commented 4 years ago

(74BD58) : 2 (%HEMLOCK-FRAME-FOR-TEXTSTORAGE #<OBJC:OBJC-CLASS GUI::HEMLOCK-FRAME (#x600000C0CC30)> #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Untitled">> (#x6000029203F0)> 80 24 NIL #<NS-COLOR [uninitialized] (#x3E5E966ABC34CA69)> 0) 341

This function is called at https://github.com/Clozure/ccl/blob/275105afd94706d95ac955178316074931822c42/cocoa-ide/cocoa-listener.lisp#L639

As for the recursive debugger that you enter: WTF? What is going on in there? I can see that the Lisp reader attempted to read ing item as a part of that debugger happening.

Could you :b again?

rob-williamson commented 4 years ago

Here's the backtrace at 8:

8 > :b (747F60) : 0 (%PARSE-TOKEN #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E6E28D> #\e NIL) 1405 (748008) : 1 (%PARSE-EXPRESSION #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E6E28D> #\e NIL) 245 (748060) : 2 (%READ-FORM #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E6E28D> NIL (NIL)) 573 (7480A0) : 3 (READ-INTERNAL #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E6E28D> NIL (NIL) NIL) 253 (748120) : 4 (READ-RECORDING-SOURCE #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOFVAL (NIL) :FILE-NAME NIL :START-OFFSET 0 :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E6E38D> :SAVE-SOURCE-TEXT T) 453 (7481C8) : 5 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM (INPUT-STREAM)>> #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOF-VALUE (NIL) :FILE-NAME NIL :START-OFFSET NIL :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E6E38D>) 373 (748278) : 6 (%%CHECK-KEYWORDS #(1 #(:MAP :START-OFFSET :FILE-NAME :EOF-VALUE) #<METHOD-FUNCTION CCL::READ-TOPLEVEL-FORM #>) 954459) 221 (748308) : 7 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL (#<#>) . 954490)) 845 (748378) : 8 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #> #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #>) 954490) 221 (748400) : 9 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 7 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 1653 (748630) : 10 (RUN-READ-LOOP :BREAK-LEVEL 7 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (748658) : 11 (BREAK-LOOP #<UNBOUND-VARIABLE #x302000E6FB3D> 954681) 2957 (748888) : 12 (BREAK-LOOP-HANDLE-ERROR #<UNBOUND-VARIABLE #x302000E6FB3D> 954681) 1397 (7488F0) : 13 (%ERROR #<UNBOUND-VARIABLE #x302000E6FB3D> NIL 954681) 333 (748918) : 14 (FUNCALL #'#<CCL::%DEFAULT-UNBOUND-VARIABLE-RESTARTS> 954681 ITEM) 1749 (7489C8) : 15 (TOPLEVEL-EVAL ITEM NIL) 693 (748A58) : 16 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 6 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 2269 (748CB0) : 17 (RUN-READ-LOOP :BREAK-LEVEL 6 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (748CD8) : 18 (BREAK-LOOP #<UNBOUND-VARIABLE #x302000E72C2D> 954889) 2957 (748F08) : 19 (BREAK-LOOP-HANDLE-ERROR #<UNBOUND-VARIABLE #x302000E72C2D> 954889) 1397 (748F70) : 20 (%ERROR #<UNBOUND-VARIABLE #x302000E72C2D> NIL 954889) 333 (748F98) : 21 (FUNCALL #'#<CCL::%DEFAULT-UNBOUND-VARIABLE-RESTARTS> 954889 ING) 1749 (749048) : 22 (TOPLEVEL-EVAL ING NIL) 693 (7490D8) : 23 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 5 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 2269 (749330) : 24 (RUN-READ-LOOP :BREAK-LEVEL 5 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (749358) : 25 (BREAK-LOOP #<SIMPLE-ERROR #x302000E7527D> 955075) 2957 (749588) : 26 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #x302000E7527D> 955075) 1397 (7495F0) : 27 (%ERROR #<SIMPLE-ERROR #x302000E7527D> NIL 955075) 333 (749618) : 28 (%PARSE-TOKEN #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7638D> #\U NIL) 1405 (7496C0) : 29 (%PARSE-EXPRESSION #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7638D> #\U NIL) 245 (749718) : 30 (%READ-FORM #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7638D> NIL (NIL)) 573 (749758) : 31 (READ-INTERNAL #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7638D> NIL (NIL) NIL) 253 (7497D8) : 32 (READ-RECORDING-SOURCE #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOFVAL (NIL) :FILE-NAME NIL :START-OFFSET 0 :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E7648D> :SAVE-SOURCE-TEXT T) 453 (749880) : 33 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM (INPUT-STREAM)>> #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOF-VALUE (NIL) :FILE-NAME NIL :START-OFFSET NIL :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E7648D>) 373 (749930) : 34 (%%CHECK-KEYWORDS #(1 #(:MAP :START-OFFSET :FILE-NAME :EOF-VALUE) #<METHOD-FUNCTION CCL::READ-TOPLEVEL-FORM #>) 955186) 221 (7499C0) : 35 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL (#<#>) . 955217)) 845 (749A30) : 36 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #> #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #>) 955217) 221 (749AB8) : 37 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 4 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 1653 (749CE8) : 38 (RUN-READ-LOOP :BREAK-LEVEL 4 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (749D10) : 39 (BREAK-LOOP #<SIMPLE-ERROR #x302000E777AD> 955386) 2957 (749F40) : 40 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #x302000E777AD> 955386) 1397 (749FA8) : 41 (%ERROR #<SIMPLE-ERROR #x302000E777AD> NIL 955386) 333 (749FD0) : 42 (%PARSE-TOKEN #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E788BD> #\U NIL) 1405 (74A078) : 43 (%PARSE-EXPRESSION #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E788BD> #\U NIL) 245 (74A0D0) : 44 (%READ-FORM #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E788BD> NIL (NIL)) 573 (74A110) : 45 (READ-INTERNAL #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E788BD> NIL (NIL) NIL) 253 (74A190) : 46 (READ-RECORDING-SOURCE #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOFVAL (NIL) :FILE-NAME NIL :START-OFFSET 0 :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E789BD> :SAVE-SOURCE-TEXT T) 453 (74A238) : 47 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM (INPUT-STREAM)>> #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOF-VALUE (NIL) :FILE-NAME NIL :START-OFFSET NIL :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E789BD>) 373 (74A2E8) : 48 (%%CHECK-KEYWORDS #(1 #(:MAP :START-OFFSET :FILE-NAME :EOF-VALUE) #<METHOD-FUNCTION CCL::READ-TOPLEVEL-FORM #>) 955497) 221 (74A378) : 49 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL (#<#>) . 955528)) 845 (74A3E8) : 50 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #> #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #>) 955528) 221 (74A470) : 51 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 3 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 1653 (74A6A0) : 52 (RUN-READ-LOOP :BREAK-LEVEL 3 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (74A6C8) : 53 (BREAK-LOOP #<SIMPLE-ERROR #x302000E799ED> 955697) 2957 (74A8F8) : 54 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #x302000E799ED> 955697) 1397 (74A960) : 55 (%ERROR #<SIMPLE-ERROR #x302000E799ED> NIL 955697) 333 (74A988) : 56 (%PARSE-TOKEN #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7AAFD> #\U NIL) 1405 (74AA30) : 57 (%PARSE-EXPRESSION #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7AAFD> #\U NIL) 245 (74AA88) : 58 (%READ-FORM #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7AAFD> NIL (NIL)) 573 (74AAC8) : 59 (READ-INTERNAL #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7AAFD> NIL (NIL) NIL) 253 (74AB48) : 60 (READ-RECORDING-SOURCE #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOFVAL (NIL) :FILE-NAME NIL :START-OFFSET 0 :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E7ABFD> :SAVE-SOURCE-TEXT T) 453 (74ABF0) : 61 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM (INPUT-STREAM)>> #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOF-VALUE (NIL) :FILE-NAME NIL :START-OFFSET NIL :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E7ABFD>) 373 (74ACA0) : 62 (%%CHECK-KEYWORDS #(1 #(:MAP :START-OFFSET :FILE-NAME :EOF-VALUE) #<METHOD-FUNCTION CCL::READ-TOPLEVEL-FORM #>) 955808) 221 (74AD30) : 63 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL (#<#>) . 955839)) 845 (74ADA0) : 64 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #> #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #>) 955839) 221 (74AE28) : 65 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 2 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 1653 (74B058) : 66 (RUN-READ-LOOP :BREAK-LEVEL 2 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (74B080) : 67 (BREAK-LOOP #<SIMPLE-ERROR #x302000E7BC3D> 956008) 2957 (74B2B0) : 68 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #x302000E7BC3D> 956008) 1397 (74B318) : 69 (%ERROR #<SIMPLE-ERROR #x302000E7BC3D> NIL 956008) 333 (74B340) : 70 (%PARSE-TOKEN #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7D49D> #\U NIL) 1405 (74B3E8) : 71 (%PARSE-EXPRESSION #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7D49D> #\U NIL) 245 (74B440) : 72 (%READ-FORM #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7D49D> NIL (NIL)) 573 (74B480) : 73 (READ-INTERNAL #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x302000E7D49D> NIL (NIL) NIL) 253 (74B500) : 74 (READ-RECORDING-SOURCE #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOFVAL (NIL) :FILE-NAME NIL :START-OFFSET 0 :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E4486D> :SAVE-SOURCE-TEXT T) 453 (74B5A8) : 75 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM (INPUT-STREAM)>> #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (SOCKET/4) #x302000B799AD> :EOF-VALUE (NIL) :FILE-NAME NIL :START-OFFSET NIL :MAP #<HASH-TABLE :TEST EQ size 0/60 #x302000E4486D>) 373 (74B658) : 76 (%%CHECK-KEYWORDS #(1 #(:MAP :START-OFFSET :FILE-NAME :EOF-VALUE) #<METHOD-FUNCTION CCL::READ-TOPLEVEL-FORM #>) 956119) 221 (74B6E8) : 77 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL (#<#>) . 956150)) 845 (74B758) : 78 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #> #<CCL::STANDARD-KERNEL-METHOD CCL::READ-TOPLEVEL-FORM #>) 956150) 221 (74B7E0) : 79 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :BREAK-LEVEL 1 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000052E83F>) 1653 (74BA10) : 80 (RUN-READ-LOOP :BREAK-LEVEL 1 :INPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD> :OUTPUT-STREAM #<SYNONYM-STREAM to TERMINAL-IO #x302000B780FD>) 157 (74BA38) : 81 (BREAK-LOOP #<SIMPLE-ERROR #x302000E4BEBD> 956319) 2957 (74BC68) : 82 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #x302000E4BEBD> 956319) 1397 (74BCD0) : 83 (%ERROR #<SIMPLE-ERROR #x302000E4BEBD> (#<A Foreign Pointer #x1B10820> GUI::PEER) 956319) 333 (74BCF8) : 84 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD SLOT-MISSING (T T T T)>> # #<A Foreign Pointer #x1B10820> GUI::PEER SETF #<ECHO-AREA-VIEW <EchoAreaView: 0x1b15fc0> Frame = {{0.00, 0.00}, {554.00, 15.00}}, Bounds = {{0.00, 0.00}, {554.00, 15.00}} Horizontally resizable: YES, Vertically resizable: NO MinSize = {554.00, 15.00}, MaxSize = {10000000.00, 10000000.00} (#x1B15FC0)>) 93 (74BD30) : 85 (%SLOT-ID-SET-MISSING #<A Foreign Pointer #x1B10820> #<SLOT-ID for GUI::PEER/1448 #x30004079750D> #<ECHO-AREA-VIEW <EchoAreaView: 0x1b15fc0> Frame = {{0.00, 0.00}, {554.00, 15.00}}, Bounds = {{0.00, 0.00}, {554.00, 15.00}} Horizontally resizable: YES, Vertically resizable: NO MinSize = {554.00, 15.00}, MaxSize = {10000000.00, 10000000.00} (#x1B15FC0)>) 101 (74BD58) : 86 (%HEMLOCK-FRAME-FOR-TEXTSTORAGE #<OBJC:OBJC-CLASS GUI::HEMLOCK-FRAME (#x600000C0CC30)> #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Untitled">> (#x6000029203F0)> 80 24 NIL #<NS-COLOR [uninitialized] (#x3E5E966ABC34CA69)> 0) 341 (74BDD0) : 87 (FUNCALL #'#<GUI::|-[HemlockEditorDocument makeWindowControllers]|> 17591615093638) 717 (74BE48) : 88 (%PASCAL-FUNCTIONS% 124 17591615093638) 365 (74BF00) : 89 (FUNCALL #'#<Anonymous Function #x30000105C16F> #<IDE-APPLICATION <IDEApplication: 0x600003514210> (#x600003514210)> #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<NS-NUMBER -100 (#x7FFF7D8756E1)>)) 173 (74BF20) : 90 (FUNCALL #'#<(:OBJC-DISPATCH NEXTSTEP-FUNCTIONS:|run|)> ???) 541 (74BF58) : 91 (EVENT-LOOP NIL) 421 (74BFA8) : 92 (FUNCALL #'#<(:INTERNAL GUI::COCOA-STARTUP GUI::START-COCOA-IDE)>) 1501 8 >

phoe commented 4 years ago

So it tries to read from *terminal-io* and fails majestically at that. I wonder what is the current value of that variable, but that's orthogonal to our bug.

The offending function is at:

https://github.com/Clozure/ccl/blob/275105afd94706d95ac955178316074931822c42/cocoa-ide/cocoa-editor.lisp#L2268-L2295

phoe commented 4 years ago

These lines make use of the peer slot. So there's two possible offenders.

https://github.com/Clozure/ccl/blob/275105afd94706d95ac955178316074931822c42/cocoa-ide/cocoa-editor.lisp#L2277-L2280

echo-area is returned by make-echo-area and should therefore not be a pointer.

However, tv calls text-pane-text-view which seems to return a foreign pointer, and foreign pointers do not have slots, just like the error tells us! See line 1690 below.

https://github.com/Clozure/ccl/blob/275105afd94706d95ac955178316074931822c42/cocoa-ide/cocoa-editor.lisp#L1688-L1693

This seems like the source of the type error that we get, and also explain why it only breaks intermittently - it seems that this code path, for whatever reason, started happening now.

Don't know how to debug this further - I'll defer to @xrme.

xrme commented 4 years ago

The app store version problem you describe is a known issue, and we don't have a solution for it.

If you can build the app from source on your own system, it will work. See https://github.com/Clozure/ccl/releases/tag/v1.12

The simplest possible thing you could do would be to download ccl-1.12-darwinx86.tar.gz and unpack it. Go into the ccl directory, and then run ./dx86cl64 and evaluate (require 'cocoa-application). This will build Clozure CL64.app, which you can then double-click and use.

You have to build it on the system you want to run it on. It won't work to copy it to a system running a different version of the operating system.

phoe commented 4 years ago

@xrme What's the technical reason for that error and why is it unfixable? It seems like a type error in the source for me since you attempt to get the slot value of a pointer, but I might be ignorant in how the Cocoa IDE works.

rob-williamson commented 4 years ago

Confirmed.

After downloading ccl-1.12-darwinx86.tar.gz and running ./dx86cl64 and then evaluating (require 'cocoa-application) I now have an icon I can double-click and CCL starts running.

When I type in the following defun, I don't as yet see any problems.

(defun all-function-symbols (package-name) "Retrieves all function symbols from a package." (declare ((or package string symbol) package-name)) (the list (let ((lst (list)) (package (find-package package-name))) (cond (package (do-all-symbols (symb package) (when (and (fboundp symb) (eql (symbol-package symb) package)) (push symb lst))) lst) (t (error "~S does not designate a package" package-name))))))

I can then type: (all-function-symbols 'cl-lex)

I see: (CL-LEX::WITH-GENSYMS CL-LEX:STREAM-LEXER CL-LEX:DEFINE-STRING-LEXER)

Thanks.

Can I drag the CCL icon to my "Applications" folder, or does it need to stay in the temporary directory I used for compiling it?

svspire commented 4 years ago

You can drag it to your Applications folder.

svspire commented 4 years ago

@xrme What's the technical reason for that error and why is it unfixable? It seems like a type error in the source for me since you attempt to get the slot value of a pointer, but I might be ignorant in how the Cocoa IDE works.

It's a MACPTR not getting tagged correctly for its ObjC class. Almost certainly related to #299. Why this is happening is still a mystery. I already made a code correction to ObjC tagging therein but it doesn't seem to be the root of this particular tagging problem.

xrme commented 1 year ago

The Mac App Store version of CCL is broken, and has been removed from the store.

Building a local copy of the app with (require 'cocoa-application) is the way to go.