emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Fuchs <asf@boinkor.net>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CAOHxn7zJMw51mFfUFJ9kC0WO+2twsyd1_jB=o+ZpdvRGn2MyMA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2407 bytes --]

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 () #<bytecode 0x410a61a5>)()
  apply(#f(compiled-function () #<bytecode 0x410a61a5>) nil)
  timer-event-handler([t 0 1 0 t #f(compiled-function () #<bytecode
0x410a61a5>) nil idle 0])

And here's the bottom of the disassembly for #<bytecode 0x410a61a5>:
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

[-- Attachment #2: Type: text/html, Size: 2930 bytes --]

             reply	other threads:[~2018-06-28 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 23:36 Andreas Fuchs [this message]
2018-07-01 22:47 ` 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/)] Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOHxn7zJMw51mFfUFJ9kC0WO+2twsyd1_jB=o+ZpdvRGn2MyMA@mail.gmail.com' \
    --to=asf@boinkor.net \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).