Subject: 24.4; Hanging process on OS X Yosemite when launching Cocoa built Emacs.app

From: Imre Horvath <[email-masked]>
Date: Sun, 29 Mar 2015 20:18:01 +0200

Hi,

The Cocoa built Emacs.app fails to launch and hangs with
high cpu usage when the physical memory is nearly full because of other
apps and the caching on OS X Yosemite.

After killing the hanging Emacs.app process and launching again, it
opens without any problem.

The problem happens only when launching with GUI. It never happens when
running emacs in the terminal with the -nw option.

I've got 2+2 GB physical ram in my Mac Book Pro 13'.

There are other complaints from Mac users describing the same
problem. eg.

https://github.com/Homebrew/homebrew/issues/25003 <https://github.com/Homebrew/homebrew/issues/25003>
https://groups.google.com/forum/#!topic/gnu.emacs.help/MGDN12Rf4QM <https://groups.google.com/forum/#!topic/gnu.emacs.help/MGDN12Rf4QM>

I've got the feeling that this issue is somehow related to the interplay
between the Cocoa Emacs.app startup code and the memory management in OS
X Yosemite.

Please advise!
Thanks, brgds,
Imre

In GNU Emacs 24.4.1 (x86_64-apple-darwin14.1.0, NS apple-appkit-1344.72)
of 2015-03-14 on Imre-Horvaths-MacBook-Pro.local
Windowing system distributor `Apple', version 10.3.1344
Configured using:
`configure --prefix=/usr/local/Cellar/emacs/24.4
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs/24.4/share/info/emacs --without-dbus
--without-gnutls --with-ns --disable-ns-self-contained'

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  paredit-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  projectile-global-mode: t
  projectile-mode: t
  flx-ido-mode: t
  ido-everywhere: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r a p o r t - e m a <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <M-backspace> r 
e p o r t - e m a <tab> <return>

Recent messages:
Loading /Users/imi/.emacs.d/custom.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils paredit flycheck find-func help-mode rx subr-x
projectile ibuf-ext ibuffer dash thingatpt flx-ido byte-opt bytecomp
byte-compile cconv advice help-fns flx ido exec-path-from-shell info
easymenu package epg-config paren edmacro kmacro cl-loaddefs cl-lib
saveplace time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process cocoa ns
multi-tty emacs)

Memory information:
((conses 16 148680 7749)
(symbols 48 24600 0)
(miscs 40 45 114)
(strings 32 35988 9303)
(string-bytes 1 1008417)
(vectors 16 17993)
(vector-slots 8 499286 3001)
(floats 8 91 178)
(intervals 56 205 62)
(buffers 960 11))