Skip to content

My Clojure TS mode often freezes #51

@vinurs

Description

@vinurs

i use emacs-plus , and compile using the follow

HOMEBREW_EMACS_PLUS_30_REVISION=89c99891b2b3ab087cd7e824cef391ef26800ab4 brew install emacs-plus@30 --with-dbus --with-debug --with-mailutils --with-elrumo2-icon --with-imagemagick --with-xwidgets --with-poll

my system is macos 15.0
this is my minimal cfg file

(add-to-list 'treesit-extra-load-path (expand-file-name "tree-sitter/" user-emacs-directory))
(add-to-list 'load-path "~/.emacs.d/site-lisp/clojure-ts-mode")
(require 'clojure-ts-mode)

;; debug
(setq debug-on-quit t)

i cloned clojure ts mode in .emacs.d/site-lisp/
then open emacs , open the the attachment file. elong.clj , go to line 57, then input

(comment

then the emacs It seems like Emacs has frozen, and the CPU usage is at 100%.

lldb -p $(ps aux | grep '[E]macs' | awk '{print $2}')
(lldb) process attach --pid 16819
Process 16819 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x0000000198080810 libsystem_malloc.dylib`nanov2_allocate_outlined + 376
libsystem_malloc.dylib`nanov2_allocate_outlined:
->  0x198080810 <+376>: str    xzr, [x23]
    0x198080814 <+380>: str    xzr, [x23, #0x8]
    0x198080818 <+384>: b      0x198080838    ; <+416>
    0x19808081c <+388>: tbz    w21, #0x0, 0x198080834 ; <+412>
Executable module set to "/opt/homebrew/Cellar/emacs-plus@30/30.0.60/Emacs.app/Contents/MacOS/Emacs".
Architecture set to: arm64-apple-macosx-.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x0000000198080810 libsystem_malloc.dylib`nanov2_allocate_outlined + 376
    frame #1: 0x000000019807ef98 libsystem_malloc.dylib`nanov2_malloc_type + 472
    frame #2: 0x0000000104cca590 Emacs`xmalloc + 20
    frame #3: 0x00000001057e1cd0 libtree-sitter.0.23.dylib`stack__iter + 116
    frame #4: 0x00000001057e890c libtree-sitter.0.23.dylib`ts_parser__reduce + 92
    frame #5: 0x00000001057d96e8 libtree-sitter.0.23.dylib`ts_parser_parse + 5204
    frame #6: 0x0000000104d784c8 Emacs`Ftreesit_parser_root_node + 236
    frame #7: 0x0000000104cf9ad4 Emacs`funcall_subr + 288
    frame #8: 0x0000000104cf4378 Emacs`Ffuncall + 412
    frame #9: 0x0000000104d06cc8 Emacs`mapcar1 + 652
    frame #10: 0x0000000104d06e18 Emacs`Fmapcar + 220
    frame #11: 0x0000000104cf9a1c Emacs`funcall_subr + 104
    frame #12: 0x0000000104d409fc Emacs`exec_byte_code + 2180
    frame #13: 0x0000000104cf4378 Emacs`Ffuncall + 412
    frame #14: 0x0000000104cf9364 Emacs`Frun_hook_wrapped + 224
    frame #15: 0x0000000104cf9a1c Emacs`funcall_subr + 104
    frame #16: 0x0000000104d409fc Emacs`
[elong.txt](https://github.com/user-attachments/files/16965551/elong.txt)
exec_byte_code + 2180
    frame #17: 0x0000000104cf4378 Emacs`Ffuncall + 412
    frame #18: 0x0000000104cf6dcc Emacs`internal_condition_case_n + 120
    frame #19: 0x0000000104bb82e0 Emacs`dsafe_call1 + 160
    frame #20: 0x0000000104bbf4f0 Emacs`handle_fontified_prop + 716
    frame #21: 0x0000000104bbdc58 Emacs`handle_stop + 112
    frame #22: 0x0000000104bbca34 Emacs`next_element_from_buffer + 248
    frame #23: 0x0000000104baf374 Emacs`get_next_display_element + 140
    frame #24: 0x0000000104bd06a4 Emacs`display_line + 1120
    frame #25: 0x0000000104bd9b58 Emacs`redisplay_window + 13536
    frame #26: 0x0000000104bd4468 Emacs`redisplay_window_1 + 44
    frame #27: 0x0000000104cf6c90 Emacs`internal_condition_case_1 + 100
    frame #28: 0x0000000104bcd8b0 Emacs`redisplay_internal + 4216
    frame #29: 0x0000000104c6f0c4 Emacs`read_char + 3212
    frame #30: 0x0000000104c6c1e8 Emacs`read_key_sequence + 1388
    frame #31: 0x0000000104c6aa38 Emacs`command_loop_1 + 864
    frame #32: 0x0000000104cf6c04 Emacs`internal_condition_case + 96
    frame #33: 0x0000000104c69c50 Emacs`command_loop_2 + 52
    frame #34: 0x0000000104cf632c Emacs`internal_catch + 88
    frame #35: 0x0000000104dd80a0 Emacs`command_loop.cold.1 + 88
    frame #36: 0x0000000104c69c1c Emacs`command_loop + 156
    frame #37: 0x0000000104c69acc Emacs`recursive_edit_1 + 168
    frame #38: 0x0000000104c6a1b0 Emacs`Frecursive_edit + 388
    frame #39: 0x0000000104c68c00 Emacs`main + 8416
    frame #40: 0x0000000197ed0274 dyld`start + 2840
(lldb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions