d12frosted / homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager
MIT License
2.34k stars 181 forks source link

[General]: emacs-plus@30 segfaults when using tree-sitter 0.22.5 #679

Closed delnatan closed 5 months ago

delnatan commented 5 months ago

Issue description

I'm running MacOS 14.4.1 (Sonoma) on an M1 macbook pro with emacs-plus@30 installed via homebrew. GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.3.0, NS appkit-2487.40 Version 14.3.1 (Build 23D60)) of 2024-03-04

I just upgraded tree-sitter via homebrew to v0.22.5 and when I start emacs with 'emacs -Q' and open a new buffer and run =M-x python-ts-mode=, it segfaults. Here's the crash log file: tree-sitter_0.22.5_emacs-crash-log.log

At the moment, rolling back to tree-sitter v0.22.2 (https://github.com/Homebrew/homebrew-core/blob/dbd90116fc5e2090cb0a90591c0649c79a43d436/Formula/t/tree-sitter.rb) brew unlink tree-sitter; brew install tree-sitter.rb; brew pin tree-sitter avoids the segfault. Is anyone else having this issue?

CorgiNapalm commented 5 months ago

I was also able to reproduce this issue on emacs-plus@29 installed via brew, though for me it was using go-ts-mode and the segfault would occur any time I typed an opening paren (. Reverting to v0.22.2 also resolved the issue for me.

matthemsteger commented 5 months ago

If you can endure it, you can also update treesitter to latest and simply rebuild emacs by uninstalling and installing through homebrew (at least this worked for me). The root cause is an ABI change https://github.com/tree-sitter/tree-sitter/issues/3296.

delnatan commented 5 months ago

If you can endure it, you can also update treesitter to latest and simply rebuild emacs by uninstalling and installing through homebrew (at least this worked for me). The root cause is an ABI change tree-sitter/tree-sitter#3296.

Can confirm this worked for me too. Thanks! closing this issue.