Subject: bug#17378: 24.3.1: xterm-mouse-event: Wrong type argument: wholenump, -6

From: Stefan Monnier <[email-masked]>
Date: Mon, 05 May 2014 19:18:35 -0400

>> Debugger entered--Lisp error: (wrong-type-argument wholenump -6)
> [..full backtrace..]
> Thanks.  So this seems to be a different bug from the last one: not only
> the error signaled is different, but the backtrace is fairly different
> as well.
> If you bump into a full backtrace for the other bug, I'd be happy to see it
> as well.

One more thing: for both backtraces (the wholenump in xterm-mouse-event
and the integerp in xterm-mouse--read-event-sequence-1000), could show
additionally to the detailed backtrace (i.e. obtained after loading the
uncompiled xt-mouse.el file), the M-x view-lossage output, as well as
a description of the event that caused the crash (wheel scroll, or
a mouse click, in which case specify which mouse button was pressed and
where).

Apparently, Emacs is receiving a byte sequence that does not correspond
to what it expects.  So we can easily make the code "robust" in the
sense that it will not signal an error, but in order to make sure the
code does something useful it'd be better to try and understand what is
the byte-sequence we receive and how it should be interpreted.

        Stefan