all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)]
@ 2016-05-02 16:31 Mark A. Hershberger
  2016-05-06 15:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Mark A. Hershberger @ 2016-05-02 16:31 UTC (permalink / raw)
  To: emacs-orgmode



Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2015-03-07 on trouble, modified by Debian
Package: Org-mode version 8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)

I'm using org-mode by default for most buffers and, when using
gnus-alias-use-identity, I get a backtrace because
org-element--cache-sync-keys is set to nil.

Patch to fix this:

diff --git a/lisp/org-element.el b/lisp/org-element.el
index d02b36c..760fce8 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5121,7 +5121,8 @@ updated before current modification are actually submitted."
 	;; Otherwise, reset keys.
 	(if org-element--cache-sync-requests
 	    (org-element--cache-set-timer buffer)
-	  (clrhash org-element--cache-sync-keys))))))
+	  (when org-element--cache-sync-keys
+            (clrhash org-element--cache-sync-keys)))))))
 
 (defun org-element--cache-process-request
     (request next threshold time-limit future-change)


Edited backtrace:

Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
  clrhash(nil)
  (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))
  (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* ((v next)) (aset v 3 (+ ... ...))) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))
  (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* (...) (aset v 3 ...)) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))
  (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add ... org-element-cache-sync-duration)) future-change) (if next (progn (let* ... ...) (aset next 2 ...))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))))
  (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next ...) threshold (and ... ...) future-change) (if next (progn ... ...)) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))))
  org-element--cache-sync(#<buffer Re: [hexmode/xml-rpc-el] St...<2>>)
  apply(org-element--cache-sync #<buffer Re: [hexmode/xml-rpc-el] St...<2>>)
  byte-code("r\301\b\302H\b\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 0 600000 nil org-element--cache-sync (#<buffer Re: [hexmode/xml-rpc-el] St...<2>>) idle 0])
  read-from-minibuffer("Identity: " nil ...)
  completing-read-default("Identity: " ...)
  completing-read("Identity: " ...)
  gnus-alias-identity-prompt()
  gnus-alias-use-identity()
[SNIP]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)]
  2016-05-02 16:31 Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)] Mark A. Hershberger
@ 2016-05-06 15:21 ` Nicolas Goaziou
  2016-05-09  2:11   ` Mark A. Hershberger
  2016-05-22 18:16   ` Mark A. Hershberger
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2016-05-06 15:21 UTC (permalink / raw)
  To: Mark A. Hershberger; +Cc: emacs-orgmode

Hello,

"Mark A. Hershberger" <mah@nichework.com> writes:

> Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
>  of 2015-03-07 on trouble, modified by Debian
> Package: Org-mode version 8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)
>
> I'm using org-mode by default for most buffers and, when using
> gnus-alias-use-identity, I get a backtrace because
> org-element--cache-sync-keys is set to nil.
>
> Patch to fix this:
>
> diff --git a/lisp/org-element.el b/lisp/org-element.el
> index d02b36c..760fce8 100644
> --- a/lisp/org-element.el
> +++ b/lisp/org-element.el
> @@ -5121,7 +5121,8 @@ updated before current modification are actually submitted."
>  	;; Otherwise, reset keys.
>  	(if org-element--cache-sync-requests
>  	    (org-element--cache-set-timer buffer)
> -	  (clrhash org-element--cache-sync-keys))))))
> +	  (when org-element--cache-sync-keys
> +            (clrhash org-element--cache-sync-keys)))))))
>  
>  (defun org-element--cache-process-request
>      (request next threshold time-limit future-change)
>
>
> Edited backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
>   clrhash(nil)
>   (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))
>   (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* ((v next)) (aset v 3 (+ ... ...))) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))
>   (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* (...) (aset v 3 ...)) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))
>   (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add ... org-element-cache-sync-duration)) future-change) (if next (progn (let* ... ...) (aset next 2 ...))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))))
>   (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next ...) threshold (and ... ...) future-change) (if next (progn ... ...)) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))))
>   org-element--cache-sync(#<buffer Re: [hexmode/xml-rpc-el] St...<2>>)

I'm surprised about this. Cache mechanism in available in Org mode
buffers only. Not even when using `orgstruct-mode' (see
0b97a551704d50ae848c59d00b0d425554891e53).

Could you investigate about how this happens in your case?

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)]
  2016-05-06 15:21 ` Nicolas Goaziou
@ 2016-05-09  2:11   ` Mark A. Hershberger
  2016-05-09 20:40     ` Nicolas Goaziou
  2016-05-22 18:16   ` Mark A. Hershberger
  1 sibling, 1 reply; 5+ messages in thread
From: Mark A. Hershberger @ 2016-05-09  2:11 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


Nicolas Goaziou writes:

> I'm surprised about this. Cache mechanism in available in Org mode
> buffers only. Not even when using `orgstruct-mode' (see
> 0b97a551704d50ae848c59d00b0d425554891e53).
>
> Could you investigate about how this happens in your case?

I don't know, but I've seen it happen a few times when using "M-x
woman".  Backtrace below.

It looks like a timer or event is being invoked and that is resulting in
the error.

If you have any ideas of what I should look for in my configuration, I
could poke around, but right now I don't know what to even look for.

-- 
Mark A. Hershberger
NicheWork LLC
717-271-1084

Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
  clrhash(nil)
  (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))
  (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* ((v next)) (aset v 3 (+ ... ...))) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))
  (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* (...) (aset v 3 ...)) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))
  (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add ... org-element-cache-sync-duration)) future-change) (if next (progn (let* ... ...) (aset next 2 ...))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))))
  (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next ...) threshold (and ... ...) future-change) (if next (progn ... ...)) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))))
  org-element--cache-sync(#<buffer *WoMan 1 wget*>)
  apply(org-element--cache-sync #<buffer *WoMan 1 wget*>)
  byte-code("r\301\b\302H\b\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 0 600000 nil org-element--cache-sync (#<buffer *WoMan 1 wget*>) idle 0])

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)]
  2016-05-09  2:11   ` Mark A. Hershberger
@ 2016-05-09 20:40     ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2016-05-09 20:40 UTC (permalink / raw)
  To: Mark A. Hershberger; +Cc: emacs-orgmode

Hello,

"Mark A. Hershberger" <mah@nichework.com> writes:

> It looks like a timer or event is being invoked and that is resulting in
> the error.
>
> If you have any ideas of what I should look for in my configuration, I
> could poke around, but right now I don't know what to even look for.

The following shouldn't happen.

  timer-event-handler([t 0 0 600000 nil org-element--cache-sync (#<buffer *WoMan 1 wget*>) idle 0])

It means `org-element--cache-set-timer' is called on a non-Org buffer.
Only 3 functions call it:

- `org-element-cache-refresh' :: This function is a no-op if current
  buffer is a non-Org buffer, per `org-element--cache-active-p'.

- `org-element--cache-after-change' :: This is set as an
     `after-change-function' with `org-element-cache-reset'. Again, the
     latter is a no-op if current buffer is non-Org.

- `org-element--cache-sync' :: This one is more complex. It is called by
     `org-element-at-point' but guarded by
     `org-element--cache-active-p'. It is also called by
     `org-element-cache-refresh'. Ditto. Eventually, it is called by
     `org-element--cache-submit-request'. This function is called by
     either `org-element-cache-refresh' or
     `org-element--cache-after-change'. See above.

Long story short. I don't know where that could happen. You could
instrument `org-element--cache-set-timer' so as to ring a bell when it
is called on a non-Org buffer.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)]
  2016-05-06 15:21 ` Nicolas Goaziou
  2016-05-09  2:11   ` Mark A. Hershberger
@ 2016-05-22 18:16   ` Mark A. Hershberger
  1 sibling, 0 replies; 5+ messages in thread
From: Mark A. Hershberger @ 2016-05-22 18:16 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

> Could you investigate about how this happens in your case?

I removed [gnus-alias-use-identity](https://www.emacswiki.org/emacs/GnusAlias) and the problem went away.  I'm guessing it is because some sort of race condition when I reply to a message.  I would gues that org-mode is invoked when the signature files are inserted into the message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-22 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-02 16:31 Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)] Mark A. Hershberger
2016-05-06 15:21 ` Nicolas Goaziou
2016-05-09  2:11   ` Mark A. Hershberger
2016-05-09 20:40     ` Nicolas Goaziou
2016-05-22 18:16   ` Mark A. Hershberger

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.