jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.9k stars 260 forks source link

elpy and setting auto-save-timeout to nil causes bell; Relates to the "<t> is undefined" problem #1396

Open bgoodr opened 6 years ago

bgoodr commented 6 years ago

Summary

Jorgen, feel free to close this as will not fix if you think it isn't an elpy issue but a core Emacs problem. I'm just posting this here for info for others who are plagued with this problem when using elpy, or for whoever wants to do more digging to find the ultimate root cause.

I needed to debug down to the root cause of the "\<t> is undefined" error that seems to be plagueing us users of company-mode and elpy mode, as reported in these items:

  1. https://github.com/jorgenschaefer/elpy/issues/1299
  2. https://github.com/company-mode/company-mode/issues/760

When I had all of my .emacs enabled, I would see my typing in "print" Python statement would fail on the "n" and I would get a message of:

<t> is undefined

Using (toggle-debug-on-error) does not help at all. It seems to be asynchronous and low level. I even suspect core Emacs itself here versus company-mode or elpy, per se.

I isolated it down to the steps to reproduce below using a Bash script. At some point, the "\<t> is undefined" error disappeared, but was replaced with a similar problem whereby the bell would chime instead (i.e., instead of "\<t> is undefined" error disappeared a bell would occur and no error would be shown).

After debugging, I found that when I set auto-save-timeout to nil (its doc string says you can!) then the bell is rung when you type the 'n' in 'print' inside a Python buffer, and the "n" is lost, leaving you with "prit" in the buffer. But when I stopped setting auto-save-timeout to nil, but left it as its default of 30 (seconds), the problem disappeared as well as the problem with the original "\<t> is undefined" error.

Steps to reproduce

Store the following into a Bash script, give it execute permissions, and execute it. But when you do, and you type 'print', you will see 'prit' instead and a bell rings. But if you go back and fix it so that it reads 'print', then subsequent typing in of 'print' do not ring the bell.

Note that I'm moving aside the .emacs.d directory and pulling elpy and its dependent packags from Melpa to ensure there are no other interactions other that the packages involved.

set -e  # Fail upon first non-zero exit code

saved_emacs_d_dir=$HOME/.emacs.d.321721e1-183a-4bc8-b6b6-d7d05b363214
if [ ! -d "$saved_emacs_d_dir" ]
then
  echo "Note: Moving .emacs.d"
  mv $HOME/.emacs.d $saved_emacs_d_dir
fi

cat > /tmp/somefile.py <<'EOF'
# Just start typing these characters "p r i n t" and then notice you end up with "p r i t" but the bell rings on the 'n' or the 't':

EOF

cat > /tmp/testing.el <<'EOF'
(defun bg-install-package (package)
  "Derived from code at https://realpython.com/blog/python/emacs-the-best-python-editor/ "

  ;; FINDING PACKAGE DEPENDENCIES:
  ;;
  ;; To see dependencies see
  ;; https://yoo2080.wordpress.com/2014/05/16/how-to-list-emacs-package-dependencies/
  ;; and do this inside a lisp-interaction buffer:
  ;;
  ;;    (pp package-alist)
  ;;
  ;; then you can search down to see what package depends upon what other
  ;; packages.  Often the .emacs.d directory gets out of whack so much that I
  ;; could not even reinstall deleted packages and so had to give up and just
  ;; remove all of .emacs.d and reinvoke emacs that then reinvoked calls to this
  ;; function to repair it.

  (require 'package)
  (add-to-list 'package-archives
               '("melpa" . "https://melpa.org/packages/"))
  (package-initialize)
  (when (not package-archive-contents)
    (package-refresh-contents))
  (unless (package-installed-p package)
    (package-install package)))

(progn

  ;; Insure all packages are installed
  (bg-install-package 'elpy)

  ;; Enable the package:
  (elpy-enable)

  ;; As required by the Issue posting:
  (elpy-config)

  ;; Write out the package-alist to a file for the Issue posting,
  ;; showing the specific versions present at time of execution:
  (with-temp-file "/tmp/package-alist.dump.el"
    (insert (pp-to-string package-alist) "\n"))

  ;; Disable autosaving (this was pre-Emacs-25 code whereby I probably do not need to modify
  ;; the default value of auto-save-timeout anymore):
  (setq auto-save-default nil)
  (setq auto-save-interval 0)
  ;;
  ;; Comment out the next line and the bell ringing problem disappears:
  (setq auto-save-timeout nil)

  ;; Find the above generated Python file to start typing into:
  (find-file "/tmp/somefile.py"))

EOF

emacs -Q --eval '(load-file "/tmp/testing.el")'

Contents of the /tmp/package-alist.dump.el referenced above

((elpy
  [cl-struct-package-desc elpy
                          (20180613 1353)
                          "Emacs Python Development Environment"
                          ((company
                            (0 9 2))
                           (emacs
                            (24 4))
                           (find-file-in-project
                            (3 3))
                           (highlight-indentation
                            (0 5 0))
                           (pyvenv
                            (1 3))
                           (yasnippet
                            (0 8 0))
                           (s
                            (1 11 0)))
                          nil nil "/home/brentg/.emacs.d/elpa/elpy-20180613.1353" nil nil])
 (company
  [cl-struct-package-desc company
                          (20180615 1508)
                          "Modular text completion framework"
                          ((emacs
                            (24 3)))
                          nil nil "/home/brentg/.emacs.d/elpa/company-20180615.1508"
                          ((:url . "http://company-mode.github.io/")
                           (:keywords "abbrev" "convenience" "matching"))
                          nil])
 (find-file-in-project
  [cl-struct-package-desc find-file-in-project
                          (20180524 223)
                          "Find file/directory and review Diff/Patch/Commit efficiently everywhere"
                          ((ivy
                            (0 10 0))
                           (emacs
                            (24 3)))
                          nil nil "/home/brentg/.emacs.d/elpa/find-file-in-project-20180524.223"
                          ((:url . "https://github.com/technomancy/find-file-in-project")
                           (:keywords "project" "convenience")
                           (:commit . "ae34c8e02d18da0a5fbd8f3f0661069157d71c73"))
                          nil])
 (ivy
  [cl-struct-package-desc ivy
                          (20180615 1356)
                          "Incremental Vertical completYon"
                          ((emacs
                            (24 1)))
                          nil nil "/home/brentg/.emacs.d/elpa/ivy-20180615.1356"
                          ((:url . "https://github.com/abo-abo/swiper")
                           (:keywords "matching"))
                          nil])
 (highlight-indentation
  [cl-struct-package-desc highlight-indentation
                          (20171218 137)
                          "Minor modes for highlighting indentation" nil nil nil "/home/brentg/.emacs.d/elpa/highlight-indentation-20171218.137"
                          ((:url . "https://github.com/antonj/Highlight-Indentation-for-Emacs")
                           (:commit . "35e2c1d4f8f368685893128f77f90454cb9c2708"))
                          nil])
 (pyvenv
  [cl-struct-package-desc pyvenv
                          (20180525 530)
                          "Python virtual environment interface" nil nil nil "/home/brentg/.emacs.d/elpa/pyvenv-20180525.530"
                          ((:url . "http://github.com/jorgenschaefer/pyvenv")
                           (:keywords "python" "virtualenv" "tools")
                           (:commit . "fa76fe18e290e318dbd17fd6f90ae0c492bea8b5"))
                          nil])
 (yasnippet
  [cl-struct-package-desc yasnippet
                          (20180606 1722)
                          "Yet another snippet extension for Emacs."
                          ((cl-lib
                            (0 5)))
                          nil nil "/home/brentg/.emacs.d/elpa/yasnippet-20180606.1722"
                          ((:url . "http://github.com/joaotavora/yasnippet")
                           (:keywords "convenience" "emulation")
                           (:commit . "e67592ce1bd4ccc533107765bdfebfa02e9fb945"))
                          nil])
 (s
  [cl-struct-package-desc s
                          (20180406 108)
                          "The long lost Emacs string manipulation library." nil nil nil "/home/brentg/.emacs.d/elpa/s-20180406.108"
                          ((:keywords "strings")
                           (:commit . "03410e6a7a2b11e47e1fea3b7d9899c7df26435e"))
                          nil]))

My configuration

Emacs version

GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22, modified by Debian

OS

lsb_release -r -i:

Distributor ID: Ubuntu
Release:    17.10

Result of (elpy-config)

Elpy Configuration

Virtualenv........: None
RPC Python........: 2.7.14 (/home/brentg/conda/Ubuntu.17.10.miniconda2/envs/env1/bin/python)
Interactive Python: python (/home/brentg/conda/Ubuntu.17.10.miniconda2/envs/env1/bin/python)
Emacs.............: 25.2.2
Elpy..............: 1.21.0
Jedi..............: 0.12.0
Rope..............: Not found
Autopep8..........: 1.3.5
Yapf..............: Not found
Black.............: Not found
Syntax checker....: flake8 (/home/brentg/conda/Ubuntu.17.10.miniconda2/envs/env1/bin/flake8)

You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.

The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH -- and then do
`elpy-rpc-restart'.

The yapf package is not available. Commands using this will not work.

[run] python -m pip install --user yapf

The black package is not available. Commands using this will not work.

[run] python -m pip install --user black

Options

`Raised' text indicates buttons; type RET or click mouse-1 on a button
to invoke its action.  Invoke [+] to expand a group, and [-] to
collapse an expanded group.  Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.

[+]-- Group Elpy
[+]-- Group Python
[+]-- Group Virtual Environments (Pyvenv)
[+]-- Group Completion (Company)
[+]-- Group Call Signatures (ElDoc)
[+]-- Group Inline Errors (Flymake)
[+]-- Group Snippets (YASnippet)
[+]-- Group Directory Grep (rgrep)
[+]-- Group Search as You Type (ido)
[+]-- Group Django extension
[+]-- Group Autodoc extension

Elpy configuration in my init.el

I think this is not applicable since I'm running it all under -Q so am using all of the defaults.

jorgenschaefer commented 6 years ago

Wow. Thank you so much for this extensive report and the work you put into it! I'm afraid I do not currently have the time to look closer into it, but I'll try to revisit this next week.

bgoodr commented 6 years ago

You are most welcome. I am very very thankful for the efforts you do put in when time permits. This is not critical ... I have my workaround in place.

jorgenschaefer commented 6 years ago

Hm. I just did docker run --rm -it ubuntu:17.10 bash, used apt-get install emacs python python-pip and tried your reproduction script. I could type print without any error. :-(

bgoodr commented 6 years ago

That is interesting, but I don't use docker. Given that there are timers involved, this may be timing sensitive. I don't know how the use of docker would affect that timing. This may actually be an issue with the vanilla Emacs somehow, but that is pure speculation.

I am in the middle of a house move so I can't play around with this for about another month or 3. I'll revisit it then ... maybe with a clearer head and mindset to come up with a debug ritual.

jorgenschaefer commented 6 years ago

That is interesting, but I don't use docker.

Yeah, well, I don't use Ubuntu nor Emacs 25.2, so this is the closest I can get to your setup I'm afraid. If it is indeed a timing issue, I might not be able to reproduce it on my hardware at all. I'm sorry I can't be of more use here :-(

You could try and evaluate the following form, maybe that will help producing a traceback with debug-on-error:

(defun elpy-promise-resolve (promise value)
  "Resolve PROMISE with VALUE."
  (when (not (elpy-promise-resolved-p promise))
    (unwind-protect
        (let ((success-callback (elpy-promise-success-callback promise)))
          (when success-callback
            (with-current-buffer (elpy-promise-buffer promise)
                  (funcall success-callback value))))
      (elpy-promise-set-resolved promise))))
bgoodr commented 6 years ago

Duly noted. I'll try that later on when I can.

On Fri, Jul 6, 2018 at 9:14 AM Jorgen Schäfer notifications@github.com wrote:

That is interesting, but I don't use docker.

Yeah, well, I don't use Ubuntu nor Emacs 25.2, so this is the closest I can get to your setup I'm afraid. If it is indeed a timing issue, I might not be able to reproduce it on my hardware at all. I'm sorry I can't be of more use here :-(

You could try and evaluate the following form, maybe that will help producing a traceback with debug-on-error:

(defun elpy-promise-resolve (promise value) "Resolve PROMISE with VALUE." (when (not (elpy-promise-resolved-p promise)) (unwind-protect (let ((success-callback (elpy-promise-success-callback promise))) (when success-callback (with-current-buffer (elpy-promise-buffer promise) (funcall success-callback value)))) (elpy-promise-set-resolved promise))))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jorgenschaefer/elpy/issues/1396#issuecomment-403079640, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIoBzshgoM-eXuoBB8CQoGDFoClPLH-ks5uD4z8gaJpZM4UrAO4 .

vkazanov commented 5 years ago

Emacs 26.1, latest Elpy and company here. Same bug.

I evaled the code you supplied with debug-on-error - still get that nasty message, no debugger kicks in. Setting auto-save-timeout to non-zero also helps.

dgutov commented 5 years ago

I have tried running the script, but unfortunately the config shows

Virtualenv........: None
RPC Python........: 2.7.15 (/usr/bin/python)
Interactive Python: python (/usr/bin/python)
Emacs.............: 26.1.90
Elpy..............: 1.27.0
Jedi..............: Not found

even after I run python -m pip install --user jedi and restart. Hence no completion, and no way for me to reproduce. Sorry.

dgutov commented 5 years ago

@bgoodr @vkazanov

It might help if you also test this scenario with an Emacs build from the current master. Bug#23980 is fixed there, but not in any release version.

vkazanov commented 5 years ago

@dgutov I already checked that bug and tried the current master. It crashes on start up my machine so no way forward for me here:-) Do you know if the fix will be included in the next release of 26.x series? Going through comments it seems that it will not?

dgutov commented 5 years ago

It crashes on start up my machine so no way forward for me here:-)

A bug report would be helpful.

Do you know if the fix will be included in the next release of 26.x series?

It is not. If I had some evidence that it fixes your problem, I could argue for its inclusion.

Another thing you can try is apply the patch to emacs-26 locally, rebuild, and verify that the problem is gone. The patch is here: http://git.savannah.gnu.org/cgit/emacs.git/patch/?id=1f3f4b1296613b8cdc0632a68fde86e86ddad866

vkazanov commented 5 years ago

@dgutov Ok. I'll try both tomorrow morning, i.e.:

  1. See I can build Emacs master branch and if it has the problem.
  2. Apply the patch to Emacs 26.1 and see if this fixes the problem.

Is that correct?

dgutov commented 5 years ago

Apply the patch to Emacs 26.1

The current contents of the emacs-26 branch, please.

dgutov commented 5 years ago

But if the patch helps, try the build without the patch, too. So we're 100% sure that it's the patch that fixes the problem.

vkazanov commented 5 years ago

@dgutov ok, will check both heads of both emacs-26 and master branches.

vkazanov commented 5 years ago

@dgutov first checks done

  1. master: unable to reproduce with both auto-save-timeout nil and set to 60
  2. emacs-26 branch: reproduced with auto-save-timeout set to nil, unable to reproduce with auto-save-timeout set to 60

will now apply the patch to the emacs-26 branch

side note: emasc-26 branch crashes when run as emacs --fg-daemon. I have a trace generated from the core. Where do I report it?

vkazanov commented 5 years ago
  1. emacs-26 branch, with the commit you specified applied: with both auto-save-timeout set to nil and set to 60 i was unable to reproduce the bug.

So, this commit does fix the issue.

dgutov commented 5 years ago

Thank you.

I have a trace generated from the core. Where do I report it?

Please call M-x report-emacs-bug and see the instructions in there.

dgutov commented 5 years ago

The fix is backported now, will be in Emacs 26.2.

vkazanov commented 5 years ago

@dgutov thanks a lot! that bug is really annoying :-) Looking forward to the release.

dgutov commented 5 years ago

No problem.

Please call M-x report-emacs-bug

I haven't seen that bug report, BTW.

vkazanov commented 5 years ago

@dgutov

I'll report today, didn't get a minute to rebuild that branch yet.

vkazanov commented 5 years ago

@dgutov

Sorry for the delay. The bug turned out to be not so easy to isolate. Raw emacs-26 branch works just fine when run as emacs -Q . But I use lots of various packages, and the crash only happens when I call helm-M-x and only in daemon mode.

I can't properly do report-emacs-bug as it crashes whenever I try to type a command.

here's the trace using gdb (not sure if it helps though):

(gdb) bt
#0  0x00007f7835f16727 in raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00000000004f9d97 in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:394
#2  0x00000000005145a3 in emacs_abort () at sysdep.c:2426
#3  0x0000000000570e70 in signal_or_quit (error_symbol=..., data=..., keyboard_quit=keyboard_quit@entry=false) at eval.c:1551
#4  0x0000000000570ebc in Fsignal (error_symbol=..., error_symbol@entry=..., data=...) at eval.c:1521
#5  0x0000000000570ee7 in xsignal (data=..., error_symbol=...) at lisp.h:3854
#6  0x0000000000570ee7 in xsignal1 (error_symbol=error_symbol@entry=..., arg=..., arg@entry=...) at eval.c:1658
#7  0x000000000048f679 in Fcheck_coding_system (coding_system=coding_system@entry=...) at coding.c:8549
#8  0x00000000004a09b5 in code_convert_string (string=..., coding_system=..., dst_object=..., encodep=<optimised out>, nocopy=<optimised out>, norecord=<optimised out>) at coding.c:9448
#9  0x000000000052c15a in Fexpand_file_name (name=..., name@entry=..., default_directory=..., default_directory@entry=...) at fileio.c:1116
#10 0x000000000052bc35 in Fexpand_file_name (name=..., default_directory=..., default_directory@entry=...) at fileio.c:871
#11 0x0000000000531662 in Fdo_auto_save (no_message=..., no_message@entry=..., current_only=..., current_only@entry=...) at fileio.c:5595
#12 0x00000000004f9bb2 in shut_down_emacs (sig=sig@entry=11, stuff=stuff@entry=...) at emacs.c:2104
#13 0x00000000004f9dc3 in terminate_due_to_signal (sig=sig@entry=11, backtrace_limit=backtrace_limit@entry=40) at emacs.c:377
#14 0x00000000005129ce in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1769
#15 0x0000000000512be8 in deliver_thread_signal (sig=11, handler=0x5129c0 <handle_fatal_signal>) at sysdep.c:1743
#16 0x0000000000512c6c in deliver_fatal_thread_signal (sig=<optimised out>) at sysdep.c:1781
#17 0x0000000000512c6c in handle_sigsegv (sig=<optimised out>, siginfo=<optimised out>, arg=<optimised out>) at sysdep.c:1866
#18 0x00007f7835f16890 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
#19 0x000000000057d3fc in XINT (a=...) at lisp.h:950
#20 0x000000000057d3fc in HASH_INDEX (idx=2224721850465380289, h=0x7d1bb10) at fns.c:3639
#21 0x000000000057d3fc in hash_lookup (h=h@entry=0x7d1bb10, key=key@entry=..., hash=hash@entry=0x0) at fns.c:3962
#22 0x000000000057d4a6 in Fgethash (key=key@entry=..., table=..., dflt=..., dflt@entry=...) at fns.c:4658
#23 0x00000000005d5bf1 in ftfont_lookup_cache (key=..., cache_for=cache_for@entry=FTFONT_CACHE_FOR_FACE) at ftfont.c:370
#24 0x00000000005d7d0e in ftfont_close (font=0x7556c70) at ftfont.c:1254
#25 0x0000000000552b96 in cleanup_vector (vector=vector@entry=0x7556c70) at alloc.c:3195
#26 0x0000000000554028 in sweep_vectors () at alloc.c:3254
#27 0x00000000005580d7 in gc_sweep () at alloc.c:7163
#28 0x00000000005580d7 in garbage_collect_1 (end=<optimised out>) at alloc.c:6027
#29 0x00000000005580d7 in Fgarbage_collect () at alloc.c:6159
#30 0x000000000057058b in maybe_gc () at lisp.h:4744
#31 0x000000000057058b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7ffcac833730) at eval.c:2758
#32 0x00000000005707ea in call1 (fn=..., fn@entry=..., arg1=..., arg1@entry=...) at eval.c:2627
#33 0x00000000005973cc in readevalloop (readcharfun=readcharfun@entry=..., infile0=infile0@entry=0x7ffcac8338d0, sourcename=..., 
    sourcename@entry=..., printflag=printflag@entry=false, unibyte=unibyte@entry=..., readfun=..., readfun@entry=..., start=..., end=...) at lread.c:1933
#34 0x0000000000597dd4 in Fload (file=..., noerror=..., noerror@entry=..., nomessage=nomessage@entry=..., nosuffix=..., nosuffix@entry=..., must_suffix=...) at lread.c:1435
#35 0x000000000057ea85 in Frequire (feature=..., filename=..., noerror=...) at fns.c:2807
#36 0x00000000005717ee in funcall_subr (subr=0xb7abc0 <Srequire>, numargs=numargs@entry=1, args=args@entry=0x7ffcac833af0) at eval.c:2856
#37 0x0000000000570722 in Ffuncall (nargs=2, args=args@entry=0x7ffcac833ae8) at eval.c:2776
#38 0x00000000005ab240 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=<optimised out>, args=<optimised out>) at bytecode.c:630
#39 0x00000000005729fb in eval_sub (form=...) at eval.c:2247
#40 0x0000000000597495 in readevalloop (readcharfun=readcharfun@entry=..., infile0=infile0@entry=0x7ffcac834060, sourcename=..., 
    sourcename@entry=..., printflag=printflag@entry=false, unibyte=..., unibyte@entry=..., readfun=..., readfun@entry=..., start=..., end=...) at lread.c:2048
#41 0x0000000000597dd4 in Fload (file=..., noerror=..., noerror@entry=..., nomessage=nomessage@entry=..., nosuffix=..., nosuffix@entry=..., must_suffix=...) at lread.c:1435
#42 0x000000000057ea85 in Frequire (feature=..., filename=..., noerror=...) at fns.c:2807
#43 0x00000000005717ee in funcall_subr (subr=0xb7abc0 <Srequire>, numargs=numargs@entry=1, args=args@entry=0x7ffcac834280) at eval.c:2856
#44 0x0000000000570722 in Ffuncall (nargs=2, args=args@entry=0x7ffcac834278) at eval.c:2776
#45 0x00000000005ab240 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=<optimised out>, args=<optimised out>) at bytecode.c:630
#46 0x00000000005729fb in eval_sub (form=...) at eval.c:2247
---Type <return> to continue, or q <return> to quit---
#47 0x0000000000597495 in readevalloop (readcharfun=readcharfun@entry=..., infile0=infile0@entry=0x7ffcac834770, sourcename=..., 
    sourcename@entry=..., printflag=printflag@entry=false, unibyte=..., unibyte@entry=..., readfun=..., readfun@entry=..., start=..., end=...) at lread.c:2048
#48 0x0000000000597dd4 in Fload (file=..., noerror=..., noerror@entry=..., nomessage=nomessage@entry=..., nosuffix=..., nosuffix@entry=..., must_suffix=..., must_suffix@entry=...)
    at lread.c:1435
#49 0x0000000000571ce0 in Fautoload_do_load (fundef=..., funname=..., macro_only=...) at eval.c:2029
#50 0x00000000005717ee in funcall_subr (subr=0xb796c0 <Sautoload_do_load>, numargs=numargs@entry=2, args=args@entry=0x7ffcac8349a0) at eval.c:2856
#51 0x0000000000570722 in Ffuncall (nargs=3, args=args@entry=0x7ffcac834998) at eval.c:2776
#52 0x00000000005ab240 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=nargs@entry=140723202771408, args=<optimised out>, args@entry=0x17ffcac834cb8)
    at bytecode.c:630
#53 0x0000000000572dbf in funcall_lambda (fun=..., nargs=140723202771408, nargs@entry=1, arg_vector=0x17ffcac834cb8, arg_vector@entry=0x7ffcac834cb8) at eval.c:2977
#54 0x000000000057069d in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7ffcac834cb0) at eval.c:2790
#55 0x00000000005707ea in call1 (fn=..., fn@entry=..., arg1=...) at eval.c:2627
#56 0x0000000000508e54 in command_loop_1 () at keyboard.c:1482
#57 0x000000000056f88e in internal_condition_case (bfun=bfun@entry=0x508a30 <command_loop_1>, handlers=..., handlers@entry=..., hfun=hfun@entry=0x4ff030 <cmd_error>) at eval.c:1336
#58 0x00000000004fa184 in command_loop_2 (ignore=..., ignore@entry=...) at keyboard.c:1110
#59 0x000000000056f7fd in internal_catch (tag=..., tag@entry=..., func=func@entry=0x4fa160 <command_loop_2>, arg=..., arg@entry=...) at eval.c:1101
#60 0x00000000004fa11b in command_loop () at keyboard.c:1089
#61 0x00000000004fec43 in recursive_edit_1 () at keyboard.c:695
#62 0x00000000004fef66 in Frecursive_edit () at keyboard.c:766
#63 0x000000000041b822 in main (argc=<optimised out>, argv=0x7ffcac8350f8) at emacs.c:1717
vkazanov commented 5 years ago

calling (report-emacs-bug) using M-: also crashes Emacs :-(

dgutov commented 5 years ago

here's the trace using gdb (not sure if it helps though)

It probably helps, but I'm not the person to analyze it.

You don't actually have to send the report from the same Emacs where you see the problem. Or you can call M-x report-emacs-bug in an emacs -Q session, type the whole report there, then copy everything and send it with e.g. Thunderbird. Or just temporarily disable Helm.

vkazanov commented 5 years ago

@dgutov done. I don't see the email yet but it should on it's way.