Sly crashes emacs. How to debug?

Hi,

I’m using the lisp module, but sly keeps crashing emacs when working in common-lisp files. Trying to debug by running emacs -Q and loading sly, but for some reason I don’t get any sly command. I tried running package-install-selected-packages, selecting sly and installing it that way, but it still doesn’t show up as a command when I run M-x sly.

Running on arch linux, emacs 29.4

If emacs hangs/freezes you could use pkill -SIGUSR2 emacs which will toggle debug-on-quit and throw a stacktrace, this will also (most of the time) “unfreeze” emacs as a side effect as the hanging blocking function will exit due to this.

Ah, that’s useful indeed! Unfortunately it doesn’t address my present concern, which is that emacs dies completely and utterly, leaving behind only a coredump…

For now I’m disabling some of my other modes to see if I can narrow it down without having to go down the route of minimal init files, and right now it seems that yasnippet might be to blame. I have been doing quite a bit of typing without incident now. But let’s see…

EDIT: still getting a crash without yasnippet.

EDIT 2: Trying slime instead of sly, and it seems to be a much more stable experience (for now). Is there a good reason for trying to make sly work, or is slime good enough for casual common-lisping?

Emacs should never crash due to an Elisp library. If it does, and you can reproduce it, you should file a bug report with M-x report-emacs-bug.

Good good, will try to find some time to file the report. Just returning to my original question for that: how do I run a clean emacs session (emacs -Q I suppose?) and install sly only for the duration of that session?

I recommend using this script of mine, which makes such things very easy: GitHub - alphapapa/with-emacs.sh: Script to easily run Emacs with specified configurations

1 Like

Thanks, I’ll give it a try!