doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.09k stars 3.03k forks source link

closing doomemacs, copying to clipboard is filling RAM #7729

Open jason-mehmel opened 5 months ago

jason-mehmel commented 5 months ago

I confirm that...

Expected behavior

When I close doomemacs, it should close quickly. (And send contents to the clipboard, apparently!)

Current behavior

When I close doomemacs, it hangs while giving the message: saving clipboard to x clipboard manager.

I can then watch the RAM start to fill up from emacs via htop.

Either the RAM and swap fill up and it crashes (or freezes my machine) or I kill it via htop.

I have 'debug-on-quit' toggled, but the error hasn't happened since I toggled it on. Will update when it has done so! Haven't been able to make use of backtrace yet.

Here are the area messages:

Loading /etc/emacs/site-start.d/00debian.el (source)...done Loading /etc/emacs/site-start.d/50autoconf.el (source)...done Loading /etc/emacs/site-start.d/50cmake-data.el (source)...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Loading debian-ispell... Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done Loading debian-ispell...done Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Doom loaded 156 packages across 31 modules in 1.289s [yas] Check your `yas-snippet-dirs': /home/jason/.doom.d/snippets/ is not a directory [yas] Prepared just-in-time loading of snippets with some errors. Check Messages. You can run the command ‘view-echo-area-messages’ with SPC h e You can run the command ‘switch-to-buffer’ with SPC <

Steps to reproduce

  1. Open emacs
  2. Open files, testing and saving them.
  3. Use the keybinds C-x C-c to close emacs.
  4. Emacs provides the message "saving clipboard to x clipboard manager" and freezes, uses 25% cpu, and starts to fill the RAM until it crashes or I kill it via htop.

System Information

https://pastebin.com/DG1kxkMN

hlissner commented 5 months ago

I cannot reproduce this, nor do I know how to investigate this further. For starters, I recommend upgrading to at least Emacs 28.2, but ideally, 29.2. I'll be dropping 27.x support soon, and with some luck, the upgrade could address your issue. (Remember to run doom sync && doom build after upgrading Emacs).

jason-mehmel commented 4 months ago

I just updated by entire OS! I went from Bunsenlabs Beryllium to Boron, bringing it alongside Debian Bookworm, and now my Emacs is at 28.2 from those repositories!

(I'm a complete Emacs newbie, so I don't know if I want to take on getting an Emacs version beyond what's already in my baseline repositories.)

I'll see if I notice anything regarding this error, and get back to you ASAP!