GNU bug report logs - #46203
28.0.50; flymake doesn't start in java-mode; here is debugger output

Previous Next

Package: emacs;

Reported by: Pankaj Jangid <pankaj <at> codeisgreat.org>

Date: Sun, 31 Jan 2021 05:34:01 UTC

Severity: normal

Tags: moreinfo, patch

Merged with 61668

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 46203 in the body.
You can then email your comments to 46203 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46203; Package emacs. (Sun, 31 Jan 2021 05:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pankaj Jangid <pankaj <at> codeisgreat.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 31 Jan 2021 05:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; flymake doesn't start in java-mode; here is debugger output
Date: Sun, 31 Jan 2021 11:03:20 +0530
1. Start Emacs with -Q flag.
2. (setq debug-on-error t)
3. Open a .java file
4. M-x flymake-mode
5. Move point

Produces this debugger output:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (file-missing "Removing directory" "No such file or directory" "/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00...")
  signal(file-missing ("Removing directory" "No such file or directory" "/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00..."))
  files--force(nil delete-directory-internal "/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00...")
  delete-directory("/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00...")
  flymake-proc--safe-delete-directory("/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00...")
  flymake-proc--delete-temp-directory("/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00...")
  flymake-proc-simple-java-cleanup()
  #f(compiled-function () #<bytecode 0xc1e366f71c32823>)()
  flymake-proc-legacy-flymake(#f(compiled-function (&rest args) #<bytecode 0x1246cb41db097b05>))
  apply(flymake-proc-legacy-flymake #f(compiled-function (&rest args) #<bytecode 0x1246cb41db097b05>) nil)
  flymake--run-backend(flymake-proc-legacy-flymake nil)
  #f(compiled-function (backend) #<bytecode -0x1596ab80e3b651ab>)(flymake-proc-legacy-flymake)
  run-hook-wrapped(#f(compiled-function (backend) #<bytecode -0x1596ab80e3b651ab>) flymake-proc-legacy-flymake)
  flymake-start((on-display) nil)
  #f(compiled-function () #<bytecode -0x112feb3c13c972cf>)()
--8<---------------cut here---------------end--------------->8---



In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.2.0, NS appkit-2022.20 Version 11.1 (Build 20C69))
 of 2021-01-31 built on mb2.local
Repository revision: 0f2d87716a2cb6fae5ea6719763441c448fe7a74
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.1

Configured features:
ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
  value of $LANG: en_IN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  electric-pair-mode: t
  display-line-numbers-mode: t
  savehist-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-completions-mode: t
  global-semantic-idle-scheduler-mode: t
  global-semantic-idle-summary-mode: t
  semantic-mode: t
  global-ede-mode: t
  override-global-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-quote-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t
  hs-minor-mode: t

Load-path shadows:
None found.

Features:
(shadow sort flyspell ispell ol-eww eww xdg url-queue mm-url ol-rmail
ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search ol-docview doc-view
jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org org-macro
org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-plantuml ob-sql ob-css ob-js ob-java ob-C
ob-python python tramp-sh tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat shell pcomplete ls-lisp ob-R ob
ob-tangle org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-emacs-lisp
ob-core ob-eval ol org-loaddefs mail-extr emacsbug utf-7 nndraft nnmh
epa-file gnutls network-stream nsm gnus-agent gnus-srvr gnus-score
score-mode nnvirtual nntp gnus-cache .gnus semantic/analyze/complete
semantic/db-typecache semantic/complete help-fns radix-tree cl-print
debug backtrace flymake-proc flymake compile comint ansi-color warnings
misearch multi-isearch semantic/dep semantic/tag-file ebdb-message
sendmail ebdb-gnus gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start
gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader gnus-win
gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search time-date mail-utils mm-util mail-prsvr vc-git
diff-mode semantic/db-file data-debug cedet-files
semantic/wisent/java-tags semantic/java semantic/decorate/include
semantic/db-find semantic/db-ref semantic/decorate/mode semantic/doc
semantic/wisent/javat-wy cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs hideshow elec-pair
display-line-numbers init savehist edmacro kmacro org-table org-keys
org-compat advice org-macs format-spec srecode/mode semantic/senator
ring semantic/wisent semantic/wisent/wisent semantic/decorate pulse
srecode/insert srecode/filters srecode/args srecode/find srecode/map
srecode/ctxt srecode/compile srecode/dictionary srecode/fields
srecode/table srecode semantic/db-mode semantic/idle semantic/analyze
semantic/sort semantic/scope semantic/analyze/fcn semantic/db
semantic/format semantic/tag-ls semantic/find semantic/ctxt
semantic/util-modes semantic/util semantic pp semantic/tag semantic/lex
semantic/fw mode-local ede/speedbar ede/files ede ede/detect ede/base
ede/auto ede/source eieio-speedbar eieio-custom wid-edit cedet ebdb-mua
ebdb-com crm ebdb-format ebdb mailabbrev eieio-opt speedbar ezimage
dframe find-func eieio-base pcase cal-menu calendar cal-loaddefs
timezone rust-mode rx thingatpt diminish cl-extra help-mode finder-inf
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core server my-init
avoid paren cus-start cus-load my-util info early-init package easymenu
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
kqueue cocoa ns lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 608669 16747)
 (symbols 48 40145 1)
 (strings 32 161760 13390)
 (string-bytes 1 5103534)
 (vectors 16 61491)
 (vector-slots 8 873892 38416)
 (floats 8 312 172)
 (intervals 56 1956 0)
 (buffers 984 30))

-- 
Regards,
Pankaj Jangid

GnuPG Fingerprint: 0B62 7424 3B26 A911 052A DDE6 7C95 6E6F F858 7689




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46203; Package emacs. (Sun, 14 Mar 2021 07:14:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lian Hung Hon <hon.lianhung <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#46203: 28.0.50; flymake doesn't start in java-mode;
 here is debugger
Date: Sun, 14 Mar 2021 12:06:32 +0800
[Message part 1 (text/plain, inline)]
In flymake-proc.el:

(defun flymake-proc--delete-temp-directory (dir-name)
  "Attempt to delete temp dir created by
`flymake-proc-create-temp-with-folder-structure', do not fail on error."
  (let* ((temp-dir    temporary-file-directory)
(suffix      (substring dir-name (1+ (length (directory-file-name
temp-dir))))))

    (while (> (length suffix) 0)
      (setq suffix (directory-file-name suffix))
      ;;+(flymake-log 0 "suffix=%s" suffix)
      (flymake-proc--safe-delete-directory
       (file-truename (expand-file-name suffix temp-dir)))
      (setq suffix (file-name-directory suffix)))))

Line 901 should be

  (let* ((temp-dir    (file-truename temporary-file-directory))

This is because the default value of variable temporary-file-directory
might be abbreviated, so substring does not work correctly. For example, on
my system (Windows) the default value
is "c:/Users/HECTOR~1/AppData/Local/Temp/". It ended up trying to delete my
source directory (!), but fortunately permission is denied.

A workaround is to manually set temporary-file-directory in .emacs to the
correct full path.

Regards,
Hon
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46203; Package emacs. (Sun, 14 Mar 2021 07:14:01 GMT) Full text and rfc822 format available.

Message #11 received at 46203 <at> debbugs.gnu.org (full text, mbox):

From: Lian Hung Hon <hon.lianhung <at> gmail.com>
To: 46203 <at> debbugs.gnu.org
Subject: 28.0.50; flymake doesn't start in java-mode; here is debugger output
Date: Sun, 14 Mar 2021 12:43:55 +0800
[Message part 1 (text/plain, inline)]
In flymake-proc.el:

(defun flymake-proc--delete-temp-directory (dir-name)
  "Attempt to delete temp dir created by
`flymake-proc-create-temp-with-folder-structure', do not fail on error."
  (let* ((temp-dir    temporary-file-directory)
(suffix      (substring dir-name (1+ (length (directory-file-name
temp-dir))))))
    (while (> (length suffix) 0)
      (setq suffix (directory-file-name suffix))
      ;;+(flymake-log 0 "suffix=%s" suffix)
      (flymake-proc--safe-delete-directory
       (file-truename (expand-file-name suffix temp-dir)))
      (setq suffix (file-name-directory suffix)))))

Line 901 should be

  (let* ((temp-dir    (file-truename temporary-file-directory))

This is because the default value of variable temporary-file-directory
might be abbreviated, so substring does not work correctly. For example, on
my system (Windows) the default value is
"c:/Users/HECTOR~1/AppData/Local/Temp/". It ended up trying to delete my
source directory (!), but fortunately permission is denied.

A workaround is to manually set temporary-file-directory in .emacs to the
correct full path.

Regards,
Hon
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46203; Package emacs. (Tue, 14 Jun 2022 13:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 46203 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Lian Hung Hon <hon.lianhung <at> gmail.com>
Cc: 46203 <at> debbugs.gnu.org
Subject: Re: bug#46203: 28.0.50; flymake doesn't start in java-mode; here is
 debugger output
Date: Tue, 14 Jun 2022 15:25:21 +0200
Lian Hung Hon <hon.lianhung <at> gmail.com> writes:

> Line 901 should be
>
>   (let* ((temp-dir    (file-truename temporary-file-directory))
>
> This is because the default value of variable temporary-file-directory might be
> abbreviated, so substring does not work correctly.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I've now made this change in Emacs 29, but even so, it looks somewhat
unsafe to me -- there probably should be more checks here, but I'm not
that familiar with flymake.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46203; Package emacs. (Tue, 14 Jun 2022 13:30:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#46203: 28.0.50; flymake doesn't start in java-mode; here is
 debugger output
Date: Tue, 14 Jun 2022 15:28:54 +0200
Pankaj Jangid <pankaj <at> codeisgreat.org> writes:

> 1. Start Emacs with -Q flag.
> 2. (setq debug-on-error t)
> 3. Open a .java file
> 4. M-x flymake-mode
> 5. Move point
>
> Produces this debugger output:
>
> Debugger entered--Lisp error: (file-missing "Removing directory" "No such file or directory" "/private/var/folders/lf/kn5fshdx4md8xcmv02rntfzr00...")

I'm unable to reproduce this problem, but perhaps the fix proposed by
Lian Hung Hon also fixed what you're seeing here?  Are you still able to
reproduce the problem with the current Emacs 29?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 14 Jun 2022 13:30:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46203; Package emacs. (Tue, 12 Jul 2022 13:50:02 GMT) Full text and rfc822 format available.

Message #22 received at 46203 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 46203 <at> debbugs.gnu.org
Subject: Re: bug#46203: 28.0.50; flymake doesn't start in java-mode; here is
 debugger output
Date: Tue, 12 Jul 2022 15:49:12 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I'm unable to reproduce this problem, but perhaps the fix proposed by
> Lian Hung Hon also fixed what you're seeing here?  Are you still able to
> reproduce the problem with the current Emacs 29?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 46203 <at> debbugs.gnu.org and Pankaj Jangid <pankaj <at> codeisgreat.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 12 Jul 2022 13:50:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Aug 2022 11:24:05 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 09 Oct 2023 14:36:02 GMT) Full text and rfc822 format available.

Forcibly Merged 46203 61668. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 09 Oct 2023 14:36:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Nov 2023 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.