Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBCL: (swank:inspect-in-emacs (make-array 5 :element-type nil)) signals an error #740

Open
phoe opened this issue Nov 3, 2022 · 2 comments

Comments

@phoe
Copy link
Contributor

phoe commented Nov 3, 2022

CL-USER> (swank:inspect-in-emacs (make-array 5 :element-type nil))

An attempt to access an array of element-type NIL was made.  Congratulations!
   [Condition of type SB-KERNEL:NIL-ARRAY-ACCESSED-ERROR]
See also:
  Common Lisp Hyperspec, UPGRADED-ARRAY-ELEMENT-TYPE [:function]
  Common Lisp Hyperspec, 15.1.2.1 [:section]
  Common Lisp Hyperspec, 15.1.2.2 [:section]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {101B6E8003}>)

Backtrace:
  0: ((SB-VM::OPTIMIZED-DATA-VECTOR-REF NIL) #<unavailable argument> #<unavailable argument>)
      [No Locals]
  1: ((LABELS SWANK::K :IN SWANK/BACKEND:EMACS-INSPECT) 0 5)
      Locals:
        ARRAY = #<(SIMPLE-ARRAY NIL (5)) {1017B59E8F}>
        SWANK::I = 0
        MAX = 5
  2: ((LAMBDA NIL :IN SWANK/BACKEND:EMACS-INSPECT))
      Locals:
        ARRAY = #<(SIMPLE-ARRAY NIL (5)) {1017B59E8F}>

Kind of a silly issue because arrays of type nil are rare in practice, but I think that Swank should be able to detect the null element type and not try to list the contents in the inspector in that case.

@Enerccio
Copy link

Enerccio commented Feb 5, 2023

that error message LMFAO

@phoe
Copy link
Contributor Author

phoe commented Feb 5, 2023

Clarification: the error message is from the underlying implementation, SBCL, and I am of opinion that this message is too perfect for any bugticket to ever be written about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants