Skip to content

Crash with lengthy ligature on macOS #3724

@Camouflager

Description

@Camouflager

Describe the bug
I'm on macOS. When kitty tries to render a lengthy ligature, it crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Open kitty in macOS with a font that supports ligatures like FiraCode
  2. Hold = for a few seconds
  3. It crashes

Crash Report

Details Process: kitty [35100] Path: /Users/USER/*/kitty Identifier: kitty Version: 0 Code Type: X86-64 (Native) Parent Process: fish [34775] Responsible: Terminal [34773] User ID: 501

Date/Time: 2021-06-13 23:52:03.451 +0800
OS Version: macOS 11.4 (20F71)
Report Version: 12
Bridge OS Version: 5.4 (18P4663)
Anonymous UUID: 45666748-EB2F-EA00-1B11-4C7CEDB98617

Sleep/Wake UUID: CDB40293-6A44-42EC-806F-6BB7C608AD41

Time Awake Since Boot: 140000 seconds
Time Since Wake: 2600 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called
kitty(35100,0x107fa3e00) malloc: *** error for object 0x40a3b13b13b13b0a: pointer being freed was not allocated

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff2043892e __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff204675bd pthread_kill + 263
2 libsystem_c.dylib 0x00007fff203bc411 abort + 120
3 libsystem_malloc.dylib 0x00007fff2029c1f5 malloc_vreport + 548
4 libsystem_malloc.dylib 0x00007fff2029f34a malloc_report + 151
5 fast_data_types.so 0x0000000100aded22 ensure_render_space + 34 (core_text.m:461)
6 fast_data_types.so 0x0000000100adf194 do_render + 532 (core_text.m:541)
7 fast_data_types.so 0x0000000100adef64 render_glyphs_in_cells + 132 (core_text.m:561)
8 fast_data_types.so 0x0000000100b27a37 render_group + 583 (fonts.c:664)
9 fast_data_types.so 0x0000000100b26795 render_groups + 389 (fonts.c:1131)
10 fast_data_types.so 0x0000000100b21306 render_run + 566
11 fast_data_types.so 0x0000000100b141b0 render_line + 1120 (fonts.c:1282)
12 fast_data_types.so 0x0000000100b909a1 screen_update_cell_data + 417 (screen.c:1818)
13 fast_data_types.so 0x0000000100b9b2e3 cell_prepare_to_render + 227 (shaders.c:326)
14 fast_data_types.so 0x0000000100b9b1f5 send_cell_data_to_gpu + 21 (shaders.c:611)
15 fast_data_types.so 0x0000000100ad8b47 prepare_to_render_os_window + 471 (child-monitor.c:610)
16 fast_data_types.so 0x0000000100ad81c4 render + 596 (child-monitor.c:726)
17 fast_data_types.so 0x0000000100ad7559 process_global_state + 89 (child-monitor.c:998)
18 fast_data_types.so 0x0000000100ad74fc do_state_check + 12 (child-monitor.c:979)
19 glfw-cocoa.so 0x00000001019f66ee __schedule_timer_block_invoke + 62 (cocoa_init.m:720)
20 com.apple.Foundation 0x00007fff2132de4f __NSFireTimer + 67
21 com.apple.CoreFoundation 0x00007fff205792b9 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
22 com.apple.CoreFoundation 0x00007fff20578dad __CFRunLoopDoTimer + 927
23 com.apple.CoreFoundation 0x00007fff2057890a __CFRunLoopDoTimers + 307
24 com.apple.CoreFoundation 0x00007fff2055f4d3 __CFRunLoopRun + 1988
25 com.apple.CoreFoundation 0x00007fff2055e64c CFRunLoopRunSpecific + 563
26 com.apple.HIToolbox 0x00007fff2879cab3 RunCurrentEventLoopInMode + 292
27 com.apple.HIToolbox 0x00007fff2879c815 ReceiveNextEventCommon + 587
28 com.apple.HIToolbox 0x00007fff2879c5b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
29 com.apple.AppKit 0x00007fff22d5f6f2 _DPSNextEvent + 864
30 com.apple.AppKit 0x00007fff22d5dec5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
31 com.apple.AppKit 0x00007fff22d50239 -[NSApplication run] + 586
32 glfw-cocoa.so 0x00000001019f63d1 _glfwPlatformRunMainLoop + 81 (cocoa_init.m:685)
33 glfw-cocoa.so 0x00000001019ef452 glfwRunMainLoop + 18 (init.c:352)
34 fast_data_types.so 0x0000000100b3e8ad run_main_loop + 13 (glfw.c:1399)
35 fast_data_types.so 0x0000000100ad59fb main_loop + 59 (child-monitor.c:1050)
36 org.python.python 0x000000010039ff19 method_vectorcall_NOARGS + 99
37 org.python.python 0x000000010048c5b7 call_function + 168
38 org.python.python 0x0000000100489de9 _PyEval_EvalFrameDefault + 45259
39 org.python.python 0x000000010047dbd6 _PyEval_EvalCode + 403
40 org.python.python 0x0000000100394774 _PyFunction_Vectorcall + 376
41 org.python.python 0x000000010048c5b7 call_function + 168
42 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
43 org.python.python 0x000000010047dbd6 _PyEval_EvalCode + 403
44 org.python.python 0x0000000100394774 _PyFunction_Vectorcall + 376
45 org.python.python 0x0000000100393d83 _PyObject_FastCallDictTstate + 87
46 org.python.python 0x0000000100400c78 slot_tp_call + 187
47 org.python.python 0x0000000100393b56 _PyObject_MakeTpCall + 129
48 org.python.python 0x000000010048c625 call_function + 278
49 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
50 org.python.python 0x00000001003946bc _PyFunction_Vectorcall + 192
51 org.python.python 0x000000010048c5b7 call_function + 168
52 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
53 org.python.python 0x00000001003946bc _PyFunction_Vectorcall + 192
54 org.python.python 0x000000010048c5b7 call_function + 168
55 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
56 org.python.python 0x00000001003946bc _PyFunction_Vectorcall + 192
57 org.python.python 0x000000010048c5b7 call_function + 168
58 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
59 org.python.python 0x000000010047dbd6 _PyEval_EvalCode + 403
60 org.python.python 0x00000001004788ce builtin_exec + 389
61 org.python.python 0x00000001003dec5b cfunction_vectorcall_FASTCALL + 95
62 org.python.python 0x000000010048c5b7 call_function + 168
63 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
64 org.python.python 0x000000010047dbd6 _PyEval_EvalCode + 403
65 org.python.python 0x0000000100394774 _PyFunction_Vectorcall + 376
66 org.python.python 0x000000010048c5b7 call_function + 168
67 org.python.python 0x0000000100489ec2 _PyEval_EvalFrameDefault + 45476
68 org.python.python 0x000000010047dbd6 _PyEval_EvalCode + 403
69 org.python.python 0x0000000100394774 _PyFunction_Vectorcall + 376
70 org.python.python 0x00000001004fcde0 pymain_run_module + 212
71 org.python.python 0x00000001004fc8d8 pymain_run_python + 479
72 org.python.python 0x00000001004fc6bd Py_RunMain + 23
73 org.python.python 0x00000001004fd9da pymain_main + 35
74 org.python.python 0x00000001004fd9b1 Py_Main + 42
75 kitty 0x0000000100318c0c main + 1100

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions