seagle0128 / .emacs.d

Centaur Emacs - A Fancy and Fast Emacs Configuration
https://seagle0128.github.io/.emacs.d/
GNU General Public License v3.0
1.93k stars 271 forks source link

[Bug] Emacs crashes when editing files #446

Open MariusKressin opened 2 weeks ago

MariusKressin commented 2 weeks ago

Thank you for the bug report

Bug description

When I open a JS, TS, or Ruby (possibly others as well) file in emacs, it crashes, and I get the message: Fatal error 11: Segmentation fault.

For whatever reason, Elisp files do not make it crash, and neither does Go. Also, it takes a few seconds longer to crash if I disable aggressive-indent-mode or flymake-mode.

Steps to reproduce

  1. Install Centaur Emacs by cloning it to .emacs.d.
  2. Start emacs.
  3. Wait for it to finish downloading everything.
  4. Navigate to a file.
  5. Edit the file.
  6. For certain files, emacs crashes.

Expected behavior

This behavior was naturally unexpected.

OS

MacOS

Emacs Version

29

Error callstack

No response

Anything else

No response

seagle0128 commented 2 weeks ago

Can you provide any example files to reproduce the issue?

MariusKressin commented 2 weeks ago

This happens with empty files.

seagle0128 commented 2 weeks ago

I believe it's an issue of Emacs or related lib. Please check if tree-sitter is enabled. Try the solutions below.

  1. (setq centaur-tree-sitter nil). See #445
  2. Recompiling Emacs with the latest libgccjit. See https://github.com/d12frosted/homebrew-emacs-plus/issues/681.
MariusKressin commented 2 weeks ago

Sadly, the first option (setq ...) doesn't seem to do anything. As for the second, I'm using the MacPorts version of Emacs, so I don't have libgccjit installed (MacPorts uses an alternative library, I think).

Maybe MacPorts is conflicting with it in some way. Does Centaur Emacs require Homebrew?

CsBigDataHub commented 2 weeks ago

@MariusKressin I have had bunch of problems in the past with Emacs installed with Macports. I have had great success with this build script for past 2 years with out any crashes - https://github.com/jimeh/build-emacs-for-macos

Ofcourse you will still need Homebrew to install dependencies.

MariusKressin commented 2 weeks ago

That's okay then. I don't think it's worthwhile to switch over to Homebrew just for this, so I'll look elsewhere.

seagle0128 commented 2 weeks ago

I am using emacs-plus, but Centaur Emacs doesn't require homebrew. You can compile Emacs yourself (without homebrew) if you will. I recommend GNU Emacs.