Skip to content

nrepl-server-filter called, even though process buffer is dead #1578

@jonpither

Description

@jonpither

Trying to debug #390. This may or may not be related:

I often see an error when I kill CIDER in windows using cider-quit:

Debugger entered--Lisp error: (error "Selecting deleted buffer"))
nrepl-server-filter(#<process nrepl-server> "^CTerminate batch job (Y/N)? ")

This happens inside of nrepl-server-filter, specifically the line:

(with-current-buffer (process-buffer process))

TBH my knowledge of process buffers and sentinels etc is a bit naive. But it seems to me that CIDER kills the process buffer, yet this server-filter is still hanging around to intercept output from the nREPL process which is still on-going, in particular the output "Terminate batch job (Y/N)", which always happens on windows when you try to exit from batch jobs (.bat files).

So my question is, a) can you help me understand how this nrepl-server-filter is being called for a process with a dead corresponding process buffer, and b) could CIDER have some defensive code? I.e. don't call with-current-buffer on a potentially dead buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions