Closed Garklein closed 5 days ago
I get a similar error which might be related. It occurs in the same function that you edited if I recall correctly. Some EXWM timer errors that it tried to select a killed buffer. I will post the backtrace here next time I see it.
It locks up Emacs for me too but I'm usually able to make it stop by removing all EXWM buffers from the screen and then letting the code continue by closing the backtrace buffer.
That sounds like the same thing that happens to me, could be the same issue.
Steps to reproduce:
A
B
in the same window, in the same workspaceB
B
If you check window-prev-buffers
, the killed buffer should be in there, and you should get the error.
Also, I suspect that window-prev-buffers
is never supposed to have a killed buffer in it (from testing the above with normal buffers instead of X windows), so this may be a deeper issue inside EXWM.
I got the error message again today. It was triggered when a game on Steam tried to launch a bunch of windows. It seems to have been triggered by my timer initially, or it's unrelated. I was in several recursive edits at the time, so I cut those out of the backtrace:
Debugger entered--Lisp error: (error "Selecting deleted buffer")
exwm-layout--refresh-workspace(#<frame GNU Emacs 0x399f1c38>)
exwm-layout--refresh()
redisplay_internal\ \(C\ function\)()
#<subr recursive-edit>()
...
my/pacing-reminder()
apply(my/pacing-reminder nil)
timer-event-handler([t 26411 36077 187267 nil my/pacing-reminder nil nil 828000 nil])
I do disable exwm windows, so that might have contributed to the error:
(setq exwm-manage-force-tiling t)
I don't know much about Emacs or EXWM internals, but I've been poking around a bit.
It looks like when buffers are killed, they should be removed from previous and next buffer lists: https://github.com/emacs-mirror/emacs/blob/7ded1064cf4d9fde32c7a89473ef9476520cd556/src/buffer.c#L2014-L2019
Does anyone have any idea why these killed EXWM buffers still show up in window-prev-buffers
?
Does anyone have any idea why these killed EXWM buffers still show up in window-prev-buffers?
That is a good question and... I have no idea. It's possibly an upstream bug but it can't hurt to fix it here as well.
I am unable to reliably reproduce this, but occasionally,
window-prev-buffers
returns a killed buffer. Then, when EXWM tries to switch to it, it gives an error, and workspace switching locks up.