Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when quitting kitty on macOS #3686

Closed
Camouflager opened this issue Jun 3, 2021 · 2 comments
Closed

Crash when quitting kitty on macOS #3686

Camouflager opened this issue Jun 3, 2021 · 2 comments
Labels

Comments

@Camouflager
Copy link

Describe the bug
When I quit kitty, it crashes with segfault.

To Reproduce
Steps to reproduce the behavior:

  1. Open kitty
  2. Tell kitty to quit (Cmd+Q or anything else)
  3. The OS tells me kitty quit unexpectedly.

Crash Report

Process:               kitty [12599]
Path:                  /Users/USER/*/kitty.app/Contents/MacOS/kitty
Identifier:            net.kovidgoyal.kitty
Version:               0.20.3 (0.20.3)
Code Type:             X86-64 (Native)
Parent Process:        fish [12550]
Responsible:           kitty [12368]
User ID:               501

Date/Time:             2021-06-03 13:38:31.314 +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:       74D16053-D901-4CB7-818C-69D692D19401

Time Awake Since Boot: 50000 seconds
Time Since Wake:       1800 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000000b8
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [12599]

VM Regions Near 0xb8:
--> 
    __TEXT                      10db75000-10db79000    [   16K] r-x/r-x SM=COW  /Users/*/kitty.app/Contents/MacOS/kitty

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.python.python             	0x000000010dc54270 tupledealloc + 97
1   org.python.python             	0x000000010dbf7338 code_dealloc + 121
2   org.python.python             	0x000000010dc12b84 func_clear + 260
3   org.python.python             	0x000000010dc128de func_dealloc + 63
4   fast_data_types.so            	0x000000010e2badc0 cleanup + 80
5   fast_data_types.so            	0x000000010e2b9ad0 run_at_exit_cleanup_functions + 64
6   org.python.python             	0x000000010dd37789 Py_FinalizeEx + 994
7   org.python.python             	0x000000010dd5b6c2 Py_RunMain + 28
8   org.python.python             	0x000000010dd5c9da pymain_main + 35
9   org.python.python             	0x000000010dd5c9b1 Py_Main + 42
10  net.kovidgoyal.kitty          	0x000000010db78c5c main + 1084
11  libdyld.dylib                 	0x00007fff20413f5d start + 1

Reproduced with kitty --config NONE.

@Camouflager Camouflager added the bug label Jun 3, 2021
@kovidgoyal
Copy link
Owner

Build kitty with

make debug

and post the crash report, that will tell me which cleanup function is
faulting.

https://sw.kovidgoyal.net/kitty/build.html

@Camouflager
Copy link
Author

Camouflager commented Jun 3, 2021

with debug info:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.python.python             	0x0000000105f15270 tupledealloc + 97
1   org.python.python             	0x0000000105eb8338 code_dealloc + 121
2   org.python.python             	0x0000000105ed3b84 func_clear + 260
3   org.python.python             	0x0000000105ed38de func_dealloc + 63
4   fast_data_types.so            	0x00000001065be850 _Py_DECREF + 16 (object.h:430)
5   fast_data_types.so            	0x00000001065c0617 cleanup + 71 (cocoa_window.m:641)
6   fast_data_types.so            	0x00000001065be595 run_at_exit_cleanup_functions + 53 (cleanup.c:21)
7   org.python.python             	0x0000000105ff8789 Py_FinalizeEx + 994
8   org.python.python             	0x000000010601c6c2 Py_RunMain + 28
9   org.python.python             	0x000000010601d9da pymain_main + 35
10  org.python.python             	0x000000010601d9b1 Py_Main + 42
11  kitty                         	0x0000000105e3dc0c main + 1100
12  libdyld.dylib                 	0x00007fff20413f5d start + 1

kovidgoyal added a commit that referenced this issue Jun 3, 2021
Calling Python API functions is not allowed in atexit handlers.

Fixes #3686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants