GNU bug report logs -
#29246
26.0.90; Wrong type argument: integer-or-marker-p, nil in flymake--highlight-line
Previous Next
Reported by: Lele Gaifax <lele <at> metapensiero.it>
Date: Fri, 10 Nov 2017 16:09:01 UTC
Severity: normal
Found in version 26.0.90
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29246 in the body.
You can then email your comments to 29246 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29246
; Package
emacs
.
(Fri, 10 Nov 2017 16:09:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lele Gaifax <lele <at> metapensiero.it>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 10 Nov 2017 16:09:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I recompiled my Emacs this morning, to get advantage of the fix to issue
#29174:
In GNU Emacs 26.0.90 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.25)
of 2017-11-10 built on nautilus
Repository revision: e6f1fd40916afb692bd25e845ee87e73549201f4
I got an error with the following backtrace, keeping the backspace key pressed
to delete a dozen of characters on the last line of a Python buffer:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
make-overlay(nil nil)
(and t (make-overlay (progn (or (and (memq (type-of diagnostic) cl-struct-flymake--diag-tags) t) (signal 'wrong-type-argument (list 'flymake--diag diagnostic))) (aref diagnostic 2)) (progn (or (and (memq (type-of diagnostic) cl-struct-flymake--diag-tags) t) (signal 'wrong-type-argument (list 'flymake--diag diagnostic))) (aref diagnostic 3))))
(let* ((ov (and t (make-overlay (progn (or (and (memq (type-of diagnostic) cl-struct-flymake--diag-tags) t) (signal 'wrong-type-argument (list 'flymake--diag diagnostic))) (aref diagnostic 2)) (progn (or (and (memq (type-of diagnostic) cl-struct-flymake--diag-tags) t) (signal 'wrong-type-argument (list 'flymake--diag diagnostic))) (aref diagnostic 3)))))) (if ov (progn (let ((alist (assoc-default (progn (or (and (memq (type-of diagnostic) cl-struct-flymake--diag-tags) t) (signal 'wrong-type-argument (list 'flymake--diag diagnostic))) (aref diagnostic 4)) flymake-diagnostic-types-alist))) (overlay-put ov 'category (assoc-default 'flymake-category alist)) (let* ((--cl-var-- alist) (v nil) (k nil)) (while (consp --cl-var--) (setq v (car --cl-var--) k (car-safe (prog1 v (setq v (cdr v))))) (if (eq k 'category) (progn) (overlay-put ov k v)) (setq --cl-var-- (cdr --cl-var--))) nil)) (let* ((--cl-default-maybe-- (function (lambda (prop value) (if (or (plist-member (overlay-properties ov) prop) (let ((cat (overlay-get ov 'flymake-category))) (and cat (plist-member (symbol-plist cat) prop)))) nil (overlay-put ov prop value)))))) (progn (funcall --cl-default-maybe-- 'bitmap 'flymake-error-bitmap) (funcall --cl-default-maybe-- 'face 'flymake-error) (funcall --cl-default-maybe-- 'before-string (flymake--fringe-overlay-spec (overlay-get ov 'bitmap))) (funcall --cl-default-maybe-- 'help-echo (function (lambda (window _ov pos) (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (mapconcat (function flymake--diag-text) (flymake-diagnostics pos) "\n")) (internal--after-with-selected-window save-selected-window--state))))))) (funcall --cl-default-maybe-- 'severity (warning-numeric-level :error)) (funcall --cl-default-maybe-- 'priority (+ 100 (overlay-get ov 'severity))))) (overlay-put ov 'evaporate t) (overlay-put ov 'flymake-diagnostic diagnostic))))
flymake--highlight-line(#s(flymake--diag :buffer #<buffer ddl.py> :beg nil :end nil :type :note :text "W292 no newline at end of file" :backend nil))
#f(compiled-function (diag) #<bytecode 0x19f668d>)(#s(flymake--diag :buffer #<buffer ddl.py> :beg nil :end nil :type :note :text "W292 no newline at end of file" :backend nil))
mapc(#f(compiled-function (diag) #<bytecode 0x19f668d>) (#s(flymake--diag :buffer #<buffer ddl.py> :beg 2915 :end 2916 :type :error :text "F821 undefined name 'pdb'" :backend python-flymake) #s(flymake--diag :buffer #<buffer ddl.py> :beg nil :end nil :type :note :text "W292 no newline at end of file" :backend nil)))
flymake--handle-report(python-flymake backend-token989 (#s(flymake--diag :buffer #<buffer ddl.py> :beg 2915 :end 2916 :type :error :text "F821 undefined name 'pdb'" :backend python-flymake) #s(flymake--diag :buffer #<buffer ddl.py> :beg nil :end nil :type :note :text "W292 no newline at end of file" :backend nil)))
apply(flymake--handle-report python-flymake backend-token989 (#s(flymake--diag :buffer #<buffer ddl.py> :beg 2915 :end 2916 :type :error :text "F821 undefined name 'pdb'" :backend python-flymake) #s(flymake--diag :buffer #<buffer ddl.py> :beg nil :end nil :type :note :text "W292 no newline at end of file" :backend nil)))
#f(compiled-function (&rest args) #<bytecode 0x18f3015>)((#s(flymake--diag :buffer #<buffer ddl.py> :beg 2915 :end 2916 :type :error :text "F821 undefined name 'pdb'" :backend python-flymake) #s(flymake--diag :buffer #<buffer ddl.py> :beg nil :end nil :type :note :text "W292 no newline at end of file" :backend nil)))
python--flymake-parse-output(#<buffer ddl.py> #<process python-flymake> #f(compiled-function (&rest args) #<bytecode 0x18f3015>))
#f(compiled-function (proc event) #<bytecode 0x1134fb5>)(#<process python-flymake> "exited abnormally with code 1\n")
Thanks&bye,
so-sorry-to-bother-you-again-ly, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele <at> metapensiero.it | -- Fortunato Depero, 1929.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29246
; Package
emacs
.
(Fri, 01 Dec 2017 11:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 29246 <at> debbugs.gnu.org (full text, mbox):
I'm trying the following, that seems to fix the issue:
(defun python--flymake-parse-output (source proc report-fn)
"Collect diagnostics parsing checker tool's output line by line."
(let ((rx (nth 0 python-flymake-command-output-pattern))
(lineidx (nth 1 python-flymake-command-output-pattern))
(colidx (nth 2 python-flymake-command-output-pattern))
(typeidx (nth 3 python-flymake-command-output-pattern))
(msgidx (nth 4 python-flymake-command-output-pattern)))
(with-current-buffer (process-buffer proc)
(goto-char (point-min))
(cl-loop
while (search-forward-regexp rx nil t)
for msg = (match-string msgidx)
for (beg . end) = (flymake-diag-region
source
(string-to-number
(match-string lineidx))
(and colidx
(match-string colidx)
(string-to-number
(match-string colidx))))
for type = (or (and typeidx
(match-string typeidx)
(assoc-default
(match-string typeidx)
python-flymake-msg-alist
#'string-match))
(assoc-default msg
python-flymake-msg-alist
#'string-match)
:error)
if (and beg end)
collect (flymake-make-diagnostic
source beg end type msg) into diags
finally (funcall report-fn diags)))))
where I added an `if (and beg end)' clause around `collect'.
Is that reasonable, or would it be better to make `flymake--highlight-line'
more robust againt a diagnostic with invalid `beg'/`end' slots?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29246
; Package
emacs
.
(Mon, 11 Nov 2019 02:19:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 29246 <at> debbugs.gnu.org (full text, mbox):
Lele Gaifax <lele <at> metapensiero.it> writes:
> I'm trying the following, that seems to fix the issue:
>
> (defun python--flymake-parse-output (source proc report-fn)
> "Collect diagnostics parsing checker tool's output line by line."
> (let ((rx (nth 0 python-flymake-command-output-pattern))
> (lineidx (nth 1 python-flymake-command-output-pattern))
> (colidx (nth 2 python-flymake-command-output-pattern))
> (typeidx (nth 3 python-flymake-command-output-pattern))
> (msgidx (nth 4 python-flymake-command-output-pattern)))
> (with-current-buffer (process-buffer proc)
> (goto-char (point-min))
> (cl-loop
> while (search-forward-regexp rx nil t)
> for msg = (match-string msgidx)
> for (beg . end) = (flymake-diag-region
> source
> (string-to-number
> (match-string lineidx))
> (and colidx
> (match-string colidx)
> (string-to-number
> (match-string colidx))))
> for type = (or (and typeidx
> (match-string typeidx)
> (assoc-default
> (match-string typeidx)
> python-flymake-msg-alist
> #'string-match))
> (assoc-default msg
> python-flymake-msg-alist
> #'string-match)
> :error)
> if (and beg end)
> collect (flymake-make-diagnostic
> source beg end type msg) into diags
> finally (funcall report-fn diags)))))
>
> where I added an `if (and beg end)' clause around `collect'.
>
> Is that reasonable, or would it be better to make `flymake--highlight-line'
> more robust againt a diagnostic with invalid `beg'/`end' slots?
Could you please provide a recipe for how to reproduce the original
issue? Otherwise, it's hard to test your suggested patch.
Could you also send a diff (or patch) with your suggested changes
instead of the full function? Otherwise, it's hard to see what you
have changed. Preferably the diff should be against the current
development version of Emacs (in git).
Thanks in advance.
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29246
; Package
emacs
.
(Sat, 23 Nov 2019 08:20:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 29246 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> Could you please provide a recipe for how to reproduce the original
> issue?
I think this can be closed: I kept the mentioned override in my .emacs.d for a
while, but at some point (sorry, lost track) I tried to remove it and never
experienced the problem again: I'm using stock version since many moons ago.
By any chance, something has been fixed in flymake-diag-region.
Thank you,
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele <at> metapensiero.it | -- Fortunato Depero, 1929.
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Sat, 23 Nov 2019 16:35:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lele Gaifax <lele <at> metapensiero.it>
:
bug acknowledged by developer.
(Sat, 23 Nov 2019 16:35:10 GMT)
Full text and
rfc822 format available.
Message #19 received at 29246-done <at> debbugs.gnu.org (full text, mbox):
Lele Gaifax <lele <at> metapensiero.it> writes:
> Stefan Kangas <stefan <at> marxist.se> writes:
>
>> Could you please provide a recipe for how to reproduce the original
>> issue?
>
> I think this can be closed: I kept the mentioned override in my .emacs.d for a
> while, but at some point (sorry, lost track) I tried to remove it and never
> experienced the problem again: I'm using stock version since many moons ago.
>
> By any chance, something has been fixed in flymake-diag-region.
Thanks for reporting back. Closing now.
Best regards,
Stefan Kangas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 22 Dec 2019 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.