jschaf / esup

ESUP - Emacs Start Up Profiler
401 stars 21 forks source link

Invalid byte code error (cl--defalias) in emacs 24.5 and emacs 25.x #25

Closed kaushalmodi closed 8 years ago

kaushalmodi commented 9 years ago

Hi,

I haven't tried M-x esup in earlier versions but in versions 24.5 (latest stable as of now) and the latest build from git master branch (25.x), I get this error:

Debugger entered--Lisp error: (error "Invalid byte code")
  cl--defalias(cl-values list "Return multiple values, Common Lisp style.\nThe arguments of `cl-values' are the values\nthat the containing function should return.\n\n(fn &rest VALUES)")
  byte-code("\300\301\302\303#\210\300\304\305\306#\207" [cl--defalias cl-values list "Return multiple values, Common Lisp style.\nThe arguments of `cl-values' are the values\nthat the containing function should return.\n\n(fn &rest VALUES)" cl-values-list identity "Return multiple values, Common Lisp style, taken from a list.\nLIST specifies the list of values\nthat the containing function should return.\n\n(fn LIST)"] 4)
  eval((byte-code "\300\301\302\303#\210\300\304\305\306#\207" [cl--defalias cl-values list "Return multiple values, Common Lisp style.\nThe arguments of `cl-values' are the values\nthat the containing function should return.\n\n(fn &rest VALUES)" cl-values-list identity "Return multiple values, Common Lisp style, taken from a list.\nLIST specifies the list of values\nthat the containing function should return.\n\n(fn LIST)"] 4))
  esup-child-profile-sexp(3554 3979 1)
  esup-child-profile-buffer(#<buffer cl-lib.elc> 1)
  esup-child-profile-file("cl-lib" 1)
  esup-child-profile-sexp(6215 6232 0)
  esup-child-profile-buffer(#<buffer init.el> 0)
  esup-child-profile-file("/home/kmodi/.emacs.d/init.el" 0)
  esup-child-run("/home/kmodi/.emacs.d/init.el" "53398")
  eval((esup-child-run "/home/kmodi/.emacs.d/init.el" "53398"))
  command-line-1(("-L" "/home/kmodi/.emacs.d-master/elpa_25_0/esup-20150519.1701/" "-l" "esup-child" "--eval=(esup-child-run \"/home/kmodi/.emacs.d/init.el\" \"53398\")"))
  command-line()
  normal-top-level()
jschaf commented 9 years ago

Emacs byte-code isn't stable between versions. It looks like esup is struggle with a newer version of byte code.

Please post the contents of *esup-log*. It probably won't appear by default, but it does exist.

kaushalmodi commented 9 years ago

Thanks for looking into it.

Here are links to stuff that might help with the debug:

Wilfred commented 9 years ago

For what it's worth, I saw this too:

Debugger entered--Lisp error: (void-variable defalias)
  eval(defalias)
  esup-child-profile-sexp(51461 51469 1)
  esup-child-profile-buffer(#<buffer smartparens.elc> 1)
  esup-child-profile-file("smartparens" 1)
  esup-child-profile-sexp(4572 4594 0)
  esup-child-profile-buffer(#<buffer init.el> 0)
  esup-child-profile-file("/home/wilfred/.emacs.d/init.el" 0)
  esup-child-run("/home/wilfred/.emacs.d/init.el" "50454")
  eval((esup-child-run "/home/wilfred/.emacs.d/init.el" "50454"))
  command-line-1(("-L" "/home/wilfred/.emacs.d/elpa/esup-20150519.1701/" "-l" "esup-child" "--eval=(esup-child-run \"/home/wilfred/.emacs.d/init.el\" \"50454\")"))
  command-line()
  normal-top-level()

Deleting all the smartparens/*.elc files and bytecompiling afresh does not help.

jschaf commented 9 years ago

Ok, I'll investigate. The tricky part is isolating the issue.

On Tue, Sep 29, 2015 at 5:14 PM, Wilfred Hughes notifications@github.com wrote:

For what it's worth, I saw this too:

Debugger entered--Lisp error: (void-variable defalias) eval(defalias) esup-child-profile-sexp(51461 51469 1) esup-child-profile-buffer(# 1) esup-child-profile-file("smartparens" 1) esup-child-profile-sexp(4572 4594 0) esup-child-profile-buffer(# 0) esup-child-profile-file("/home/wilfred/.emacs.d/init.el" 0) esup-child-run("/home/wilfred/.emacs.d/init.el" "50454") eval((esup-child-run "/home/wilfred/.emacs.d/init.el" "50454")) command-line-1(("-L" "/home/wilfred/.emacs.d/elpa/esup-20150519.1701/" "-l" "esup-child" "--eval=(esup-child-run \"/home/wilfred/.emacs.d/init.el\" \"50454\")")) command-line() normal-top-level()

Deleting all the smartparens/*.elc files and bytecompiling afresh does not help.

— Reply to this email directly or view it on GitHub https://github.com/jschaf/esup/issues/25#issuecomment-144193200.

destroyhimmyrobots commented 8 years ago

I was able to reproduce this with (require 'dired-x) enabled during profiling. Disabling debugging when profiling (https://github.com/jschaf/esup/pull/37) works around this issue.

jschaf commented 8 years ago

Can you give it a try now that debugging is disabled?

kaushalmodi commented 8 years ago

I now get this error:

Debugger entered--Lisp error: (file-error "make server process failed" "Success" :name "esup-server" :type nil :server t :host local :service t :family nil :nowait t :stop nil :buffer "esup-log" :coding utf-8 :noquery t :filter esup--server-filter :sentinel esup--server-sentinel :log esup--server-logger) make-network-process(:name "esup-server" :type nil :server t :host local :service t :family nil :nowait t :stop nil :buffer "esup-log" :coding utf-8 :noquery t :filter esup--server-filter :sentinel esup--server-sentinel :log esup--server-logger) esup-server-create(t) esup(nil)

Looks like you are seeing the same issue too.

Currently, I am on the latest master build.

destroyhimmyrobots commented 8 years ago

It looks like I was mistaken, and had dired-x disabled while testing this, so evidently #37 doesn't work around the invalid byte-code issue. (Sorry @jschaf). I haven't seen the trace you mentioned on the latest master, however.

jschaf commented 8 years ago

@kaushalmodi I found a work-around by removing the :nowait t, or setting it to nil. I'm still not exactly sure what changed in make-network-process.

kaushalmodi commented 8 years ago

@jschaf Thanks! That worked for me too. I'll close this issue as the fix seems to be done in the master. But if removing :nowait t works for any emacs version, please commit that.

jschaf commented 8 years ago

Glad it worked. I'll change it tonight.