bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29174: 26.0.90; wrong-type-argument in the Python Flymake backend


From: João Távora
Subject: bug#29174: 26.0.90; wrong-type-argument in the Python Flymake backend
Date: Thu, 09 Nov 2017 21:29:58 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Lele Gaifax <lele@metapensiero.it> writes:

>>From time to time, while editing a python-mode with flymake-mode enabled, I
> somehow trigger an error in the backend.
>
> Unfortunately I'm not able to reproduce the problem in a deterministic way: it
> really seems a timing issue, that is I was able to get it quickly
> adding/removing random characters, but not too fast so to give Flymake the
> opportunity to run the checker subprocess.
>
> My guess is that it is another case of "the checker tool reported a line/col
> position that does not exist anymore in the buffer",

Yes, that is probably the case, but in that discussion we decided it is
normal from time to time, especially if you quickly remove characters
from the buffer end after check has already started. So it is probably
the "same" case, not another case.

> but the traceback below does not seem to support my supposition, where
> in particular I fail to understand from where the `t' that eventually
> is given to `cdr' may come from: of course it may very well be due to
> my extremely low elisp-fu tricking me... :-)

The problem is the (beg . end) = (flymake-diag-region...) clause in the
cl-loop. That call assumes that flymake-diag-region will always return a
cons, or nil, but it this case (the invalid region case), it was
returning t instead. That doesn't destructure nicely into (beg . end),
and so errors with a cryptic backtrace that confused you.

Fixed this in 89382780e1729861d98eca6e028ca1c62662a59f.

Thanks,
João





reply via email to

[Prev in Thread] Current Thread [Next in Thread]