all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11825: 24.1.50; float-time no longer accepts negative time values
@ 2012-06-30 16:08 Eli Zaretskii
  2012-07-03 22:56 ` Glenn Morris
  2012-07-07  2:11 ` Paul Eggert
  0 siblings, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2012-06-30 16:08 UTC (permalink / raw)
  To: 11825

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

This just caused me 5 hours of debugging: as result of the latest
changes related to nanosecond time resolution, float-time now barfs
when passed negative time values.  I bumped into this when
display-time signaled an error when updating the time on the
mode line.  Here's the Lisp backtrace:

  Debugger entered--Lisp error: (error "Invalid time specification")
    float-time((-1 65476 50000 0))
    timer-until([t 20463 1752 0 0 60 display-time-event-handler nil nil] (20463 1692 50000 0))
    timer-event-handler([t 20463 1752 0 0 60 display-time-event-handler nil nil])

As you see, timer-until was called with its second argument time older
than the next time the timer should trigger.  timer-until does this:

  (float-time (time-subtract time (timer--time timer)))

But when time-subtract returns a negative time value, float-time now
signals an error, where previously it would compute a negative value
in seconds.

I modified timer-until to do this instead:

  (- (float-time time) (float-time (timer--time timer)))

This change is part of revision 108814.  However, I'm filing this bug
report in case we need to be able to pass negative time values to
float-time.

(Once again the MS-DOS port finds subtle bugs in Emacs.)

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
d:/gnu/bzr/emacs/trunk/etc/DEBUG.


In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600)
 of 2012-06-30 on HOME-C4E4A596F7
Bzr revision: 108813 cyd@gnu.org-20120630142124-gwl5hsvaacmw1t2x
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (3.4) --no-opt --enable-checking --cflags
 -Id:/usr/include/libxml2 -DGLYPH_DEBUG=1 -DBYTE_CODE_METER'

Important settings:
  value of $EMACSDATA: D:/gnu/bzr/emacs/trunk/etc
  value of $EMACSDOC: D:/gnu/bzr/emacs/trunk/etc
  value of $EMACSLOADPATH: D:/gnu/bzr/emacs/trunk/lisp;D:/gnu/bzr/emacs/trunk/leim
  value of $EMACSPATH: D:/gnu/bzr/emacs/trunk/bin
  value of $LANG: ENU
  locale-coding-system: cp1255
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - e m a c s - b u <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer button faces cus-face files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)





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

end of thread, other threads:[~2012-07-09  3:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-30 16:08 bug#11825: 24.1.50; float-time no longer accepts negative time values Eli Zaretskii
2012-07-03 22:56 ` Glenn Morris
2012-07-07  2:11 ` Paul Eggert
2012-07-07  6:57   ` Eli Zaretskii
2012-07-07 20:30     ` Paul Eggert
2012-07-08  2:57       ` Eli Zaretskii
2012-07-08  7:26         ` Paul Eggert
2012-07-08  9:00           ` Andreas Schwab
2012-07-08 23:03             ` Paul Eggert
2012-07-08 23:37               ` Juanma Barranquero
2012-07-09  0:21                 ` Paul Eggert
2012-07-09  0:57                   ` Juanma Barranquero
2012-07-09  2:56               ` Eli Zaretskii
2012-07-09  3:33                 ` Paul Eggert
2012-07-08 15:32           ` Eli Zaretskii

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.