I've spent a full working day trying to somehow resolve this, no luck, so I'm turning to this place hoping for help.
Recently I started experiencing freeze of something like up to 10 seconds when quitting Emacs. Windows 10, Emacs 26.2. Running daemon.
I've narrowed the freeze issue down to these two modes: 1) desktop-save-mode 2) back-button-mode
As soon as I disable these two modes in .emacs, emacs shuts down instantly.
I can toggle debug on quit and C-g out of kill-emacs freezing, and see Backtrace but either I don't understand how to read that or something else, I can't figure out the issue from the Backtrace (below).
I tried running without daemon, tried uninstalling lately installed packages to see if it changes anything, went through a number of possible solutions I found online, but to no avail.
These two modes are doing something in background that I just can't figure out what is happening there.
Also I don't have a large number of open buffers (really, max 10 at the same time maybe).
Will appreciate any ideas, advice, what else I could try to identify and fix the issue.
Thanks a lot in advance!
BACKTRACE:
Debugger entered--Lisp error: (quit)
eieio-override-prin1(137379)
#f(compiled-function (key val) #<bytecode 0x100257159>)("CJK IDEOGRAPH-218A3" 137379)
maphash(#f(compiled-function (key val) #<bytecode 0x100257159>) #<hash-table equal 125035/125094 0x364f105>)
eieio-override-prin1(#<hash-table equal 125035/125094 0x1002c256d>)
#f(compiled-function (this &optional comment) "Write object THIS out to the current stream.\nThis writes out the vector version of this object. Complex and recursive\nobject are discouraged from being written.\n If optional COMMENT is non-nil, include comments when outputting\nthis object." #<bytecode 0x1002d6f71>)(#<pcache-entry pcache-entry>)
apply(#f(compiled-function (this &optional comment) "Write object THIS out to the current stream.\nThis writes out the vector version of this object. Complex and recursive\nobject are discouraged from being written.\n If optional COMMENT is non-nil, include comments when outputting\nthis object." #<bytecode 0x1002d6f71>) #<pcache-entry pcache-entry> nil)
object-write(#<pcache-entry pcache-entry>)
eieio-override-prin1(#<pcache-entry pcache-entry>)
#f(compiled-function (key val) #<bytecode 0x364e761>)(names-hash-e:26\.1-l:0\.8\.4 #<pcache-entry pcache-entry>)
maphash(#f(compiled-function (key val) #<bytecode 0x364e761>) #<hash-table eql 2/65 0x364e725>)
eieio-override-prin1(#<hash-table eql 2/65 0x1002d4a55>)
#f(compiled-function (this &optional comment) "Write object THIS out to the current stream.\nThis writes out the vector version of this object. Complex and recursive\nobject are discouraged from being written.\n If optional COMMENT is non-nil, include comments when outputting\nthis object." #<bytecode 0x1002d6f71>)(#<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT")
apply(#f(compiled-function (this &optional comment) "Write object THIS out to the current stream.\nThis writes out the vector version of this object. Complex and recursive\nobject are discouraged from being written.\n If optional COMMENT is non-nil, include comments when outputting\nthis object." #<bytecode 0x1002d6f71>) (#<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT"))
#f(compiled-function (&rest cnm-args) #<bytecode 0x364e701>)(#<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT")
#f(compiled-function (cl--cnm this &optional comment) "Write persistent object THIS out to the current stream.\nOptional argument COMMENT is a header line comment." #<bytecode 0x2754c61>)(#f(compiled-function (&rest cnm-args) #<bytecode 0x364e701>) #<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT")
apply(#f(compiled-function (cl--cnm this &optional comment) "Write persistent object THIS out to the current stream.\nOptional argument COMMENT is a header line comment." #<bytecode 0x2754c61>) #f(compiled-function (&rest cnm-args) #<bytecode 0x364e701>) (#<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT"))
#f(compiled-function (&rest args) #<bytecode 0x364e6e5>)(#<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT")
apply(#f(compiled-function (&rest args) #<bytecode 0x364e6e5>) #<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT")
object-write(#<pcache-repository ucs-utils> ";; EIEIO PERSISTENT OBJECT")
#f(compiled-function (this &optional file) "Save persistent object THIS to disk.\nOptional argument FILE overrides the file name specified in the object\ninstance." #<bytecode 0x2754c95>)(#<pcache-repository ucs-utils>)
apply(#f(compiled-function (this &optional file) "Save persistent object THIS to disk.\nOptional argument FILE overrides the file name specified in the object\ninstance." #<bytecode 0x2754c95>) #<pcache-repository ucs-utils> nil)
eieio-persistent-save(#<pcache-repository ucs-utils>)
#f(compiled-function (cache &optional force) #<bytecode 0x278e6d5>)(#<pcache-repository ucs-utils> t)
apply(#f(compiled-function (cache &optional force) #<bytecode 0x278e6d5>) (#<pcache-repository ucs-utils> t))
#f(compiled-function (cl-cnm cache &optional force) #<bytecode 0x27ac411>)(#f(compiled-function (&rest cnm-args) #<bytecode 0x364e619>) #<pcache-repository ucs-utils> t)
apply(#f(compiled-function (cl-cnm cache &optional force) #<bytecode 0x27ac411>) #f(compiled-function (&rest cnm-args) #<bytecode 0x364e619>) (#<pcache-repository ucs-utils> t))
#f(compiled-function (&rest args) #<bytecode 0x364e5a9>)(#<pcache-repository ucs-utils> t)
apply(#f(compiled-function (&rest args) #<bytecode 0x364e5a9>) #<pcache-repository ucs-utils> t)
pcache-save(#<pcache-repository ucs-utils> t)
#f(compiled-function (k v) #<bytecode 0x27ab3c9>)("ucs-utils" #<pcache-repository ucs-utils>)
maphash(#f(compiled-function (k v) #<bytecode 0x27ab3c9>) #<hash-table equal 1/65 0x2795d95>)
pcache-kill-emacs-hook()
kill-emacs(nil)
funcall-interactively(kill-emacs nil)
call-interactively(kill-emacs record nil)
command-execute(kill-emacs record)
#f(compiled-function (cmd) #<bytecode 0x3709c0d>)("kill-emacs")
ivy-call()
ivy-read("M-x " ("toggle-debug-on-quit" "customize-group" "version" "back-button-mode" "desktop-save-mode" "save-buffers-kill-emacs" "renamer" "customize-face" "copath" "ivy-recentf" "list-packages" "replace-regexp" "eval-region" "customize-variable" "json-maker-crm" "linum-mode" "org-insert-link" "js2-mode" "customize" "server-start" "org-mode" "describe-function" "undo-tree-visualize" "org-agenda" "company-tide" "company-box-mode" "tide-restart-server" "check-parens" "kolor" "company-manual-begin" "tide-mode" "comment-region" "package-delete" "display-line-numbers-mode" "delfi" "describe-face" "delete-duplicate-lines" "upcase-region" "hl-line-mode" "fill-paragraph" "setup-tide-mode" "xmlform" "menu-bar-mode" "org-do-demote" "tool-bar-mode" "line-number-mode" "set-mark-command" "yas-describe-tables" "yas-expand-from-trigger-key" "ibuffer-do-shell-command-file" ...) :predicate nil :require-match t :history counsel-M-x-history :action #f(compiled-function (cmd) #<bytecode 0x3709c0d>) :sort nil :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
counsel-M-x()
funcall-interactively(counsel-M-x)
call-interactively(counsel-M-x nil nil)
command-execute(counsel-M-x)
(add-hook 'kill-emacs-hook 'pcache-kill-emacs-hook)
in thepcache.el
library that was on my computer and re-byte-compiled. I don't remember whether I had a problem, or whether I just was annoyed at so many things on mykill-emacs-hook
. You will need to figure out whether you actually need to save that stuff. If you don't, then you can(remove-hook 'kill-emacs-hook 'pcache-kill-emacs-hook)
-- however keep in mind, that you must unload it after thepcache
library loads it.... See line 232: github.com/sigma/pcache/blob/master/pcache.elkill-emacs
, which triggers a call to thepcache-kill-emacs-hook
.... According to the comments at the outset ofback-button.el
, it relies uponpcache
...: raw.githubusercontent.com/rolandwalker/back-button/master/… ... Package-Requires: ((nav-flash "1.0.0") (smartrep "0.0.3") (ucs-utils "0.7.2") (list-utils "0.4.2") (persistent-soft "0.8.8") (pcache "0.2.3"))