From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Possible bug in the org-element cache code?
Date: Tue, 07 Jan 2014 23:57:28 -0500 [thread overview]
Message-ID: <878uur135z.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
I've gotten the attached backtrace a couple of times in the past few
days. Also same error with org-cache-sync. I'm not sure how reproducible
it is and I have to admit that I've been running with a possibly tainted
emacs/org for the last few days. I'll restart emacs and try to keep it
pristine and see if it happens again, but I thought I'd post the
backtrace just in case it is real.
[-- Attachment #2: Backtrace --]
[-- Type: text/plain, Size: 9555 bytes --]
Debugger entered--Lisp error: (wrong-type-argument arrayp #s(hash-table size 5003 test eq rehash-size 1.5 rehash-threshold 0.8 data (1 ((paragraph (:begin 1 :end 3 :contents-begin 1 :contents-end 2 :post-blank 2 :post-affiliated 1 :parent nil))) 3 ((paragraph (:begin 3 :end 164 :contents-begin 3 :contents-end 162 :post-blank 2 :post-affiliated 3 :parent nil))) 164 ((paragraph (:begin 164 :end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)) (233 nil) (164 ((link . 164)) (link (:type "gnus" :path "gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :raw-link "gnus:gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :application nil :search-option nil :begin 164 :end 282 :contents-begin 233 :contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)))) (link (:type "gnus" :path "gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :raw-link "gnus:gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :application nil :search-option nil :begin 164 :end 282 :contents-begin 233 :contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)))))))))
aref(#s(hash-table size 5003 test eq rehash-size 1.5 rehash-threshold 0.8 data (1 ((paragraph (:begin 1 :end 3 :contents-begin 1 :contents-end 2 :post-blank 2 :post-affiliated 1 :parent nil))) 3 ((paragraph (:begin 3 :end 164 :contents-begin 3 :contents-end 162 :post-blank 2 :post-affiliated 3 :parent nil))) 164 ((paragraph (:begin 164 :end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)) (233 nil) (164 ((link . 164)) (link (:type "gnus" :path "gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :raw-link "gnus:gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :application nil :search-option nil :begin 164 :end 282 :contents-begin 233 :contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)))) (link (:type "gnus" :path "gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :raw-link "gnus:gmane.emacs.orgmode#87k3edcbe5.fsf@alphaville.bos.redhat.com" :application nil :search-option nil :begin 164 :end 282 :contents-begin 233 :contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)))))) ...)) 0)
(memq (aref org-element--cache 0) cl-struct-avl-tree--tags)
(and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags))
(or (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)) (error "%s accessing a non-%s" (quote avl-tree--dummyroot) (quote avl-tree-)))
(progn (or (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)) (error "%s accessing a non-%s" (quote avl-tree--dummyroot) (quote avl-tree-))) (aref org-element--cache 1))
(aref (progn (or (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)) (error "%s accessing a non-%s" (quote avl-tree--dummyroot) (quote avl-tree-))) (aref org-element--cache 1)) 0)
(progn (aref (progn (or (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)) (error "%s accessing a non-%s" (quote avl-tree--dummyroot) (quote avl-tree-))) (aref org-element--cache 1)) 0))
(let ((node (progn (aref (progn (or (and ...) (error "%s accessing a non-%s" ... ...)) (aref org-element--cache 1)) 0))) last) (catch (quote found) (while node (let* ((element (progn (aref node 2))) (beg (org-element-property :begin element))) (cond ((< key beg) (setq node (progn ...))) ((= key beg) (if (memq ... ...) (setq last ... node ...) (throw ... ...))) (t (setq last (progn ...) node (progn ...)))))) last))
(if (not (wholenump key)) (gethash key org-element--cache-objects) (let ((node (progn (aref (progn (or ... ...) (aref org-element--cache 1)) 0))) last) (catch (quote found) (while node (let* ((element (progn ...)) (beg (org-element-property :begin element))) (cond ((< key beg) (setq node ...)) ((= key beg) (if ... ... ...)) (t (setq last ... node ...))))) last)))
(progn (if (and (not ignore-changes) (org-element--cache-pending-changes-p)) (progn (org-element--cache-sync (current-buffer)))) (if (not (wholenump key)) (gethash key org-element--cache-objects) (let ((node (progn (aref (progn ... ...) 0))) last) (catch (quote found) (while node (let* ((element ...) (beg ...)) (cond (... ...) (... ...) (t ...)))) last))))
(if (and org-element-use-cache org-element--cache) (progn (if (and (not ignore-changes) (org-element--cache-pending-changes-p)) (progn (org-element--cache-sync (current-buffer)))) (if (not (wholenump key)) (gethash key org-element--cache-objects) (let ((node (progn (aref ... 0))) last) (catch (quote found) (while node (let* (... ...) (cond ... ... ...))) last)))))
org-element-cache-get(0 t)
(let* ((beg (aref org-element--cache-status 1)) (element (org-element-cache-get (1- beg) t))) (if (not element) beg (catch (quote exit) (let ((up element)) (while (setq up (org-element-property :parent up)) (if (and (memq ... ...) (<= ... beg) (> ... end)) (throw (quote exit) (progn ... ...))) (setq element up)) (if (< (org-element-property :end element) beg) (org-element-property :end element) (org-element-property :begin element))))))
(let ((beg (let* ((beg (aref org-element--cache-status 1)) (element (org-element-cache-get (1- beg) t))) (if (not element) beg (catch (quote exit) (let (...) (while ... ... ...) (if ... ... ...))))))) (while (let ((node (progn (aref (progn ... ...) 0))) data) (while node (let* ((element (progn ...)) (pos (org-element-property :begin element))) (cond ((< pos beg) (setq node ...)) ((> pos beg) (setq data ... node ...)) (t (setq data ... node nil))))) (cond ((not data) (throw (quote escape) t)) ((> (org-element-property :begin data) end) nil) (t (setq end (max (1- ...) end)) (avl-tree-delete org-element--cache data nil t))))))
(let ((inhibit-quit t) (offset (aref org-element--cache-status 3)) (end (aref org-element--cache-status 2))) (let ((beg (let* ((beg (aref org-element--cache-status 1)) (element (org-element-cache-get ... t))) (if (not element) beg (catch (quote exit) (let ... ... ...)))))) (while (let ((node (progn (aref ... 0))) data) (while node (let* ((element ...) (pos ...)) (cond (... ...) (... ...) (t ...)))) (cond ((not data) (throw (quote escape) t)) ((> (org-element-property :begin data) end) nil) (t (setq end (max ... end)) (avl-tree-delete org-element--cache data nil t)))))) (if (zerop offset) nil (catch (quote exit) (avl-tree-mapc (function (lambda (data) (if (<= ... end) (throw ... t) (org-element--cache-shift-positions data offset) (progn ...)))) org-element--cache (quote reverse)))))
(catch (quote escape) (let ((inhibit-quit t) (offset (aref org-element--cache-status 3)) (end (aref org-element--cache-status 2))) (let ((beg (let* ((beg ...) (element ...)) (if (not element) beg (catch ... ...))))) (while (let ((node (progn ...)) data) (while node (let* (... ...) (cond ... ... ...))) (cond ((not data) (throw ... t)) ((> ... end) nil) (t (setq end ...) (avl-tree-delete org-element--cache data nil t)))))) (if (zerop offset) nil (catch (quote exit) (avl-tree-mapc (function (lambda (data) (if ... ... ... ...))) org-element--cache (quote reverse))))))
(progn (catch (quote escape) (let ((inhibit-quit t) (offset (aref org-element--cache-status 3)) (end (aref org-element--cache-status 2))) (let ((beg (let* (... ...) (if ... beg ...)))) (while (let ((node ...) data) (while node (let* ... ...)) (cond (... ...) (... nil) (t ... ...))))) (if (zerop offset) nil (catch (quote exit) (avl-tree-mapc (function (lambda ... ...)) org-element--cache (quote reverse)))))) (org-element--cache-cancel-changes))
(if (org-element--cache-pending-changes-p) (progn (catch (quote escape) (let ((inhibit-quit t) (offset (aref org-element--cache-status 3)) (end (aref org-element--cache-status 2))) (let ((beg (let* ... ...))) (while (let (... data) (while node ...) (cond ... ... ...)))) (if (zerop offset) nil (catch (quote exit) (avl-tree-mapc (function ...) org-element--cache (quote reverse)))))) (org-element--cache-cancel-changes)))
(save-current-buffer (set-buffer buffer) (if (org-element--cache-pending-changes-p) (progn (catch (quote escape) (let ((inhibit-quit t) (offset (aref org-element--cache-status 3)) (end (aref org-element--cache-status 2))) (let ((beg ...)) (while (let ... ... ...))) (if (zerop offset) nil (catch (quote exit) (avl-tree-mapc ... org-element--cache ...))))) (org-element--cache-cancel-changes))))
(progn (save-current-buffer (set-buffer buffer) (if (org-element--cache-pending-changes-p) (progn (catch (quote escape) (let ((inhibit-quit t) (offset ...) (end ...)) (let (...) (while ...)) (if (zerop offset) nil (catch ... ...)))) (org-element--cache-cancel-changes)))))
(if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (if (org-element--cache-pending-changes-p) (progn (catch (quote escape) (let (... ... ...) (let ... ...) (if ... nil ...))) (org-element--cache-cancel-changes))))))
org-element--cache-sync(#<buffer foo.org<3>>)
apply(org-element--cache-sync #<buffer foo.org<3>>)
byte-code("r\301\b\302H\b\303H\"\210)\301\207" [timer apply 5 6] 4)
timer-event-handler([t 0 0 500000 nil org-element--cache-sync (#<buffer foo.org<3>>) idle 0])
[-- Attachment #3: Type: text/plain, Size: 12 bytes --]
--
Nick
next reply other threads:[~2014-01-08 4:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 4:57 Nick Dokos [this message]
2014-01-08 5:05 ` Possible bug in the org-element cache code? Nick Dokos
2014-01-08 7:52 ` Nicolas Goaziou
2014-01-08 12:14 ` Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878uur135z.fsf@gmail.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.