Subject: Re: bug#62875: 28.2; Crash on MacOS/M1 with treesitter enabled

From: Yuan Fu <[email-masked]>
Date: Wed, 19 Apr 2023 12:09:33 -0700

> On Apr 16, 2023, at 7:11 AM, Drew Moseley <[email-masked]> wrote:
> 
> On 4/16/23 9:59 AM, Drew Moseley wrote:
>> On 4/16/23 1:33 AM, Yuan Fu wrote: 
>>> Emacs 29 (and nightly) comes with a builtin support for tree-sitter.
>>> Looking at emacsformacosx, all nightly builds since 2023/3/10 have
>>> tree-sitter builtin. To try that out, you can follow this guide:
>>> 
>>> https://archive.casouri.cc/note/2023/tree-sitter-in-emacs-29/index.html
>>> 
>>> A easy way to distinguish between the third-party package and the
>>> builtin support is to look at the prefix, tree-sitter-xxx is the
>>> third-party one, treesit-xxx is the builtin one.
>>> 
>>> 
>>> Yuan
>> Nice. thanks for the link.  After setting up the built-in treesitter it does not crash. To clarify, the init file I am using for this case is:
>> (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
>> (add-to-list 'treesit-language-source-alist
>>          '(c "https://github.com/tree-sitter/tree-sitter-c.git"))
>> And the tree-sitter command line:
>> $ type -a tree-sitter
>> tree-sitter is /opt/homebrew/bin/tree-sitter
>> $ tree-sitter --version
>> tree-sitter 0.20.8
>> It does still fail with the external treesitter package. I tried on both v28 where it is required as well as v29.
> I spoke too soon. It does indeed crash with the builtin tree-sitter library. I was using my desktop keyboard shared using barrier.  When I use the laptop keyboard, the crash still happens.
> Drew

Could you share the backtrace/crash log you mentioned earlier? That’ll help us determine what was going on.

Yuan