Skip to content

macOS: Hang when going into fullscreen with macos_colorspace=default #6435

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

Closed
henryhchchc opened this issue Jul 10, 2023 · 1 comment
Closed
Labels

Comments

@henryhchchc
Copy link
Contributor

henryhchchc commented Jul 10, 2023

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Set macos_colorspace=default in configuration
  2. Start kitty
  3. Switch to full screen, via any of the follows
    • Select the menu [Window -> Enter Full Screen]
    • Click on the green dot in the title bar
    • Press fn+F
  4. Kitty hangs

Screenshots
N/A

Environment details

kitty 0.29.0 (e2b5c6688d) created by Kovid Goyal
Darwin Henry-Chus-Laptop.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Jun 30 17:50:12 PDT 2023; root:xnu-10002.0.168.505.3~1/RELEASE_ARM64_T6000 arm64
ProductName:		macOS ProductVersion:		14.0 BuildVersion:		23A5286g
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/zsh
Loaded config overrides:
  macos_colorspace default

Config options different from defaults:
macos_colorspace default

Important environment variables seen by the kitty process:
	PATH                                /opt/homebrew/Caskroom/miniforge/base/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/opt/homebrew/bin:/Users/henry/.local/share/zinit/polaris/bin:/opt/homebrew/sbin:/Applications/kitty.app/Contents/MacOS:/Users/henry/.local/bin
	LANG                                en_US.UTF-8
	VISUAL                              nvim
	EDITOR                              nvim
	SHELL                               /bin/zsh
	USER                                henry
	XDG_DATA_HOME                       /Users/henry/.local/share
	XDG_STATE_HOME                      /Users/henry/.local/state
	XDG_CONFIG_HOME                     /Users/henry/.config
	XDG_CACHE_HOME                      /Users/henry/.cache

Additional context
The issue can be reproduced via kitty --config NONE -o macos_colorspace=default

Message in the terminal shows:

Assertion failure in void set_surface_colorspace(CGSConnectionID, CGSWindowID, CGSSurfaceID, CGColorSpaceRef _Nonnull)(), NSCGLSurface.m:121
@FelixKratz
Copy link
Contributor

FelixKratz commented Jul 14, 2023

For me this option leads to an instant crash on v0.29.0 when opening kitty, removing this option in the config solves the problem:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               kitty [92480]
Path:                  /Applications/kitty.app/Contents/MacOS/kitty
Identifier:            net.kovidgoyal.kitty
Version:               0.29.0 (0.29.0)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-07-14 16:24:38.7817 +0200
OS Version:            macOS 13.4 (22F66)
Report Version:        12
Anonymous UUID:        4A124BB1-6DD5-1735-BFCF-9269CE19BBF0

Sleep/Wake UUID:       170D5BFC-111F-4B32-B25E-BDAE5F846014

Time Awake Since Boot: 980000 seconds
Time Since Wake:       11673 seconds

System Integrity Protection: disabled

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

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

Application Specific Information:
abort() called


Application Specific Backtrace 0:
0   CoreFoundation                      0x0000000199aa7154 __exceptionPreprocess + 176
1   libobjc.A.dylib                     0x00000001995c64d4 objc_exception_throw + 60
2   Foundation                          0x000000019ae75708 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:] + 0
3   AppKit                              0x000000019d5d3340 set_surface_colorspace + 120
4   AppKit                              0x000000019d21a22c NSOpenGLContextUpdateOffScreenViewSurface + 336
5   AppKit                              0x000000019cf03648 -[NSOpenGLContext update] + 344
6   kitty.glfw-cocoa.so                 0x0000000104fae1a4 glfwGetCocoaMonitor + 272
7   CoreFoundation                      0x0000000199a23180 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
8   CoreFoundation                      0x0000000199abeeec ___CFXRegistrationPost_block_invoke + 88
9   CoreFoundation                      0x0000000199abee34 _CFXRegistrationPost + 440
10  CoreFoundation                      0x00000001999f44cc _CFXNotificationPost + 704
11  Foundation                          0x000000019a9528f4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
12  AppKit                              0x000000019cc92e1c -[NSWindow _setFrameCommon:display:fromServer:] + 2692
13  AppKit                              0x000000019cc91aa0 __25-[NSWindow setStyleMask:]_block_invoke + 1108
14  AppKit                              0x000000019cc915f8 NSPerformVisuallyAtomicChange + 108
15  AppKit                              0x000000019cc914ac -[NSWindow setStyleMask:] + 188
16  kitty.glfw-cocoa.so                 0x0000000104fb3fec glfwCocoaSetWindowChrome + 1368
17  kitty.fast_data_types.so            0x00000001045a9a24 PyInit_fast_data_types + 106556
18  Python                              0x000000010357fb8c cfunction_call + 60
19  Python                              0x0000000103521fc0 _PyObject_MakeTpCall + 136
20  Python                              0x0000000103648734 call_function + 312
21  Python                              0x000000010364666c _PyEval_EvalFrameDefault + 42088
22  Python                              0x000000010363ae40 _PyEval_EvalCode + 604
23  Python                              0x0000000103523338 _PyFunction_Vectorcall + 388
24  Python                              0x000000010364867c call_function + 128
25  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
26  Python                              0x000000010363ae40 _PyEval_EvalCode + 604
27  Python                              0x0000000103523338 _PyFunction_Vectorcall + 388
28  Python                              0x00000001035222a0 _PyObject_FastCallDictTstate + 96
29  Python                              0x00000001035a8890 slot_tp_call + 188
30  Python                              0x0000000103521fc0 _PyObject_MakeTpCall + 136
31  Python                              0x0000000103648734 call_function + 312
32  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
33  Python                              0x0000000103523280 _PyFunction_Vectorcall + 204
34  Python                              0x000000010364867c call_function + 128
35  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
36  Python                              0x0000000103523280 _PyFunction_Vectorcall + 204
37  Python                              0x000000010364867c call_function + 128
38  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
39  Python                              0x0000000103523280 _PyFunction_Vectorcall + 204
40  Python                              0x000000010364867c call_function + 128
41  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
42  Python                              0x000000010363ae40 _PyEval_EvalCode + 604
43  Python                              0x00000001036356c0 builtin_exec + 352
44  Python                              0x000000010358015c cfunction_vectorcall_FASTCALL + 88
45  Python                              0x000000010364867c call_function + 128
46  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
47  Python                              0x000000010363ae40 _PyEval_EvalCode + 604
48  Python                              0x0000000103523338 _PyFunction_Vectorcall + 388
49  Python                              0x000000010364867c call_function + 128
50  Python                              0x00000001036465f0 _PyEval_EvalFrameDefault + 41964
51  Python                              0x000000010363ae40 _PyEval_EvalCode + 604
52  Python                              0x0000000103523338 _PyFunction_Vectorcall + 388
53  Python                              0x00000001036cfec8 pymain_run_module + 240
54  Python                              0x00000001036cf6b0 pymain_run_python + 544
55  Python                              0x00000001036cf44c Py_RunMain + 24
56  kitty                               0x0000000102b60fe0 main + 4100
57  kitty                               0x0000000102b604d0 main + 1268
58  dyld                                0x00000001995f7f28 start + 2236


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x199918724 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x19994fc28 pthread_kill + 288
2   libsystem_c.dylib             	       0x19985dae8 abort + 180
3   libc++abi.dylib               	       0x199908b84 abort_message + 132
4   libc++abi.dylib               	       0x1998f83d0 demangling_terminate_handler() + 348
5   libobjc.A.dylib               	       0x1995cf02c _objc_terminate() + 144
6   libc++abi.dylib               	       0x199907f48 std::__terminate(void (*)()) + 16
7   libc++abi.dylib               	       0x19990af44 __cxa_rethrow + 148
8   libobjc.A.dylib               	       0x1995e1670 objc_exception_rethrow + 44
9   AppKit                        	       0x19cc9161c NSPerformVisuallyAtomicChange + 144
10  AppKit                        	       0x19cc914ac -[NSWindow setStyleMask:] + 188
11  kitty.glfw-cocoa.so           	       0x104fb3fec glfwCocoaSetWindowChrome + 1368
12  kitty.fast_data_types.so      	       0x1045a9a24 0x104578000 + 203300
13  Python                        	       0x10357fb8c cfunction_call + 60
14  Python                        	       0x103521fc0 _PyObject_MakeTpCall + 136
15  Python                        	       0x103648734 call_function + 312
16  Python                        	       0x10364666c _PyEval_EvalFrameDefault + 42088
17  Python                        	       0x10363ae40 _PyEval_EvalCode + 604
18  Python                        	       0x103523338 _PyFunction_Vectorcall + 388
19  Python                        	       0x10364867c call_function + 128
20  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
21  Python                        	       0x10363ae40 _PyEval_EvalCode + 604
22  Python                        	       0x103523338 _PyFunction_Vectorcall + 388
23  Python                        	       0x1035222a0 _PyObject_FastCallDictTstate + 96
24  Python                        	       0x1035a8890 slot_tp_call + 188
25  Python                        	       0x103521fc0 _PyObject_MakeTpCall + 136
26  Python                        	       0x103648734 call_function + 312
27  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
28  Python                        	       0x103523280 _PyFunction_Vectorcall + 204
29  Python                        	       0x10364867c call_function + 128
30  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
31  Python                        	       0x103523280 _PyFunction_Vectorcall + 204
32  Python                        	       0x10364867c call_function + 128
33  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
34  Python                        	       0x103523280 _PyFunction_Vectorcall + 204
35  Python                        	       0x10364867c call_function + 128
36  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
37  Python                        	       0x10363ae40 _PyEval_EvalCode + 604
38  Python                        	       0x1036356c0 builtin_exec + 352
39  Python                        	       0x10358015c cfunction_vectorcall_FASTCALL + 88
40  Python                        	       0x10364867c call_function + 128
41  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
42  Python                        	       0x10363ae40 _PyEval_EvalCode + 604
43  Python                        	       0x103523338 _PyFunction_Vectorcall + 388
44  Python                        	       0x10364867c call_function + 128
45  Python                        	       0x1036465f0 _PyEval_EvalFrameDefault + 41964
46  Python                        	       0x10363ae40 _PyEval_EvalCode + 604
47  Python                        	       0x103523338 _PyFunction_Vectorcall + 388
48  Python                        	       0x1036cfec8 pymain_run_module + 240
49  Python                        	       0x1036cf6b0 pymain_run_python + 544
50  Python                        	       0x1036cf44c Py_RunMain + 24
51  kitty                         	       0x102b60fe0 0x102b5c000 + 20448
52  kitty                         	       0x102b604d0 main + 1268
53  dyld                          	       0x1995f7f28 start + 2236

Thread 1:
0   libsystem_pthread.dylib       	       0x19994ad8c start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	       0x19994ad8c start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	       0x19994ad8c start_wqthread + 0

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