medley icon indicating copy to clipboard operation
medley copied to clipboard

CLOS Method Browser throws "Help! Shouldn't Happen" error on selection.

Open RyanBurnside opened this issue 4 months ago • 3 comments

Describe the bug When viewing the CLOS class Method browser, left clicking a listed method bring up an error.

To Reproduce Steps to reproduce the behavior:

  1. Started with full environment
  2. Pasted in attached RBVEC.TXT (See attched) RBVEC.TXT
  3. Upon navigating to the RBVEC package and viewing the V3 class, the browser has errors when browsing methods. (See screenshot)

Expected behavior I would have expected some viewer or SEdit to open the selected method.

Screenshots Image

Context (please complete the following information):

  • Are you using online.interlisp.org? [no]

  • OS: [Linux - Kubuntu 24.04]

  • OS Version: [Kubuntu 24.04]

  • Display/window system: [X11 - KDE]

  • Host arch: [x86_64]

  • Maiko version: [not sure]

: [ date ] or (il:print-lisp-information)`: copy-paste or screenshot this

Image

Additional context Add any other context about the problem here.

RyanBurnside avatar Sep 05 '25 07:09 RyanBurnside

I can reproduce the issue, here is a backtrace:

MOUSE/24(debug)BTV
   IL:MESS1 "Shouldn't happen:"
   IL:MESS2 NIL
XCL:HELP
   IL:MESS NIL
IL:SHOULDNT
IL:\ATOMCELL
SYMBOL-PACKAGE
CLOS-BROWSER::EDIT
FUNCALL
(FUNCALL CLOS-BROWSER::OPERATION CLOS-BROWSER::METHOD)
IL:\EVAL-PROGN
CL::interpret-COND
(COND (& NIL) (& &) (& &) (& &) (T &))
IL:\EVAL-PROGN
   CL::\NEW-ENV #<Lexical Environment @ 166,120240>
   CL::\BODY ((CASE CLOS-BROWSER::OPERATION & & & & &))
CL::interpret-LET
(LET (&) (CASE CLOS-BROWSER::OPERATION & & & & &))
CL::interpret-IF
(IF (NULL CLOS-BROWSER::METHOD) (COND & & &) (LET & &))
IL:\EVAL-PROGN
   CL::\NEW-ENV #<Lexical Environment @ 166,120220>
   CL::\BODY ((IF & & &))
CL::interpret-LET
(LET (& &) (IF & & &))
   IL:\FN-NAME (LAMBDA (CLOS-BROWSER::MENU-ITEM IGNORE 
CLOS-BROWSER::MOUSE-KEY) (LET & &))
   IL:\ARGTYPE IL:&REQUIRED
   IL:\ARGLIST NIL
   IL:\SPECIALS NIL
   IL:\ENVIRONMENT #<Lexical Environment @ 166,120210>
   IL:\BODY (LET (& &) (IF & & &))
   IL:\ARGUMENT-BLOCK {}#1,31604
   IL:\LENGTH 3
   IL:\INDEX 3
   IL:\SVAR NIL
   IL:\SP NIL
IL:\INTERPRET-ARGUMENTS
IL:\INTERPRETER-LAMBDA
(LAMBDA (CLOS-BROWSER::MENU-ITEM IGNORE CLOS-BROWSER::MOUSE-KEY) (LET & &))
   IL:MENU {IL:MENU}#122,21464
   IL:ITEM ((SETF X) #<Standard-Method (SETF X) (T V3) 123,127170> 
"Left button to edit the method.%
Middle button provides a menu of operations.")
   IL:BUTTON IL:LEFT
IL:DOSELECTEDITEM
   IL:MENU {IL:MENU}#122,21464
   IL:RELEASECONTROLFLG NIL
   IL:NESTEDFLG NIL
   IL:IMAGE {IL:WINDOW}#122,22074
   IL:DSP #<Output Display Stream/122,100>
IL:MENU
   *PACKAGE* #<Package RBVEC>
CLOS::|(METHOD CLOS-BROWSER::MENU-METHODS (CLOS-BROWSER::CLOS-BROWSER-NODE))|
APPLY
CLOS::INITIAL-DFUN
"lambda in MAKE-INITIAL-DFUN"
APPLY
   CLOS::*INVALID-DFUNS-ON-STACK* (#<Standard-Generic-Function CLOS-BROWSER::MENU-METHODS (1) 125,152724> #<Standard-Generic-Function WEB::DO-SELECTED-COMMAND (1) 123,152140> #<Standard-Generic-Function WEB::MIDDLE-SELECTION (1) 124,43750> #<Standard-Generic-Function WEB::BUTTON-EVENT-FN (1) 124,43140>)
CLOS::INVALID-DFUN
"lambda in INVALIDATE-DFUN-INTERNAL"
APPLY
CLOS::|(METHOD WEB::DO-SELECTED-COMMAND (WEB:WEB-EDITOR T T))|
APPLY
CLOS::INITIAL-DFUN
"lambda in MAKE-INITIAL-DFUN"
APPLY
   CLOS::*INVALID-DFUNS-ON-STACK* (#<Standard-Generic-Function WEB::DO-SELECTED-COMMAND (1) 123,152140> #<Standard-Generic-Function WEB::MIDDLE-SELECTION (1) 124,43750>
 #<Standard-Generic-Function WEB::BUTTON-EVENT-FN (1) 124,43140>)
CLOS::INVALID-DFUN
"lambda in INVALIDATE-DFUN-INTERNAL"
   WEB:WEB-EDITOR #<CLOS-BROWSER:CLOS-BROWSER 122,4760>
   WEB::OBJECT #<CLOS-BROWSER::CLOS-BROWSER-NODE 122,4700>
CLOS::|(METHOD WEB::MIDDLE-SELECTION (WEB:WEB-EDITOR))|
APPLY
CLOS::INITIAL-DFUN
"lambda in MAKE-INITIAL-DFUN"
APPLY
   CLOS::*INVALID-DFUNS-ON-STACK* (#<Standard-Generic-Function WEB::MIDDLE-SELECTION (1) 124,43750> #<Standard-Generic-Function WEB::BUTTON-EVENT-FN (1) 124,43140>)
CLOS::INVALID-DFUN
"lambda in INVALIDATE-DFUN-INTERNAL"
   SI::*CATCH-RETURN-TO* (& &)
   IL:*PROCEED-CASES* (& &)
   SI::*NLSETQFLAG* NIL
   SI::*CATCH-RETURN-PC* 666
CLOS::|(METHOD WEB::BUTTON-EVENT-FN (WEB:WEB-EDITOR))|
APPLY
CLOS::INITIAL-DFUN
"lambda in MAKE-INITIAL-DFUN"
APPLY
   CLOS::*INVALID-DFUNS-ON-STACK* (#<Standard-Generic-Function WEB::BUTTON-EVENT-FN (1) 124,43140>)
CLOS::INVALID-DFUN
"lambda in INVALIDATE-DFUN-INTERNAL"
   WEB::WINDOW-FOR-MENU #<CLOS-BROWSER:CLOS-BROWSER 122,4760>
WEB::WEB-WINDOW-BUTTON-EVENT-FN
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
IL:\PROTECTED.APPLYA0001
   IL:FN WEB::WEB-WINDOW-BUTTON-EVENT-FN
   IL:WINDOW {IL:WINDOW}#122,22474
   SI::NLSETQ-VALUE NIL
   IL:*PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
IL:\PROTECTED.APPLY
   IL:\MHCOM WEB::WEB-WINDOW-BUTTON-EVENT-FN
   IL:\MHPROCESS NIL
   IL:\MHWINDOW {IL:WINDOW}#122,22474
   IL:\MOUSEBUSY T
IL:WINDOW.MOUSE.HANDLER
   IL:\OLDTTY #<Process EXEC#2/174,12000>
   IL:\MOUSEBUSY NIL
IL:\MOUSE.PROCESS
   IL:*FORM* (IL:\MOUSE.PROCESS)
   IL:*ARGVAL* NIL
   IL:*TAIL* NIL
   IL:*FN* IL:\MOUSE.PROCESS
IL:\EVALFORM
   IL:%#FORM# (IL:\MOUSE.PROCESS)
   IL:*CURRENT-PROCESS* #<Process OLDMOUSE/174,12410>
   IL:HELPFLAG IL:BREAK!
   IL:\CURRENTDISPLAYLINE 0
   IL:\#DISPLAYLINES 12
   IL:\LINEBUF.OFD #<IO Linebuffer Stream/146,30500>
   *READTABLE* #<ReadTable INTERLISP/174,55714>
   IL:\PRIMTERMTABLE {IL:TERMTABLEP}#174,50740
   IL:\PRIMTERMSA {IL:CHARTABLE}#174,51000
   IL:TtyDisplayStream 
#<Output Display Stream/122,200>
   SI::*RESETFORMS* NIL
   IL:\INTERRUPTABLE T
   IL:\TTYWINDOW {IL:WINDOW}#122,22264
   IL:READBUF NIL
   IL:\TERM.OFD #<Output Display Stream/146,30100>
   *STANDARD-OUTPUT* #<Output Display Stream/146,30100>
   *STANDARD-INPUT* #<IO Linebuffer Stream/146,30500>
IL:\MAKE.PROCESS0
T

However, I get the error only for the SETF methods whereas I can browse the others. I don't know whether it's relevant but Medley Common Lisp supports DEFSETF and not DEFINE-SETF-EXPANDER.

pamoroso avatar Oct 04 '25 11:10 pamoroso

It turns out that SETF methods were a later feature of CLOS. I believe they work due to the CLOS implementers guessing the right future feature but the inspector has trouble with them. Hopefully I recalled our findings correctly. @masinter would know best.

RyanBurnside avatar Oct 09 '25 05:10 RyanBurnside

I wasn't trcking CLOS or its Medley / Interlisp implementation, so I'm pretty clueless. @anzus or @BobBane4IL might have more of a clue.

masinter avatar Oct 10 '25 04:10 masinter