Closed mambolevis closed 7 years ago
Interesting, it would be nice to have a minimal working example, steps to reproduce, so that I can look into generating a backtrace.
Can you get a backtrace if you do M-x toggle-debug-on-error RET?
Hi, The backtrace output:
Debugger entered--Lisp error: (error "Selecting deleted buffer")`
`irony-iotask-ectx-call-callback([cl-struct-irony-iotask-ectx t [cl-struct-irony-iotask-packaged-task (:start (lambda nil (irony--server-send-command "diagnostics")) :update irony--server-query-update) nil [cl-struct-irony-iotask-result value (("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xtr1common" 204 22 4356 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xtr1common" 210 22 4463 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\limits" 612 33 14433 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\limits" 902 33 20820 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\iosfwd" 254 21 7625 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\iosfwd" 263 21 7852 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 1175 42 44320 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 1176 42 44373 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 4081 32 143152 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 4081 63 143183 error "expected ';' after alias declaration") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 4081 75 143195 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 4082 32 143239 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 4082 63 143270 error "expected ';' after alias declaration") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xstring" 4082 75 143282 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xlocale" 950 37 27734 error "use of undeclared identifier 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\xlocale" 1274 37 37723 error "use of undeclared identifier 'char32_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\string" 660 8 18519 error "unknown type name 'u16string'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\string" 660 38 18549 error "unknown type name 'char16_t'") ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\include\\string" 665 8 18676 error "unknown type name 'u32string'")) nil nil] nil nil] (lambda (&rest --cl-rest--) (apply (quote #[(G301 diagnostics-result) "\3031`
` irony-iotask--check-result(#<process Irony>)`
`irony-iotask-process-filter(#<process Irony> "(\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xtr1common\" 204 22 4356 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xtr1common\" 210 22 4463 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\limits\" 612 33 14433 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\limits\" 902 33 20820 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\iosfwd\" 254 21 7625 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\iosfwd\" 263 21 7852 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 1175 42 44320 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 1176 42 44373 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 4081 32 143152 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 4081 63 143183 error \"expected ';' after alias declaration\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 4081 75 143195 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 4082 32 143239 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 4082 63 143270 error \"expected ';' after alias declaration\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xstring\" 4082 75 143282 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xlocale\" 950 37 27734 error \"use of undeclared identifier 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\xlocale\" 1274 37 37723 error \"use of undeclared identifier 'char32_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\string\" 660 8 18519 error \"unknown type name 'u16string'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\string\" 660 38 18549 error \"unknown type name 'char16_t'\")\n(\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.11.25503\\\\include\\\\string\" 665 8 18676 error \"unknown type name 'u32string'\")\n)\n\n;;EOT\n")
Can you try again, but using the following definition of irony-iotask-ectx-call-callback
, in irony-iotask.el
?
(defun irony-iotask-ectx-call-callback (ectx result)
(let ((cb-buffer (irony-iotask-ectx-schedule-buffer ectx)))
(when (buffer-live-p cb-buffer)
(with-demoted-errors "Irony I/O task: error in callback: %S"
(with-current-buffer cb-buffer
(funcall (irony-iotask-ectx-callback ectx) result))))))
Hi,
Yes, I tested the new function irony-iotask-ectx-call-callback
you provided and it works. Could you explain me a little bit why that problem happened, I would like to learn more about your solution?
Thanks
The fix I asked you to test, just ignores the callback if it comes from a dead buffer (buffer-live-p
will return nil
in this case).
Thank you for your support and dedication!
Hi @Sarcasm , are you planning to make this change?
Can't think of a strong argument against it for now, done.
I'm getting the same error with the following backtrace:
Debugger entered--Lisp error: (error "Selecting deleted buffer")
signal(error ("Selecting deleted buffer"))
irony-iotask-result-get([cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")])
result = [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")]
temp = error
#[257 "\300\301\302!!!\207" [#[257 "\300\301!!\207" [#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"] company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)"] irony-completion--filter-candidates irony-iotask-result-get] 5 "\n\n(fn CANDIDATES-RESULT)"]([cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")])
irony-iotask-ectx-call-callback([cl-struct-irony-iotask-ectx t [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer ...)) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing ...) (irony--server-send-command "set-unsaved" ... temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons ... unsaved-buffers)))))) (#<process Irony> #<killed buffer> [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")] (:temp-file "/tmp/irony-unsaved-9131_ZU" :buffer-state [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem ...) temp-file) (if (eq ... buf-state) (irony-iotask-set-result t) (setq temp-file ...) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer ... ...)))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers ...) (elem ...) (buf-state ...)) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers ...))))) (#<process Irony> #<buffer *Code-Fontify*> [cl-struct-irony--buffer-state nil nil t 12558]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let (... temp-file) (if ... ... ... ... ... ... ...))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* (... ... ...) (if elem ... ...)))) (#<process Irony> #<buffer type_checking.c> [cl-struct-irony--buffer-state "/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" t t 206899]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (file line column compile-options) (apply ... "complete" file line column "--" compile-options)) :update irony--server-command-update) ("/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" 185 5 ("-x" "c")) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda ... ...) :update irony--server-query-update) ("DBUG_RE" case-insensitive) [cl-struct-irony-iotask-result nil nil nil nil] nil nil]]]]] #[257 "\300\301\302!!!\207" [#[257 "\300\301!!\207" [#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"] company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)"] irony-completion--filter-candidates irony-iotask-result-get] 5 "\n\n(fn CANDIDATES-RESULT)"] #<buffer type_checking.c>] [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")])
ectx = [cl-struct-irony-iotask-ectx t [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer (process-get process :unsaved-buffers))) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing (let ((write-region-inhibit-fsync t)) (write-region nil nil temp-file nil 0))) (irony--server-send-command "set-unsaved" (irony--get-buffer-path-for-server) temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons (cons buffer buf-state) unsaved-buffers)))))) (#<process Irony> #<killed buffer> [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")] (:temp-file "/tmp/irony-unsaved-9131_ZU" :buffer-state [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer (process-get process :unsaved-buffers))) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing (let ((write-region-inhibit-fsync t)) (write-region nil nil temp-file nil 0))) (irony--server-send-command "set-unsaved" (irony--get-buffer-path-for-server) temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons (cons buffer buf-state) unsaved-buffers)))))) (#<process Irony> #<buffer *Code-Fontify*> [cl-struct-irony--buffer-state nil nil t 12558]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer (process-get process :unsaved-buffers))) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing (let ((write-region-inhibit-fsync t)) (write-region nil nil temp-file nil 0))) (irony--server-send-command "set-unsaved" (irony--get-buffer-path-for-server) temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons (cons buffer buf-state) unsaved-buffers)))))) (#<process Irony> #<buffer type_checking.c> [cl-struct-irony--buffer-state "/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" t t 206899]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (file line column compile-options) (apply (function irony--server-send-command) "complete" file line column "--" compile-options)) :update irony--server-command-update) ("/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" 185 5 ("-x" "c")) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (prefix style) (irony--server-send-command "candidates" prefix (cl-case style (case-insensitive "case-insensitive") (smart-case "smart-case") (t "exact")))) :update irony--server-query-update) ("DBUG_RE" case-insensitive) [cl-struct-irony-iotask-result nil nil nil nil] nil nil]]]]] #[257 "\300\301\302!!!\207" [#[257 "\300\301!!\207" [#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"] company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)"] irony-completion--filter-candidates irony-iotask-result-get] 5 "\n\n(fn CANDIDATES-RESULT)"] #<buffer type_checking.c>]
result = [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")]
cb-buffer = #<buffer type_checking.c>
irony-iotask--check-result(#<process Irony>)
irony-iotask--start-next(#<process Irony>)
irony-iotask-schedule(#<process Irony> [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer (process-get process :unsaved-buffers))) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing (let ... ...)) (irony--server-send-command "set-unsaved" (irony--get-buffer-path-for-server) temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons (cons buffer buf-state) unsaved-buffers)))))) (#<process Irony> #<killed buffer> [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")] (:temp-file "/tmp/irony-unsaved-9131_ZU" :buffer-state [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer ...)) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing ...) (irony--server-send-command "set-unsaved" ... temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons ... unsaved-buffers)))))) (#<process Irony> #<buffer *Code-Fontify*> [cl-struct-irony--buffer-state nil nil t 12558]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem ...) temp-file) (if (eq ... buf-state) (irony-iotask-set-result t) (setq temp-file ...) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer ... ...)))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers ...) (elem ...) (buf-state ...)) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers ...))))) (#<process Irony> #<buffer type_checking.c> [cl-struct-irony--buffer-state "/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" t t 206899]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (file line column compile-options) (apply (function irony--server-send-command) "complete" file line column "--" compile-options)) :update irony--server-command-update) ("/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" 185 5 ("-x" "c")) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (prefix style) (irony--server-send-command "candidates" prefix ...)) :update irony--server-query-update) ("DBUG_RE" case-insensitive) [cl-struct-irony-iotask-result nil nil nil nil] nil nil]]]]] #[257 "\300\301\302!!!\207" [#[257 "\300\301!!\207" [#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"] company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)"] irony-completion--filter-candidates irony-iotask-result-get] 5 "\n\n(fn CANDIDATES-RESULT)"])
irony--run-task-asynchronously([cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer (process-get process :unsaved-buffers))) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing (let ... ...)) (irony--server-send-command "set-unsaved" (irony--get-buffer-path-for-server) temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons (cons buffer buf-state) unsaved-buffers)))))) (#<process Irony> #<killed buffer> [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-result error nil error ("Selecting deleted buffer")] (:temp-file "/tmp/irony-unsaved-9131_ZU" :buffer-state [cl-struct-irony--buffer-state "/home/thomas/documents/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/scanparse/civic.lex.c" t t 6364]) [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem (assq buffer ...)) temp-file) (if (eq (cdr elem) buf-state) (irony-iotask-set-result t) (setq temp-file (make-temp-file "irony-unsaved-")) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer (irony--without-narrowing ...) (irony--server-send-command "set-unsaved" ... temp-file))))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers (process-get process :unsaved-buffers)) (elem (assq buffer unsaved-buffers)) (buf-state (irony-iotask-get :buffer-state))) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers (cons ... unsaved-buffers)))))) (#<process Irony> #<buffer *Code-Fontify*> [cl-struct-irony--buffer-state nil nil t 12558]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (process buffer buf-state) (let ((elem ...) temp-file) (if (eq ... buf-state) (irony-iotask-set-result t) (setq temp-file ...) (irony-iotask-put :temp-file temp-file) (irony-iotask-put :buffer-state buf-state) (process-put process :buffer-state buf-state) (with-current-buffer buffer ... ...)))) :update irony--server-command-update :finish (lambda (&rest _args) (delete-file (irony-iotask-get :temp-file))) :on-success (lambda (process buffer &rest _args) (let* ((unsaved-buffers ...) (elem ...) (buf-state ...)) (if elem (setcdr elem buf-state) (process-put process :unsaved-buffers ...))))) (#<process Irony> #<buffer type_checking.c> [cl-struct-irony--buffer-state "/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" t t 206899]) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (file line column compile-options) (apply (function irony--server-send-command) "complete" file line column "--" compile-options)) :update irony--server-command-update) ("/home/thomas/informatica/jaar_3/semester_2/periode_1/compiler_bouw/compiler/src/types/type_checking.c" 185 5 ("-x" "c")) [cl-struct-irony-iotask-result nil nil nil nil] nil [cl-struct-irony-iotask-packaged-task (:start (lambda (prefix style) (irony--server-send-command "candidates" prefix ...)) :update irony--server-query-update) ("DBUG_RE" case-insensitive) [cl-struct-irony-iotask-result nil nil nil nil] nil nil]]]]] #[257 "\300\301\302!!!\207" [#[257 "\300\301!!\207" [#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"] company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)"] irony-completion--filter-candidates irony-iotask-result-get] 5 "\n\n(fn CANDIDATES-RESULT)"])
irony-completion-candidates-async(#[257 "\300\301!!\207" [#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"] company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)"] "DBUG_RE" case-insensitive)
#[257 "\301\302\303\304\305\306!\307\"\310\311%\300\312 #\207" ["DBUG_RE" irony-completion-candidates-async make-byte-code 257 "\300\301!!\207" vconcat vector [company-irony--make-candidates] 4 "\n\n(fn CANDIDATES)" company-irony--get-matching-style] 8 "\n\n(fn CALLBACK)"](#[257 "\300\240\207" [(trash)] 3 "\n\n(fn RESULT)"])
company--force-sync(company-call-backend-raw (candidates "DBUG_RE") company-irony)
company-call-backend(candidates "DBUG_RE")
company--fetch-candidates("DBUG_RE")
company-calculate-candidates("DBUG_RE")
company--begin-new()
company--perform()
company-auto-begin()
company-manual-begin()
company-complete-common()
company-indent-or-complete-common()
funcall-interactively(company-indent-or-complete-common)
call-interactively(company-indent-or-complete-common nil nil)
command-execute(company-indent-or-complete-common)
Sorry never mind I just needed to reinstall the irony server.
Hi,
Basically, Irony is working properly, I am using the latest versions of both
irony
and company-irony
from melpa (irony-20170905.1316
andcompany-irony-20170905.1346
)The message
Irony I/O task: error in callback: (error "Selecting deleted buffer") [2 times]
appears when I execute a lisp function thatopen, change and save all header files
in my project. It is strange because when I debug the lisp function, the message do not appear.Thanks, Levis