From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Fuchs Subject: Bug: org-src-mode tries to cancel a nil idle timer [9.1.13 (release_9.1.13-864-g5057e3 @ /Users/asf/.emacs.d/straight/build/org/)] Date: Fri, 29 Jun 2018 01:36:37 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007c54b1056fbc340e" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYgT7-00062J-Dg for emacs-orgmode@gnu.org; Thu, 28 Jun 2018 19:36:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYgT5-0007Cz-Po for emacs-orgmode@gnu.org; Thu, 28 Jun 2018 19:36:53 -0400 Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]:56219) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYgT5-00079v-4A for emacs-orgmode@gnu.org; Thu, 28 Jun 2018 19:36:51 -0400 Received: by mail-it0-x234.google.com with SMTP id 16-v6so372757itl.5 for ; Thu, 28 Jun 2018 16:36:50 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --0000000000007c54b1056fbc340e Content-Type: text/plain; charset="UTF-8" Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ I use org-src-mode with org-src-auto-save-idle-delay (set to 1s), and after upgrading org to the latest master version, it's repeatedly causing me trouble: When I open an org-src-mode buffer and close it with C-c ', I repeatedly get the message "Error running timer: (wrong-type-argument timerp nil)". The backtrace is for a compiled function, but after disassembling, it's pretty clear that it's the routine in the lambda in org-src-mode that tries to cancel `org-src--auto-save-timer'. Here are the steps that will do it for me, but I haven't been very lucky reproducing this consistently: (setq org-edit-src-auto-save-idle-delay 1 org-edit-src-turn-on-auto-save nil) 1. Open an org file with elisp source code blocks 2. Use C-c ' on one of those blocks 3. Edit the buffer 4. Close the buffer after a while with C-c ' If it reproduces correctly, emacs shows the error above whenever it has been idle for 1s. The backtrace that I got is this: Debugger entered--Lisp error: (wrong-type-argument timerp nil) signal(wrong-type-argument (timerp nil)) cancel-timer(nil) #f(compiled-function () #)() apply(#f(compiled-function () #) nil) timer-event-handler([t 0 1 0 t #f(compiled-function () #) nil idle 0]) And here's the bottom of the disassembly for #: 42:4 discard 43 dup 44 not 45 goto-if-nil-else-pop 5 48 constant cancel-timer 49 varref org-src--auto-save-timer 50 call 1 51 discard 52 constant nil 53 dup 54 varset org-src--auto-save-timer 55:5 stack-set 1 57 unbind 1 58 return I'm not sure how better to debug this, so please let me know if I can provide more / better data. Thanks in advance! Emacs : GNU Emacs 26.1 (build 1, x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) of 2018-04-15 Package: Org mode version 9.1.13 (release_9.1.13-864-g5057e3 @ /Users/asf/.emacs.d/straight/build/org/) -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --0000000000007c54b1056fbc340e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Remember to cover the basics, that is, what you expected t= o happen and
what in fact did happen.=C2=A0 You don't know how to ma= ke a good report?=C2=A0 See

=C2=A0 =C2=A0 =C2=A0https://orgmode.org/manual/Feedba= ck.html#Feedback

Your bug report will be posted to the Org maili= ng list.
---------------------------------------------------------------= ---------

I use org-src-mode with org-src-auto-save-idle-delay (set = to 1s), and
after upgrading org to the latest master version, it's r= epeatedly
causing me trouble: When I open an org-src-mode buffer and clo= se it with
C-c ', I repeatedly get the message "Error running t= imer:
(wrong-type-argument timerp nil)". The backtrace is for a com= piled
function, but after disassembling, it's pretty clear that it&#= 39;s the
routine in the lambda in org-src-mode that tries to cancel
`= org-src--auto-save-timer'.

Here are the steps that will do it fo= r me, but I haven't been very lucky
reproducing this consistently:
(setq org-edit-src-auto-save-idle-delay 1
=C2=A0 =C2=A0 =C2=A0 org= -edit-src-turn-on-auto-save nil)

1. Open an org file with elisp sour= ce code blocks
2. Use C-c ' on one of those blocks
3. Edit the bu= ffer
4. Close the buffer after a while with C-c '

If it repro= duces correctly, emacs shows the error above whenever it has
been idle f= or 1s.

The backtrace that I got is this:
Debugger entered--Lisp e= rror: (wrong-type-argument timerp nil)
=C2=A0 signal(wrong-type-argument= (timerp nil))
=C2=A0 cancel-timer(nil)
=C2=A0 #f(compiled-function (= ) #<bytecode 0x410a61a5>)()
=C2=A0 apply(#f(compiled-function () #= <bytecode 0x410a61a5>) nil)
=C2=A0 timer-event-handler([t 0 1 0 t = #f(compiled-function () #<bytecode 0x410a61a5>) nil idle 0])

A= nd here's the bottom of the disassembly for #<bytecode 0x410a61a5>= ;:
42:4 =C2=A0 =C2=A0discard =C2=A0
43 =C2=A0 =C2=A0 =C2=A0dup =C2= =A0 =C2=A0 =C2=A0
44 =C2=A0 =C2=A0 =C2=A0not =C2=A0 =C2=A0 =C2=A0
4= 5 =C2=A0 =C2=A0 =C2=A0goto-if-nil-else-pop 5
48 =C2=A0 =C2=A0 =C2=A0cons= tant =C2=A0cancel-timer
49 =C2=A0 =C2=A0 =C2=A0varref =C2=A0 =C2=A0org-s= rc--auto-save-timer
50 =C2=A0 =C2=A0 =C2=A0call =C2=A0 =C2=A0 =C2=A0151 =C2=A0 =C2=A0 =C2=A0discard =C2=A0
52 =C2=A0 =C2=A0 =C2=A0constant = =C2=A0nil
53 =C2=A0 =C2=A0 =C2=A0dup =C2=A0 =C2=A0 =C2=A0
54 =C2=A0 = =C2=A0 =C2=A0varset =C2=A0 =C2=A0org-src--auto-save-timer
55:5 =C2=A0 = =C2=A0stack-set 1
57 =C2=A0 =C2=A0 =C2=A0unbind =C2=A0 =C2=A01
58 =C2= =A0 =C2=A0 =C2=A0return =C2=A0 =C2=A0

I'm not sure how better to= debug this, so please let me know if I can
provide more / better data. = Thanks in advance!

Emacs =C2=A0: GNU Emacs 26.1 (build 1, x86_64-app= le-darwin13.4.0, Carbon Version 157 AppKit 1265.21)
=C2=A0of 2018-04-15<= br>Package: Org mode version 9.1.13 (release_9.1.13-864-g5057e3 @ /Users/as= f/.emacs.d/straight/build/org/)
--
Andreas Fuchs, (http://|im:asf@|m= ailto:asf@)boink= or.net, antifuchs
--0000000000007c54b1056fbc340e--