jschaf / esup

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

package.el generates a runtime error #46

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello. When running esup an error is generated:

ERROR: the child emacs had the following errors:
  ERROR(profile-sexp) at /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/package.elc:15: (error Not enough arguments for format string)

Results will be incomplete due to errors.

Total User Startup Time: 0.000sec     Total Number of GC Pauses: 0     Total GC Time: 0.000sec

package.elc:16  0.000sec   50%
(defvar package--default-summary "No description available.")

init.el:3  0.000sec   50%
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)

My init.el begins as:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

I'm running a nightly version of Emacs: 26.0.50 from 6-11 from emacsforosx.com. I'll retest on 25.2.

jschaf commented 7 years ago

Turns out that the error is a red-herring. It was a bug in the actual profiling code. I had an extra format call.

The bug is fixed in https://github.com/jschaf/esup/commit/a589005a9a888537deef94d6fe38a9b8790c97c7. Melpa will have a new release in a few hours. Please reopen if this doesn't fix your bug.

hummuscience commented 4 years ago

I got the same error running esup on a custom file.

ERROR: the child emacs had the following errors:
  ERROR(profile-sexp) at /usr/local/Cellar/emacs-mac/emacs-26.3-z-mac-7.8/share/emacs/26.3/lisp/calendar/calendar.elc:50 with sexp (byte-code

Running esup without prefix works fine. One of the files I am calling (which contains additional init information) is not profiled in detail so I wanted to give it a look and then the error happened.

This portion of the esup report is what I wanted to further profile: Total User Startup Time: 17.325sec Total Number of GC Pauses: 4 Total GC Time: 0.382sec

packages.el:544  6.362sec   36%
(when (and
scimax-load-user-dir
(file-exists-p (expand-file-name "user.el" scimax-user-dir)))
(load (expand-file-name "user.el" scimax-user-dir)))