New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm-projectile crashes/breaks emacs on Mac OS X #600

Closed
smolyn opened this Issue Jan 8, 2015 · 46 comments

Comments

Projects
None yet
8 participants
@smolyn

smolyn commented Jan 8, 2015

Ok, I realize this isn't necessarily a Helm/Projectile bug. However, in some ways I'm filing this perhaps for help with how to properly present this bug to Emacs developers.

Emacs on Mac OS X in windowed mode (using nsterm.m) will crash (in 24.4) or break (in 25) when using helm-projectile with a largish project (28k files).

There are several bugs filed with Emacs (one by me),
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18345
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19531

The Emacs maintainers apparently don't realize there are lisp projects out there, so it looks like there is a bit of pushback.
Unfortunately I don't have time (or knowledge) of how to reproduce this bug. I'm pretty sure it has something to do with the async aspects of populating/updating the minibuffer with the fuzzy search items.
This is unfortunately making helm-projectile harder for me to use, as I have to run emacs in a terminal instead of in windowed mode.
I'm happy to help in any way I can, within the time constraints I have available.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 8, 2015

What type of VCS does your project use? If it's git, e30k to 50k is no problem. It works even on Windows. Could you paste your Error backtrace? Helm Projectile only reuses the source from Projectile. Could you try with helm-mode disabled and plain projectile-find-file to see if it still crashes. If so, it's probably Emacs's problem.

Edit: no need to paste the backtrace here. I looked at the bug reports.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 8, 2015

And you should increase memory to be used before garbage collecting, by setting this:

(setq gc-cons-threshold 100000000)

You set the threshold to 100MB and try again if it still crashes.

@smolyn

This comment has been minimized.

smolyn commented Jan 8, 2015

Ok with helm-mode disabled, everything works as expected (no crash, no breakage in 25.0.50).

You can see my crash output on this bug thread:
http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-01/msg00112.html

I think it definitely is a bug in Emacs, only made apparent by something helm is doing.

I don't know the best way to get the Emacs team to fix it though, because I'm pretty sure I can't reproduce it without loading all of helm (and it doesn't sound like thats the way they want to debug/test).

@smolyn

This comment has been minimized.

smolyn commented Jan 8, 2015

here's the xbacktrace from the crash:
"redisplay_internal (C function)" (0x53dbf0)
"read-from-minibuffer" (0x5fbfc568)
"helm-read-pattern-maybe" (0x5fbfc6a8)
0x1a776850 PVEC_COMPILED
"funcall" (0x5fbfc7d0)
0x1a775928 PVEC_COMPILED
"funcall" (0x5fbfcac0)
"helm-internal" (0x5fbfcd98)
"apply" (0x5fbfcec0)
"helm" (0x5fbfcff8)
"apply" (0x5fbfd120)
"helm" (0x5fbfd260)
"helm-projectile-find-file" (0x5fbfd428)
"projectile-switch-project-by-name" (0x5fbfd4c0)
"let" (0x5fbfd6c0)
0x1a825eb0 Lisp type 6
"apply" (0x5fbfd948)
"helm-funcall-with-source" (0x5fbfda80)
"helm-execute-selection-action-1" (0x5fbfdbb0)
"helm-execute-selection-action" (0x5fbfdcc0)
0x1a66a3b0 PVEC_COMPILED
"funcall" (0x5fbfddf0)
0x1a66a338 PVEC_COMPILED
"funcall" (0x5fbfe0e0)
"helm-internal" (0x5fbfe3b8)
"apply" (0x5fbfe4e0)
"helm" (0x5fbfe618)
"apply" (0x5fbfe740)
"helm" (0x5fbfe880)
"helm-projectile-switch-project" (0x5fbfea48)
0x534268 PVEC_SUBR
"ad-Advice-call-interactively" (0x5fbfed78)
"apply" (0x5fbfee78)
"call-interactively" (0x5fbfefc0)
"command-execute" (0x5fbff0e8)

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 9, 2015

Ok with helm-mode disabled, everything works as expected (no crash, no breakage in 25.0.50).

By working as expected, do you mean stock Projectile commands with Ido or Helm Projectile commands? Unfortunately I deleted my Mac OS X from my hard drive to install Ubuntu recently since I can't stand its window behaviour. I will reinstall it in the future when I got time.

@smolyn

This comment has been minimized.

smolyn commented Jan 9, 2015

Stock projectile commands with Ido.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 9, 2015

Maybe I have you Helm configuration (or better, the whole .emacs.d)?

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 9, 2015

I've tried the recipe in your bug report with aura repo and cannot reproduce it in Ubuntu, I can even fuzzy match in Linux source tree, which has over 30k files. I think this has to do with fuzzy matching in Helm and seems like Emacs on Mac OS could not handle fuzzy matching on large amount of file. Could you please try this:

(setq helm-projectile-fuzzy-match nil)
(require 'helm-projectile)

Add the above code before (helm-projectile-on) to disable fuzzy matching in Helm Projectile than try again. It's likely that in stock Projectile with Ido, you did not use fuzzy matching in Ido.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 10, 2015

@smolyn Did it crash with fuzzy matching disabled?

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 12, 2015

The problem for me, with fuzzy matching and gc-cons-threshold increased is when I type some pattern in the field and I reach the part when there are no results to show and adding extra characters to pattern makes no sense, but if I accidentally do, it crashes every time.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 12, 2015

@zilvinasu Does it crash with fuzzy matching disabled?

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 12, 2015

@tuhdo It does

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 12, 2015

It does? Could you provide more info:

  • Your OS.
  • Your Emacs version.
  • How large your candidate list is when it crashed?
@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 12, 2015

  • Mac OS X 10.10.2
  • GNU Emacs 24.4.1
  • It is at something like 100 candidates, but when I type any symbol to the existing pattern like "list.html" -> "list.htmlaa" it gives candidates, but it crashes.
@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 13, 2015

@zilvinasu Thank for your info.

Could you try this bare Helm command at the root of your project to see if it crashes?

(helm :sources (helm-build-in-buffer-source "test"
                 :data (split-string (shell-command-to-string "git ls-files") "\n")
                 :fuzzy-match t)
      :buffer "*helm test*")

Also, could you save the file list at project root with this command:

git ls-files > file_list.txt

Then run this code:

(with-current-buffer (find-file-noselect "./file_list.txt") 
   (helm :sources (helm-build-sync-source "test" 
                    :candidates (save-match-data (split-string (buffer-string) "\n" t)) 
                    :fuzzy-match t)) 
         :buffer "*helm test*")

to see if it also crashes?

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 13, 2015

@tuhdo Both of them crash.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 13, 2015

Thanks. Could you do this one last thing and I will report it to Helm.

Did you try it with emacs-helm.sh script? If so, could you try the two above tests with that script? It is located in your Helm installation in elpa/ directory. Simply run ./emacs-helm.sh after you find it.

Also, please try with two non-fuzzy test:

(helm :sources (helm-build-in-buffer-source "test"
                 :data (split-string (shell-command-to-string "git ls-files") "\n")
                 )
      :buffer "*helm test*")

And:

(with-current-buffer (find-file-noselect "./file_list.txt") 
   (helm :sources (helm-build-sync-source "test" 
                    :candidates (save-match-data (split-string (buffer-string) "\n" t)) 
                    ) 
         :buffer "*helm test*")

As you see, :fuzzy-match t is excluded.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 13, 2015

The first one without fuzzy matching crashes if I use regexp like ".*" in the pattern. The last one that reads file just says "End of file during parsing".

And when running emacs-helm.sh all of these 4 commands do not crash Emacs (the last one says "End of file during parsing, the same as without emacs-helm.sh)

Though, after testing emacs-helm.sh I thought maybe it does not crash because it is running inside terminal, not like Cocoa application. That way it did not crash in any of those test either. Maybe others who experience the same problems on Mac are also running emacs as Cocoa app

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 13, 2015

Sorry, the last test missed a parentheses. This is the correct one:

(with-current-buffer (find-file-noselect "./file_list.txt") 
   (helm :sources (helm-build-sync-source "test" 
                    :candidates (save-match-data (split-string (buffer-string) "\n" t)) 
                    ) 
         :buffer "*helm test*"))

Did your emacs-helm.sh run in terminal or in GUI? By default, it should be in GUI.

Though, after testing emacs-helm.sh I thought maybe it does not crash because it is running inside terminal, not like Cocoa application. That way it did not crash in any of those test either. Maybe others who experience the same problems on Mac are also running emacs as Cocoa app

It would be valuable if you could try one of those fuzzy test with Helm Projectile inside terminal.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 13, 2015

It run in Terminal, not sure how to run it in GUI

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 13, 2015

The script uses emacs command in your shell. Is the emacs command in your shell point to the latest Emacs 24.4? You could try emacs --version to check. It's possible that the emacs binary in your shell is version 24.3, and it's also possible that Emacs 24.3 GUI won't crash.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 13, 2015

➜ ~ emacs --version
GNU Emacs 24.4.1
Copyright (C) 2014 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
➜ ~

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 13, 2015

So, in conclusion, 4 tests crashed in GUI but not in terminal, If it's possible, may I have your .emacs.d to test it? I intend to recover Mac OS X this weekend.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 13, 2015

@tuhdo, here it is:
init.el

;; ===========
;; Look & Feel
;; ===========
(cd "~/")
(prefer-coding-system 'utf-8)
(setq buffer-file-coding-system 'utf-8)
(setq inhibit-splash-screen t)
(setq kill-whole-line t)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(windmove-default-keybindings)
(setq windmove-wrap-around t)
(fset 'yes-or-no-p 'y-or-n-p)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(put 'erase-buffer 'disabled nil)
(setq custom-file "~/.emacs.d/emacs-custom.el")
(load custom-file)

;; ========
;; Packages
;; ========
(setq package-archives '(("melpa" . "http://melpa.milkbox.net/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                         ("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
(load "~/.emacs.d/init-packages.el")

;; ========
;; Mac OS X
;; ========
(when (equal system-type 'darwin)
  (set-frame-font "Menlo-12")
  (setq mac-option-modifier 'super)
  (setq mac-command-modifier 'meta)
  (exec-path-from-shell-initialize))

;; ===================
;; Major & Minor modes
;; ===================
(require 'auto-complete)

(defalias 'list-buffers 'ibuffer)
(desktop-save-mode)
(semantic-mode 1)
(electric-pair-mode 1)
(column-number-mode 1)
(show-paren-mode 1)
(setq show-paren-style 'parenthesis)
(setq show-paren-delay 0)
(global-auto-revert-mode 1)
(global-auto-complete-mode)
(global-hl-line-mode 1)
;(global-linum-mode 1)

;; flycheck
(add-hook 'after-init-hook #'global-flycheck-mode)

;; org
(require 'org)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))

;; restclient-mode
(require 'restclient)
(add-to-list 'auto-mode-alist '("\\.http$" . restclient-mode))

;; python
(elpy-enable)

;; yasnippet
(require 'yasnippet)
(yas-global-mode 1)

;; sass-mode
(setq scss-compile-at-save nil)

;; dockerfile
(require 'dockerfile-mode)
(add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))

;; inf-ruby
(autoload 'inf-ruby "inf-ruby" "Run an inferior Ruby process" t)
(add-hook 'ruby-mode-hook 'inf-ruby-minor-mode)

;; subword
(add-hook 'prog-mode-hook 'subword-mode)

;; rainbow-delimiters
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)

;; Ido
;; ===
(require 'ido)
(require 'flx-ido)
(ido-mode 1)
(flx-ido-mode 1)
(setq ido-enable-flex-matching t)
(setq ido-use-faces nil)
(set-default 'imenu-auto-rescan t)
(add-to-list 'ido-ignore-directories "target")
(add-to-list 'ido-ignore-directories "dest")
(add-to-list 'ido-ignore-directories "bower_components")
(add-to-list 'ido-ignore-directories "node_modules")

;; Helm
;; ====
(require 'helm-config)
(helm-mode 1)

;; Ace Jump
;; ========
(autoload 'ace-jump-mode "ace-jump-mode" "Emacs quick move minor mode" t)
(autoload 'ace-jump-mode-pop-mark "ace-jump-mode" "Ace jump back:-)" t)
(eval-after-load "ace-jump-mode"
  '(ace-jump-mode-enable-mark-sync))
(define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark)
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)

;; Haskell
;; =======
(require 'haskell-mode)
(require 'haskell-cabal)

(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)

(custom-set-variables
 '(haskell-process-type 'cabal-repl)
 '(haskell-process-suggest-remove-import-lines t)
 '(haskell-process-auto-import-loaded-modules t)
 '(haskell-process-log t))

(define-key haskell-mode-map (kbd "M-.") 'haskell-mode-jump-to-def)
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring)
(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
(define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
(define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space)
(define-key haskell-cabal-mode-map (kbd "C-`") 'haskell-interactive-bring)
(define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
(define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal)


;; Clojure
;; =======
(require 'clojure-mode)
(require 'cider)

(setq nrepl-history-file "~/.emacs.d/nrepl-history")
(add-to-list 'same-window-buffer-names "*nrepl*")
(setq nrepl-buffer-name-separator "-")
(setq nrepl-buffer-name-show-port t)
(add-to-list 'auto-mode-alist '("\.cljs$" . clojure-mode))
(add-to-list 'auto-mode-alist '("\.edn$" . clojure-mode))
(add-to-list 'auto-mode-alist '("gantryfile" . clojure-mode))
(add-hook 'nrepl-connected-hook
          (defun pnh-clojure-mode-eldoc-hook ()
            (add-hook 'clojure-mode-hook 'turn-on-eldoc-mode)
            (add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
            (cider-enable-on-existing-clojure-buffers)))

(require 'ac-cider)
(add-hook 'cider-mode-hook 'ac-flyspell-workaround)
(add-hook 'cider-mode-hook 'ac-cider-setup)
(add-hook 'cider-repl-mode-hook 'ac-cider-setup)
(eval-after-load "auto-complete"
  '(add-to-list 'ac-modes 'cider-mode))

(defun set-auto-complete-as-completion-at-point-function ()
  (setq completion-at-point-functions '(auto-complete)))
(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function)
(add-hook 'cider-mode-hook 'set-auto-complete-as-completion-at-point-function)
(add-hook 'cider-repl-mode-hook 'subword-mode)


;; CoffeeScript
;; ============
;; coffeescript
(defun my-coffee-mode-hook ()
  "Hooks for Web mode."
  (setq coffee-tab-width 2)
  (setq coffee-args-compile '("-c" "--bare")))

(add-hook 'coffee-mode-hook  'my-coffee-mode-hook)

(eval-after-load "coffee-mode"
  '(progn
     (define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)))

;; JavaScript
;; ==========
(add-hook 'js-mode-hook 'js2-mode)
(add-hook 'js2-mode-hook (lambda () (tern-mode t)))
(add-hook 'js2-mode-hook 'js2-imenu-extras-mode)
(eval-after-load 'tern
   '(progn
      (require 'tern-auto-complete)
      (tern-ac-setup)))

;; Web
;; ===
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))

(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
(defadvice web-mode-highlight-part (around tweak-jsx activate)
  (if (equal web-mode-content-type "jsx")
      (let ((web-mode-enable-part-face nil))
        ad-do-it)
    ad-do-it))

(defun my-web-mode-hook ()
  "Hooks for Web mode."
  (setq web-mode-code-indent-offset 4)
  (setq web-mode-enable-auto-quoting nil))

(add-hook 'web-mode-hook  'my-web-mode-hook)

;; Projectile
;; ==========
(require 'projectile)
(require 'helm-projectile)
(projectile-global-mode)
(setq projectile-completion-system 'helm)
(setq projectile-enable-caching t)
(helm-projectile-on)

;; Delight
;; =======
(require 'delight)
(delight '((auto-complete-mode nil "auto-complete")
           (helm-mode nil "helm-mode")
           (haskell-doc-mode nil "haskell-doc")
           (haskell-indentation-mode nil "haskell-indentation")
           (interactive-haskell-mode nil "haskell-process")))

;; ====
;; Kbds
;; ====
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-<down>") 'shrink-window)
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
(global-set-key (kbd "C-c i") 'idomenu)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(global-set-key (kbd "C-x b") 'helm-buffers-list)
(global-set-key (kbd "C-x c s") 'helm-swoop)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-c h") 'helm-projectile)
(global-set-key (kbd "C-x g") 'magit-status)

init-packages.el

(require 'cl)
(defvar prelude-packages
  '(
    ace-jump-mode
    ac-cider
    clojure-mode
    cider
    ac-nrepl
    auto-complete
    buffer-move
    coffee-mode
    dash
    delight
    dockerfile-mode
    elpy
    exec-path-from-shell
    find-file-in-project
    flycheck
    flx-ido
    fuzzy
    gitconfig-mode
    grizzl
    haskell-mode
    helm
    helm-projectile
    helm-swoop
    highlight-indentation
    idomenu
    iedit
    inf-ruby
    javadoc-lookup
    js2-mode
    json-mode
    tern
    tern-auto-complete
    less-css-mode
    magit
    markdown-mode
    nose
    popup
    pyvenv
    rainbow-delimiters
    restclient
    rust-mode
    toml-mode
    sml-mode
    scss-mode
    projectile
    web-mode
    zenburn-theme
    yaml-mode
    yasnippet
    )
  "A list of packages to ensure are installed at launch.")

(defun prelude-packages-installed-p ()
  (loop for p in prelude-packages
        when (not (package-installed-p p)) do (return nil)
        finally (return t)))

(unless (prelude-packages-installed-p)
  ;; check for new packages (package versions)
  (message "%s" "Emacs Prelude is now refreshing its package database...")
  (package-refresh-contents)
  (message "%s" " done.")
  ;; install the missing packages
  (dolist (p prelude-packages)
    (when (not (package-installed-p p))
      (package-install p))))

emacs-custom.el

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(column-number-mode t)
 '(custom-enabled-themes (quote (leuven)))
 '(custom-safe-themes
   (quote
    ("3b819bba57a676edf6e4881bd38c777f96d1aa3b3b5bc21d8266fa5b0d0f1ebf" default)))
 '(fci-rule-color "#383838")
 '(flx-ido-mode t)
 '(flx-ido-threshold 500)
 '(font-lock-global-modes (quote (not speedbar-mode)))
 '(fringe-mode (quote (5 . 2)) nil (fringe))
 '(gc-cons-threshold 100000000)
 '(global-auto-complete-mode t)
 '(global-auto-revert-mode t)
 '(haskell-process-auto-import-loaded-modules t)
 '(haskell-process-log t)
 '(haskell-process-suggest-remove-import-lines t)
 '(haskell-process-type (quote cabal-repl))
 '(ido-mode (quote both) nil (ido))
 '(indent-tabs-mode nil)
 '(indicate-empty-lines nil)
 '(nxml-child-indent 4)
 '(nxml-slash-auto-complete-flag t)
 '(org-startup-truncated nil)
 '(projectile-globally-ignored-directories
   (quote
    (".idea" ".eunit" ".git" ".hg" ".fslckout" ".bzr" "_darcs" ".tox" ".svn" "build" "node_modules" "bower_components" "target")))
 '(python-shell-interpreter "ipython")
 '(python-skeleton-autoinsert t)
 '(safe-local-variable-values nil)
 '(scroll-bar-mode nil)
 '(show-paren-mode t)
 '(tool-bar-mode nil)
 '(vc-annotate-background "#2B2B2B")
 '(vc-annotate-color-map
   (quote
    ((20 . "#BC8383")
     (40 . "#CC9393")
     (60 . "#DFAF8F")
     (80 . "#D0BF8F")
     (100 . "#E0CF9F")
     (120 . "#F0DFAF")
     (140 . "#5F7F5F")
     (160 . "#7F9F7F")
     (180 . "#8FB28F")
     (200 . "#9FC59F")
     (220 . "#AFD8AF")
     (240 . "#BFEBBF")
     (260 . "#93E0E3")
     (280 . "#6CA0A3")
     (300 . "#7CB8BB")
     (320 . "#8CD0D3")
     (340 . "#94BFF3")
     (360 . "#DC8CC3"))))
 '(vc-annotate-very-old-color "#DC8CC3")
 '(virtualenv-root "/Users/Name/VirtualEnvs/")
 '(web-mode-code-indent-offset 4))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(linum ((t (:inherit (shadow default) :background "#F2F2F2"))))
 '(mode-line ((t (:background "#335EA8" :foreground "#85CEEB" :box (:line-width 1 :color "#1A2F54"))))))
@smolyn

This comment has been minimized.

smolyn commented Jan 13, 2015

It definitely is an Emacs on Mac OS X (GUI, not terminal) problem only. In Emacs 25 (git HEAD) they "fixed" it sort-of. It no longer crashes, but now it has spurious extra characters in the input.
I posted a bug to Emacs developers here:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19531

It has reproduction steps (including a bare init.el). It should also cause the crash in Emacs 24.4, if you follow those reproduction steps.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 13, 2015

@smolyn any ideas if any development is being done towards it to be fixed in 24.4?

@smolyn

This comment has been minimized.

smolyn commented Jan 13, 2015

I don't know, sorry. :(

@mariusk

This comment has been minimized.

mariusk commented Jan 14, 2015

I can confirm the really weird behaviour with "spurious extra characters" in input. Simple to reproduce. In any project, run helm-projectile-find-file and then type "" then "." and keyboard input is messed up until you quit emacs. This is on on an older HEAD build 25.0.50.1 compiled January 5th (recent head builds fails with helm/projectile alltogether). I think it might also affect standard 24.4 builds, but I will have to check that later (on my home computer).

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 15, 2015

Any ideas if there is any progress on this?

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 15, 2015

I've just reinstalled my Mac OS X. It would take a few days to get used to it.

@neildurant

This comment has been minimized.

neildurant commented Jan 16, 2015

I'm seeing the same crash with 24.4 on OSX Lion. It would be great if there were some workaround we could apply to projectile while we wait for a fix in Emacs.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 16, 2015

I only get a crash when fuzzy matching is enabled (only in Mac OS X Yosemite), and the crashes only happen in GUI.

But using emacs-mac-port, I never have those issues. So you may want to give it a try. And Meta works out of the box, which is amazing. Much better than Emacs for Mac OS X.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 16, 2015

@tuhdo But using emacs-mac-port it still crashes on fuzzy search? Anyway I am not using Emacs for Mac OS X, I am using emacs Homebrew formula, gonna give 'emacs-mac-port' a go, even though it says this is experimental port.

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 16, 2015

No, I did not have that issue. Are you sure you were using the correct one installed by Brew in /usr/local/Cellar/emacs-mac/emacs-24.4-mac-5.2/bin/?

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 16, 2015

I am sure I am not. Since the formula I use is named emacs which is included in Homebrew out of the box. But I taped into emacs-mac repository and will give it a go.

@mariusk

This comment has been minimized.

mariusk commented Jan 16, 2015

Just to remove any doubts about which emacs is being used, here's what I use to build emacs: brew install emacs --HEAD --use-git-head --cocoa --srgb. I'm pretty sure replacing HEAD with the 24.4 branch give the same result (buggy behaviour). No crash, but messed up keymappings until quitting emacs.

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 16, 2015

@tuhdo Can confirm , works fine using emacs-mac formula, it even provides with better integration for Mac OS X, like proper scrolling. Thanks, gonna switch to that one!

@emish

This comment has been minimized.

emish commented Jan 16, 2015

Hi there. Can you explain what emacs-mac formula is and how you are getting it? I can't find it in brew search, and would like to work around this crash with emacs 24.4. Thanks!

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 16, 2015

As described in EmacsWiki it's a different version of Homebrew formula, that is intended to include additional patches for Mac OS X, like more native scrolling and etc. List of features can be found here.

In order to obtain this formula, you need to tap the repo into your Homebrew by executing the following:
brew tap railwaycat/emacsmacport
after that, emacs-mac will be available as any other package in Homebrew for installation
brew install emacs-mac

@mariusk

This comment has been minimized.

mariusk commented Jan 16, 2015

Great tip on emacs-mac; smooth scrolling and seemingly unaffected by the input bug. A couple of things not to like (at least how it works by default); old style "maximize" behaviour (can use F11 however, which is occupied by default on 10.10), but the worst annoyance by far: When it is running full screen at you switch to it with ctrl-right-arrow or similar, emacs does not get keyboard focus by default and usually snaps back to the previous screen within a few hundred milliseconds. Switching with cmd-tab works fine however.

@smolyn

This comment has been minimized.

smolyn commented Jan 20, 2015

The Emacs 25 trunk branch has been fixed. There is no crash or spurious characters as of yesterday.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19531

@zilvinasu

This comment has been minimized.

zilvinasu commented Jan 20, 2015

Thanks for informing, seems like emacs formula in Homebrew works smooth now if used with --HEAD option to get Emacs 25

@mariusk

This comment has been minimized.

mariusk commented Jan 21, 2015

Great work. By now I love the smooth scrolling and zoom gesture support from the emacs-mac formula, but HATE the focus issue from emacs-mac, so is there any way of building directly from the emacs formula with those patches in?

@tuhdo

This comment has been minimized.

Contributor

tuhdo commented Jan 23, 2015

@mariusk maybe you should discuss with `emacs-mac-port maintainer about this issue. Probably he would fix it.

@mariusk

This comment has been minimized.

mariusk commented Jan 23, 2015

@tuhdo Thanks, I have. https://github.com/railwaycat/emacs-mac-port/issues/79 . I also saw a note that the original keyboard issue has been fixed in emacs HEAD. The proper place to make these suggestions would probably be the maintainer of the default homebrew "emacs" recipe.

@tuhdo tuhdo referenced this issue Jan 23, 2015

Closed

helm crash Emacs #838

metaturso added a commit to metaturso/.emacs.d that referenced this issue Apr 11, 2015

Disable Projectile and add Melpa packages list.
Projectile on OSX was causing Emacs to frequently
crash. So I have temporarily disabled it.

bbatsov/projectile#600

@bbatsov bbatsov closed this Jul 11, 2015

@danhodge

This comment has been minimized.

danhodge commented Jul 17, 2015

I was having similar problems using homebrew-installed emacs, so I followed the instructions here to download and build emacs 24.4 from source and helm-projectile has been working great ever since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment