< Back to IRCAM Forum

Error while deleting instances

Hi Karim, hi OM-ers,
I keep getting this error when I delete an instance (of a musical object, voice, chord or similar) :

This happens randomly at some point, and then I can’t create new instances (or at least I don’t see them), and if I close the main patch I can’t open it anymore. It’s extremely annoying :cry: and it’s there since 6.20 … Any idea ? I cannot send you a buggy example because, as I wrote, it happens randomly …

Dear Mauro,

Can you:

  1. what version of LispWorks you are using ?
  2. What OS are you running (and what CPU) ?
  3. Once the problem occurs, is it possible to a) save the patch b) export it and send it to me?
  4. If possible can you send the backtrace (just click on the ‘Get Backtrace’ button an save the file.
    Does your objects include extras???

Best
K

Hi Karim, I’m on LW7.1 (btw, should I soon switch to 8 ?) I got rid of all the hacks you did for closing the open instances (that you then implemented as part of the regular code in 6.20) and now everything seems to work, so the problem is somewhere here :

(defmethod OpenObjectEditor ((self OMListInstance))
(setf (EditorFrame self) (OpenEditorframe self))
(when (EditorFrame self)
(om-select-window (window (Editorframe self)))))

;done
(defmethod OpenEditorframe ((self OMBoxInstance))
(let ((win (OpenObjectEditor (reference self))))
win
(push win (attached-objs self))
nil))

;A ajouter:
(defmethod close-frame ((self instBoxframe))
“Called when you delete an instboxframe will close listeditor.”
(if (attached-objs (object self))
(om-close-window (car (attached-objs (object self)))))
(setf (frames (object self)) nil))

;;;;;;;

(defmethod OpenObjectEditor ((self OMInstance))
(setf (EditorFrame self) (OpenEditorframe self))
(when (EditorFrame self)
(let ((win (window (Editorframe self))))
(om-select-window win))
(if (frames self)
(push (editorframe (object (car (frames self))))
(attached-editors (om-view-container (om-view-container (car (frames self))))))
)))

those hacks were pretty useful, though …

All the best dear Karim
M.

Dear Mauro,

Sorry, didn’t get it. Is it working as you state, or still hanging? Of course if there are some extra code (patches), it also could be a reason for this problem.
Else if you are running from sources and you are on Monterey (or BIgSur maybe) you will need some LW patches to work this out.

Best
K
PS: Moreover, you will not be able to use 6.20 sources against LW8.0 The actual repository (github) is configured for both now (LW 7/8), and refers to OM version 7.0

Dear Karim,

It works now (after I removed the portion of code that I send in the previous message).

Apart from this (and other minor bugs that I will expose in another thread) OM works smoothly for me on High Sierra and LW 7.1.

Will LW8 also be compatible with High Sierra ?

Best

M.

Cher Mauro,

Ok, sorry, now i understand. Will try to find the problem. I think it is fixable. But can you just tell me if these Score editors were loaded with extras, do they have something other special to give this error? I didn’t have this problem personally while using OM (on linux).

Will try to replicate it and find out. Should be something related to a missing method.
And Thanks a lot for reporting it. Please do send any other ones :slight_smile:

About LW8. I tested it on catalina and it runs with the updated code without any problem. LW8 is compatible with both Intel and M1 processors, so now i will build Om image with LW8 just to be up to date with LW evolution.

Best
K

Hi Karim, the error happens also without extras, so my guess is that there is no relation …

Ok,

If you put again the code and have again the error, please can you send the backtrace report which will be very helpful to fix it. I can’t for the time being replicate it unfortunately.

Best
K

Dear Mauro,

It should be fixed here:
fix1.lisp (269 Bytes)

Just put again all the original code (6.20) and this patch along.

Hope this will work.

BEst
K

merci ! je te dirai si ça marche !

N’hesites pas mon ami!

Bonsoir Karim,
hélas toujours le même problème en essayant d’effacer une instance “sound”. Voici le backtrace (je suis bien sur OM7) :

==========================================
Backtrace taken at: 17 Apr 2022 21:23:00

#<The OpenMusic package, 14139/16384 internal, 455/1024 external>
#<mp:process Name “Cocoa Event Loop” Priority 70000000 State “Running”>

Condition: No applicable methods for #<standard-generic-function capi-internals:capi-object-plist 40F06E6F84> with args ((#<soundeditor 4131A20A5B>))

Call to ERROR {offset 123}
SYSTEM::ESTRING : “No applicable methods for ~S with args ~S”
SYSTEM::EARGS : (#<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:CAPI-OBJECT-PLIST 40F06E6F84> ((#<SOUNDEDITOR 4131A20A5B>)))

Catch frame: (CERROR . RESTART-CASE)

Catch frame: (CERROR . 1)

Call to CERROR {offset 597}
CONDITIONS::CONTINUE-STRING {Closing} : “Call ~S again”
CONDITIONS::DATUM : “No applicable methods for ~S with args ~S”
CONDITIONS::ARGUMENTS {Closing} : (#<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:CAPI-OBJECT-PLIST 40F06E6F84> ((#<SOUNDEDITOR 4131A20A5B>)))

Call to (METHOD NO-APPLICABLE-METHOD (T)) {offset 54}
CLOS::GF : #<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:CAPI-OBJECT-PLIST 40F06E6F84>
CLOS::ARGS : ((#<SOUNDEDITOR 4131A20A5B>))

Call to CLOS::GENERIC-FUNCTION-NON-DISCRIMINATOR {offset 69}

Call to CAPI:CAPI-OBJECT-PROPERTY {offset 49}
CAPI::OBJECT : (#<SOUNDEDITOR 4131A20A5B>)
CAPI::PROPERTY : CAPI::QUIT-INTERFACE-FORCE-REPRESENTATION

Call to CAPI:QUIT-INTERFACE {offset 235}
CAPI::PANE : (#<SOUNDEDITOR 4131A20A5B>)
DBG::|rest-| : NIL
CAPI::FORCE : NIL

Call to CAPI:APPLY-IN-PANE-PROCESS {offset 361}
CAPI::PANE : (#<SOUNDEDITOR 4131A20A5B>)
FUNCTION : CAPI:QUIT-INTERFACE
CAPI::ARGS : ((#<SOUNDEDITOR 4131A20A5B>))

Call to (METHOD CLOSE-FRAME (INSTBOXFRAME)) {offset 252}
SELF : #<INSTBOXFRAME 413032AFF3>
CLOS::.ISL. : :DONT-KNOW
DBG::G : ((#<SOUNDEDITOR 4131A20A5B>))
DBG::|internal-variable-| : #<STANDARD-GENERIC-FUNCTION OM-CLOSE-WINDOW 415025B774>
DBG::G : (NIL)
DBG::G : (NIL)
DBG::G : ((#<SOUNDEDITOR 4131A20A5B>))

Call to (METHOD OMG-REMOVE-ELEMENT (RELATIONPANEL T)) {offset 99}
SELF : #<PATCHPANEL 41301514D3>
FRAME : #<INSTBOXFRAME 413032AFF3>
CLOS::.ISL. : :DONT-KNOW

Call to (METHOD DELETE-GENERAL (PATCHPANEL)) {offset 924}
SELF : #<PATCHPANEL 41301514D3>
CLOS::.ISL. : :DONT-KNOW
ACTIVES : (#<INSTBOXFRAME 413032AFF3>)
CONNECTIONS : NIL
DBG::G : (#<INSTBOXFRAME 413032AFF3>)
BOX : #<INSTBOXFRAME 413032AFF3>

Binding frame:
CLOS::NEXT-METHODS : NIL

Binding frame:
CLOS::NEXT-METHODS : (#<Closure CLOS::TEMPLATED-METHOD-COMBINATION 41511C209C>)

Call to CLOS::NEXT-METHOD-CALL-1 {offset 73}
CONS : (METHOD DELETE-GENERAL :AROUND (PATCHPANEL))
CLOS::NEXT-METHODS : (#<Closure CLOS::TEMPLATED-METHOD-COMBINATION 41511C209C>)
#:NEXT-METHOD-ARG-0 : #<PATCHPANEL 41301514D3>

Binding frame:
CLOS::NEXT-METHODS : NIL

Binding frame:
CLOS::NEXT-METHODS : (#<Function (METHOD HANDLE-KEY-EVENT (PATCHPANEL T)) 41506A3854>)

Call to CLOS::NEXT-METHOD-CALL-2 {offset 81}
CONS : (METHOD HANDLE-KEY-EVENT :AROUND (PATCHPANEL T))
CLOS::NEXT-METHODS : (#<Function (METHOD HANDLE-KEY-EVENT (PATCHPANEL T)) 41506A3854>)
#:NEXT-METHOD-ARG-0 : #<PATCHPANEL 41301514D3>
#:NEXT-METHOD-ARG-1 : :OM-KEY-DELETE

Binding frame:
CLOS::NEXT-METHODS : (#<Function (METHOD OM-VIEW-KEY-HANDLER (T T)) 41508A4534>)

Call to (METHOD OM-VIEW-KEY-HANDLER (EDITORWINDOW T)) {offset 141}
SELF : #<EDITORWINDOW “^Patch” 4130157063>
CHAR : :OM-KEY-DELETE
CLOS::.ISL. : :DONT-KNOW
DBG::G : (#<Function (METHOD OM-VIEW-KEY-HANDLER (T T)) 41508A4534>)

Binding frame:
CLOS::NEXT-METHODS : NIL

Binding frame:
CLOS::NEXT-METHODS : (#<Closure CLOS::TEMPLATED-METHOD-COMBINATION 41511C20DC>)

Call to CLOS::NEXT-METHOD-CALL-2 {offset 81}
CONS : (METHOD OM-VIEW-KEY-HANDLER :AROUND (EDITORWINDOW T))
CLOS::NEXT-METHODS : (#<Closure CLOS::TEMPLATED-METHOD-COMBINATION 41511C20DC>)
#:NEXT-METHOD-ARG-0 : #<EDITORWINDOW “^Patch” 4130157063>
#:NEXT-METHOD-ARG-1 : :OM-KEY-DELETE

Call to (METHOD OM-VIEW-KEY-HANDLER :AROUND (EDITORWINDOW T)) {offset 143}
SELF : #<EDITORWINDOW “^Patch” 4130157063>
CHAR : :OM-KEY-DELETE
CLOS::.ISL. : :DONT-KNOW
DBG::G : (#<Closure CLOS::TEMPLATED-METHOD-COMBINATION 41511C20DC>)

Binding frame:
CLOS::NEXT-METHODS : NIL

Call to (METHOD OM-API::OM-CHAR-SPEC-CALLBACK (OM-API::OM-ABSTRACT-WINDOW T T T)) {offset 138}
OM-API::SELF : #<EDITORWINDOW “^Patch” 4130157063>
OM-API::X : :DONT-KNOW
OM-API::Y : :DONT-KNOW
OM-API::SPEC : #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0)
CLOS::.ISL. : :DONT-KNOW
OM-API::DATA : 8
OM-API::MODS : 0

Call to (METHOD OM-API::OM-CHAR-SPEC-CALLBACK (OM-VIEW T T T)) {offset 72}
OM-API::SELF : #<PATCHPANEL 41301514D3>
OM-API::X : 863
OM-API::Y : 178
OM-API::SPEC : #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0)
CLOS::.ISL. : :DONT-KNOW

UNWIND-PROTECT frame

Binding frame:
CAPI::PREVIOUS-OVERRIDE-CURSORS : NIL

Catch frame: CAPI::ABORT-CALLBACK-CATCH

Binding frame:
CAPI::TOP-LEVEL-INTERFACE : NIL

Call to CAPI::IN-PROCESS-CAPI-EVENT-CALLBACK {offset 801}
CAPI::SELF : #<PATCHPANEL 41301514D3>
CAPI::TRANSLATOR : NIL
CAPI-INTERNALS:CALLBACK : OM-API::OM-CHAR-SPEC-CALLBACK
CAPI::EXTRA-CALLBACK-ARGS : NIL
CAPI::EVENT-ARGS : (863 178 #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0))

Call to CAPI:EXECUTE-WITH-INTERFACE {offset 343}
CAPI:INTERFACE : #<EDITORWINDOW “^Patch” 4130157063>
FUNCTION : CAPI::IN-PROCESS-CAPI-EVENT-CALLBACK
CAPI::ARGS : (#<PATCHPANEL 41301514D3> NIL OM-API::OM-CHAR-SPEC-CALLBACK NIL (863 178 #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0)))

Call to CAPI::PROCESS-CAPI-EVENT-CALLBACK {offset 92}
CAPI::SELF : #<PATCHPANEL 41301514D3>
CAPI::TRANSLATOR : NIL
CAPI-INTERNALS:CALLBACK : OM-API::OM-CHAR-SPEC-CALLBACK
CAPI::EXTRA-CALLBACK-ARGS : NIL
CAPI::EVENT-ARGS : (863 178 #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0))

Call to CAPI::PROCESS-CAPI-EVENT {offset 143}
CAPI::SELF : #<PATCHPANEL 41301514D3>
CAPI::CALLBACK-ARGS : (NIL OM-API::OM-CHAR-SPEC-CALLBACK)
CAPI::EVENT-ARGS : (863 178 #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0))

Call to CAPI-INTERNALS:PROCESS-CAPI-EVENT-WITH-HANDLER {offset 210}
CAPI::SELF : #<PATCHPANEL 41301514D3>
CAPI::SEARCH-KEY : :GESTURE-SPEC
CAPI::MERGED-THING : #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0)
CAPI::EVENT-ARGS : (863 178 #S(SYSTEM::GESTURE-SPEC :DATA 8 :MODIFIERS 0))

Call to CAPI-COCOA-LIBRARY::HANDLE-KEY-DOWN {offset 1186}
CAPI-COCOA-LIBRARY::REPRESENTATION : #<CAPI-COCOA-LIBRARY::OUTPUT-PANE-REPRESENTATION for #<PATCHPANEL 41301514D3> 4130156F2B>
CAPI-COCOA-LIBRARY::THE-EVENT : #<Pointer: OBJC:OBJC-OBJECT-POINTER = #x000060400012FA00>

UNWIND-PROTECT frame

Binding frame:
FLI::FOREIGN-OBJECT-SCOPE-STACK-DETAILS : #(0 #1=(4336914432 . 4096) (#1#))

UNWIND-PROTECT frame

Call to (SUBFUNCTION CAPI-COCOA-LIBRARY::|%FOREIGN-CALLABLE/CAPI_COCOA_LIBRARY OUTPUT_PANE_REPRESENTATION ObjC instance method keyDown:| (FLI:DEFINE-FOREIGN-CALLABLE “CAPI_COCOA_LIBRARY OUTPUT_PANE_REPRESENTATION ObjC instance method keyDown:”)) {offset 404}
FLI::%FOREIGN-CALL-STACK% : #<Raw value #x7FFEEFBFF1F0 (140732920754672)>

UNWIND-PROTECT frame

Call to SYSTEM::IN-ENTRY-FROM-C {offset 324}

Call to OBJC::|invoke (FUNCTION (OBJC-OBJECT-POINTER SEL) VOID)| {offset 218}
OBJC::ARG-0 : #<Pointer: OBJC:OBJC-OBJECT-POINTER = #x000060C000100C60>
OBJC::ARG-1 : #<Pointer: OBJC:SEL = #x00007FFF45EA5211>

UNWIND-PROTECT frame

Binding frame:
OBJC::DYNAMIC-OBJC-DATA : #

UNWIND-PROTECT frame

Binding frame:
FLI::FOREIGN-OBJECT-SCOPE-STACK-DETAILS : #(0 NIL NIL)

Call to (SUBFUNCTION 2 OBJC::MAKE-INVOKE-FUNCTION) {offset 394}
OBJC::OBJECT : #<Pointer: OBJC:OBJC-OBJECT-POINTER = #x000060C000100C60>
OBJC:SEL : #<Pointer: OBJC:SEL = #x00007FFF45EA5211>
OBJC::METHOD-SIG : :DONT-KNOW
OBJC::ARGS : NIL
OBJC::RESULT : NIL
OBJC::RESULT-TYPE {Closed} : :VOID
OBJC::DIRECT-INVOKE-FUNCTION {Closed} : OBJC::|invoke (FUNCTION (OBJC-OBJECT-POINTER SEL) VOID)|
OBJC::METHOD-USER-ARG-TYPES {Closed} : NIL

Call to OBJC::INVOKE-INTO* {offset 1665}
OBJC::RESULT : NIL
OBJC::POINTER-OR-CLASS-NAME : #<Pointer: OBJC:OBJC-OBJECT-POINTER = #x000060C000100C60>
METHOD : #S(OBJC::INTERNED-OBJC-SELECTOR :NAME “run” :SEL #<Pointer: OBJC:SEL = #x00007FFF45EA5211>)
OBJC::ARGS : NIL

Binding frame:
QUERY-IO : #<Synonym stream to BACKGROUND-QUERY-IO>

Binding frame:
STANDARD-INPUT : #<Synonym stream to BACKGROUND-INPUT>

Binding frame:
TRACE-OUTPUT : #<Synonym stream to BACKGROUND-OUTPUT>

Binding frame:
ERROR-OUTPUT : #<Synonym stream to BACKGROUND-OUTPUT>

Binding frame:
STANDARD-OUTPUT : #<Synonym stream to BACKGROUND-OUTPUT>

Catch frame: #:|progv-cathcer148883|

Catch frame: (CAPI-COCOA-LIBRARY::RUN-COCOA-EVENT-LOOP . RESTART-CASE)

Catch frame: (CAPI-COCOA-LIBRARY::RUN-COCOA-EVENT-LOOP . 1)

Binding frame:
DBG::DEBUGGER-WRAPPER-LIST : NIL

Catch frame: MP::CLEAN-EXIT-MAIN-PROCESS

Binding frame:
MP::INTERRUPT-BREAK-BREAKERS : NIL

Call to CAPI-COCOA-LIBRARY::RUN-COCOA-EVENT-LOOP {offset 2103}
CAPI-COCOA-LIBRARY::EARLY-INITIALIZER : #<Closure (FLET CAPI-COCOA-LIBRARY::EARLY-INITIALIZER) subfunction of (METHOD CAPI-LIBRARY:START-ENVIRONMENT-USING-LOOK-AND-FEEL ((EQL :COCOA) T)) 415001B64C>
CAPI-COCOA-LIBRARY::INITIALIZER : #<Closure (FLET CAPI-COCOA-LIBRARY::INITIALIZER) subfunction of (METHOD CAPI-LIBRARY:START-ENVIRONMENT-USING-LOOK-AND-FEEL ((EQL :COCOA) T)) 415001B62C>

Catch frame: MP::PROCESS-TAG

Catch frame: (MP::PROCESS-SG-FUNCTION . 1)

Catch frame: MP::PROCESS-SG-FUNCTION-CATCH

Binding frame:
MP:CURRENT-PROCESS : NIL

Binding frame:
MP::ACTIONS-AFTER-SLEEPING : NIL

Binding frame:
MP::ACTIONS-BEFORE-SLEEPING : NIL

Binding frame:
SYSTEM::READER-STATE : #<SYSTEM::READER-STATE In 0 out 75 4130424473>

Binding frame:
PACKAGE : #<The COMMON-LISP-USER package, 137/512 internal, 10/16 external>

Binding frame:
SYSTEM::SELECT-DUMMY : NIL

Binding frame:
EDITOR::CURRENT-BUFFER : NIL

Binding frame:
EDITOR::CURRENT-WINDOW : NIL

Binding frame:
EDITOR::EDITOR-STATE : NIL

Binding frame:
EDITOR::EDITOR-INPUT-STYLE : #S(EDITOR:EDITOR-INPUT-STYLE :KEY-BINDINGS #<EDITOR::KEY-TABLE #<EQUALP Hash Table{345} 40D0039F4B> 1 344> :DELETE-SELECTION-MODE NIL :LOGICAL-CHARACTERS #<EQUALP Hash Table{22} 40D00393EB> :EXECUTE-MODE #<EDITOR::MODE-OBJECT “Execute” 40D00394B3> :ECHO-MODE #<EDITOR::MODE-OBJECT “Echo Area” 40D0039533> :PLIST NIL :INTERRUPT-KEYS (#S(SYSTEM::GESTURE-SPEC :DATA 103 :MODIFIERS 2) #S(SYSTEM::GESTURE-SPEC :DATA 71 :MODIFIERS 2)) :STYLE :EMACS :POINT-ALWAYS-VISIBLE T :USE-FACE-TO-FULL-WIDTH-P T)

Binding frame:
CAPI::USE-ACCELERATORS : T

Binding frame:
SYSTEM::PROCESS-BIGNUM-CACHE : NIL

Catch frame: #:|progv-cathcer254015|

Call to MP::PROCESS-SG-FUNCTION {offset 876}
MP::FLAG : 1
MP::SYMBOLS : NIL
VALUES : NIL

MP::PROCESS-SG-FUNCTION ← MP::RUN-MAIN-PROCESS-ONCE
← MP::RUN-MAIN-PROCESS ← MP::MULTIPROCESSING-MAIN-LOOP
← MP::SHARED-INITIALIZE-MULTIPROCESSING
← MP:INITIALIZE-MULTIPROCESSING
← CAPI-COCOA-LIBRARY::INITIALIZE-MULTIPROCESSING-COCOA
← (CLOS::GENERIC-FUNCTION-DISCRIMINATOR (#:DISC-ARG-234621 #:DISC-ARG-234622 &REST #:REST-234623))
← CAPI-INTERNALS:START-ENVIRONMENT ← LISPWORKS-TOOLS:START-LISPWORKS
← ENVIRONMENT::START-CAPI-ENVIRONMENT
← (METHOD ENVIRONMENT-INTERNALS:ENVIRONMENT-START (ENVIRONMENT::CAPI-ENVIRONMENT))
← (CLOS::GENERIC-FUNCTION-DISCRIMINATOR (#:DISC-ARG-234613 &REST #:REST-234614))
← ENVIRONMENT:START-ENVIRONMENT
← ENVIRONMENT::I-RESTART-WITH-ENVIRONMENT-AUX ← SYSTEM::RESTART-HOOK
← SYSTEM::IN-START-FUNCTION-ONCE ← SYSTEM::IN-START-FUNCTION
← SYSTEM::CALL-IN-START-FUNCTION ← SYSTEM::START-FUNCTION

Bien à toi
M.

Cher Mauro,

Il doit y avoir une methode qui manque qq part. Je vais voir cela et reviens a toi. ASAP.

Best
K

Cher Mauro,

Voila un fix, mais a tester. Il remplace bien entendu le precedent.
fix2.lisp (332 Bytes)

Note bien que cela aussi concernait tout editeur comme voice, etc. Pas uniquement sound.

Tiens moi au courrant pour que je le commit.
Et super merci pour tes bug reports, ca fait avancer les choses.

Amities
K

merci cher Karim, j’essaie tout de suite

Non,

apparement il y a encore un petit detail…
Wait a tick
sorry

Maintenant essayes cela:
fix3.lisp (430 Bytes)
…en esperant que cette fois, j’ai juste :slight_smile:

Amities
K

Cher Mauro,

J’ai presque termine le “bon” fix qui s’applique a tous les cas des instances. Car je me suis apercu qu’il y a a plusieurs niveau. Maintenant tout ferme comme il faut sans erreur. Le temps que je netoie le code, et je t’envoie le patch.

Amities
K

Super ! Merci beaucoup. Pour l’instant fix4 a l’air de bien marcher.

Hi there,

This is hopefully a working fix for all kind of instances (automatic closing of editors when instances are deleted). It will be included in the next release (om 7.1)

fix7.lisp (971 Bytes)

Best
K