Stefan Monnier writes: >>>> Error in post-command-hook: (wrong-type-argument listp (nil DEAD . 18764377)) >>> >>> Oh yes, the live_deleted_processes variable needs to be gcpro'd. > >> I'm not familiar with Emacs C code, so I don't know how to proceed. >> Can you send a patch, or at least, the lines that have to be modified, >> and how ? > > Add something like > > staticpro (&live_deleted_processes); > > in syms_of_process Works fine! I used two tests: 1) (original test) Quick switching between two flyspellized buffers that have different dictionaries, 2) (let (processes) (dotimes (i 100) (push (start-process "bug" nil "/tmp/sleep") processes)) (dotimes (i 50) (if (zerop (mod i 2)) (delete-process (pop processes)) (kill-process (pop processes)))) (message "%S" (call-process "/tmp/sleep")) (dotimes (i 50) (delete-process (pop processes))) (message "%S" (call-process "/tmp/sleep"))) None of them succeeded before, but now it's OK. (Final ?) patch attached. Agustin, can you check that you can't trigger the bug anymore?