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 in macOS 13.3.1 #254

Closed
zer0yu opened this issue May 25, 2023 · 11 comments
Closed

crash in macOS 13.3.1 #254

zer0yu opened this issue May 25, 2023 · 11 comments
Labels
bug Something isn't working critical
Milestone

Comments

@zer0yu
Copy link

zer0yu commented May 25, 2023

OS

OS: macOS 13.3.1 22E261 x86_64
Host: MacBookPro16,1
Kernel: 22.4.0
 Uptime: 27 days, 23 hours, 13 mins
Packages: 204 (brew)
Shell: zsh 5.9
Resolution: 1920x1080, 1792x1120
DE: Aqua
WM: yabai
Terminal: tmux
CPU: Intel i9-9880H (16) @ 2.30GHz
GPU: Intel UHD Graphics 630, AMD Radeon Pro 5500M
Memory: 36998MiB / 65536MiB

When I open KeyboardCowboy, it will immediately crash.

crash detial

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

Process:               Keyboard Cowboy [2958]
Path:                  /Applications/Keyboard Cowboy.app/Contents/MacOS/Keyboard Cowboy
Identifier:            com.zenangst.Keyboard-Cowboy
Version:               3.0.0 (139)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-05-25 19:36:00.4564 +0800
OS Version:            macOS 13.3.1 (22E261)
Report Version:        12
Bridge OS Version:     7.4 (20P4252)
Anonymous UUID:        D7C6AECF-2424-E55B-8030-FDB69AFE3C9D

Sleep/Wake UUID:       911ACE3D-FAA3-485D-B15C-983C11C9F809

Time Awake Since Boot: 580000 seconds
Time Since Wake:       4199 seconds

System Integrity Protection: disabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes:       0x0000000000000001, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [2958]

VM Region Info: 0 is not in any region.  Bytes before following region: 4434534400
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      10851a000-10879e000    [ 2576K] r-x/r-x SM=COW  ...yboard Cowboy

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   CoreFoundation                	    0x7ff80d9a0935 CFDataGetBytePtr + 6
1   Keyboard Cowboy               	       0x10871da90 0x10851a000 + 2112144
2   Keyboard Cowboy               	       0x10871d297 0x10851a000 + 2110103
3   Keyboard Cowboy               	       0x1085afbc8 0x10851a000 + 613320
4   Keyboard Cowboy               	       0x1085afb29 0x10851a000 + 613161
5   Combine                       	    0x7ff81edc90f3 Subscribers.Sink.receive(_:) + 83
6   Combine                       	    0x7ff81edc97a0 protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B> + 16
7   Foundation                    	    0x7ff80eb3b7d9 closure #1 in Notification.Subscription.init(_:_:_:_:) + 281
8   Foundation                    	    0x7ff80eb3b232 thunk for @escaping @callee_guaranteed @Sendable (@in_guaranteed Notification) -> () + 50
9   CoreFoundation                	    0x7ff80d9f5827 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 120
10  CoreFoundation                	    0x7ff80da8e46e ___CFXRegistrationPost_block_invoke + 88
11  CoreFoundation                	    0x7ff80da8e3c3 _CFXRegistrationPost + 536
12  CoreFoundation                	    0x7ff80d9c8ab7 _CFXNotificationPost + 729
13  Foundation                    	    0x7ff80e833d10 -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
14  AppKit                        	    0x7ff810df176f __NSSelectedKeyboardInputSourcesChangedNotification + 58
15  CoreFoundation                	    0x7ff80d9f5871 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 194
16  CoreFoundation                	    0x7ff80da8e46e ___CFXRegistrationPost_block_invoke + 88
17  libdispatch.dylib             	    0x7ff80d781d91 _dispatch_call_block_and_release + 12
18  libdispatch.dylib             	    0x7ff80d783033 _dispatch_client_callout + 8
19  libdispatch.dylib             	    0x7ff80d78ffcf _dispatch_main_queue_drain + 954
20  libdispatch.dylib             	    0x7ff80d78fc07 _dispatch_main_queue_callback_4CF + 31
21  CoreFoundation                	    0x7ff80da3f235 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
22  CoreFoundation                	    0x7ff80d9ff06f __CFRunLoopRun + 2452
23  CoreFoundation                	    0x7ff80d9fe071 CFRunLoopRunSpecific + 560
24  HIToolbox                     	    0x7ff817466fcd RunCurrentEventLoopInMode + 292
25  HIToolbox                     	    0x7ff817466dde ReceiveNextEventCommon + 657
26  HIToolbox                     	    0x7ff817466b38 _BlockUntilNextEventMatchingListInModeWithFilter + 64
27  AppKit                        	    0x7ff810a907a0 _DPSNextEvent + 858
28  AppKit                        	    0x7ff810a8f64a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1214
29  AppKit                        	    0x7ff810a81cb8 -[NSApplication run] + 586
30  AppKit                        	    0x7ff810a55ed2 NSApplicationMain + 817
31  SwiftUI                       	    0x7ff917d8dcbb 0x7ff917d08000 + 548027
32  SwiftUI                       	    0x7ff918dc6f44 0x7ff917d08000 + 17559364
33  SwiftUI                       	    0x7ff9186e33af 0x7ff917d08000 + 10335151
34  Keyboard Cowboy               	       0x10851db31 0x10851a000 + 15153
35  dyld                          	    0x7ff80d5ca41f start + 1903

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

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

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

Thread 4:
0   libsystem_kernel.dylib        	    0x7ff80d8e5d56 __open + 10
1   libsystem_kernel.dylib        	    0x7ff80d8eeb73 open + 204
2   CoreFoundation                	    0x7ff80d9a036d _CFReadBytesFromFile + 181
3   CoreFoundation                	    0x7ff80d99fb51 CFURLCreateDataAndPropertiesFromResource + 369
4   CoreFoundation                	    0x7ff80d99f5fb _CFBundleCopyInfoDictionaryInDirectoryWithVersion + 863
5   CoreFoundation                	    0x7ff80d99ef2c _CFBundleRefreshInfoDictionaryAlreadyLocked + 111
6   CoreFoundation                	    0x7ff80d99ee9e CFBundleGetInfoDictionary + 44
7   CoreFoundation                	    0x7ff80da99024 _CFBundleCreate + 357
8   Foundation                    	    0x7ff80e831969 -[NSBundle _cfBundle] + 55
9   Foundation                    	    0x7ff80e83190f -[NSBundle infoDictionary] + 17
10  Foundation                    	    0x7ff80e8365cd -[NSBundle bundleIdentifier] + 22
11  Keyboard Cowboy               	       0x1087187a5 0x10851a000 + 2090917
12  Keyboard Cowboy               	       0x108717faa 0x10851a000 + 2088874
13  Keyboard Cowboy               	       0x108718021 0x10851a000 + 2088993
14  Keyboard Cowboy               	       0x108715a15 0x10851a000 + 2079253
15  Keyboard Cowboy               	       0x1087155cb 0x10851a000 + 2078155
16  Keyboard Cowboy               	       0x1085a6751 0x10851a000 + 575313
17  Keyboard Cowboy               	       0x1085a9e01 0x10851a000 + 589313
18  Keyboard Cowboy               	       0x1085aaeb1 0x10851a000 + 593585

Thread 5:
0   libsystem_pthread.dylib       	    0x7ff80d91fbb0 start_wqthread + 0

Thread 6:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	    0x7ff80d8e55b2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff80d8f372d mach_msg2_internal + 78
2   libsystem_kernel.dylib        	    0x7ff80d8ec5e4 mach_msg_overwrite + 692
3   libsystem_kernel.dylib        	    0x7ff80d8e589a mach_msg + 19
4   CoreFoundation                	    0x7ff80da001af __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80d9fec30 __CFRunLoopRun + 1365
6   CoreFoundation                	    0x7ff80d9fe071 CFRunLoopRunSpecific + 560
7   AppKit                        	    0x7ff810bf0909 _NSEventThread + 132
8   libsystem_pthread.dylib       	    0x7ff80d9241d3 _pthread_start + 125
9   libsystem_pthread.dylib       	    0x7ff80d91fbd3 thread_start + 15

Thread 7:
0   libsystem_pthread.dylib       	    0x7ff80d91fbb0 start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib       	    0x7ff80d91fbb0 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib       	    0x7ff80d91fbb0 start_wqthread + 0

Thread 10:
0   libsystem_pthread.dylib       	    0x7ff80d91fbb0 start_wqthread + 0

Thread 11:
0   libsystem_pthread.dylib       	    0x7ff80d91fbb0 start_wqthread + 0


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x76dcd661808d0088  rdx: 0x00007ff84f949970
  rdi: 0x0000000000000000  rsi: 0x00007ff84f9498b0  rbp: 0x00007ff7b79e31e0  rsp: 0x00007ff7b79e3188
   r8: 0x00007ff7b79e3120   r9: 0x000000000000f737  r10: 0x00007ff85100a748  r11: 0x00007ff80d98ccb2
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x00007ff80d9a0935  rfl: 0x0000000000010246  cr2: 0x0000000000000000
  
Logical CPU:     14
Error Code:      0x00000004 (no mapping for user data read)
Trap Number:     14

Thread 0 instruction stream:
  c0 74 07 48 c7 00 00 00-00 00 4c 8b 75 88 4d 85  .t.H......L.u.M.
  f6 74 0f 48 8d 3d c9 30-df 42 e8 bf 6e fe ff 49  .t.H.=.0.B..n..I
  89 06 4c 89 e7 e8 77 e4-fe ff 48 8b 05 e2 6b ed  ..L...w...H...k.
  42 48 8b 00 48 3b 45 d0-75 14 89 d8 48 81 c4 98  BH..H;E.u...H...
  00 00 00 5b 41 5c 41 5d-41 5e 41 5f 5d c3 e8 48  ...[A\A]A^A_]..H
  cd 1b 00 90 90 90 90 90-90 90 40 f6 c7 01 75 35  ..........@...u5
 [48]8b 07 48 85 c0 74 1f-48 8b 0d 5c 6f 8f 41 48  H..H..t.H..\o.AH	<==
  39 c8 74 13 a8 01 74 1d-48 8b 15 d4 6c ed 42 48  9.t...t.H...l.BH
  23 02 48 39 c8 75 0e 48-8b 47 08 a8 04 75 13 48  #.H9.u.H.G...u.H
  8b 7f 28 eb 15 48 8b 35-cf 4b ed 42 ff 25 c9 6c  ..(..H.5.K.B.%.l
  ed 42 48 83 c7 3f 48 83-e7 f0 48 89 f8 c3 90 90  .BH..?H...H.....
  90 55 41 57 41 56 41 55-41 54 53 31 c0 48 85 ff  .UAWAVAUATS1.H..

Binary Images:
       0x10851a000 -        0x10879dfff com.zenangst.Keyboard-Cowboy (3.0.0) <2ffe8a50-655a-3599-a9de-90aba4e693e8> /Applications/Keyboard Cowboy.app/Contents/MacOS/Keyboard Cowboy
       0x112a95000 -        0x112aa4fff libobjc-trampolines.dylib (*) <d2da3b5f-f5ba-3ef1-b99d-bc64a8487401> /usr/lib/libobjc-trampolines.dylib
    0x7ff80d983000 -     0x7ff80de1ffef com.apple.CoreFoundation (6.9) <315a3f65-0954-3635-96dc-2f65c691d074> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7ff81edb3000 -     0x7ff81eeaeff7 com.apple.combine (1.0) <f2b2287e-dd1d-3357-a36b-39536bc06109> /System/Library/Frameworks/Combine.framework/Versions/A/Combine
    0x7ff80e82a000 -     0x7ff80f1b2ff8 com.apple.Foundation (6.9) <b2777f39-79a2-3f29-849d-99acb74e4a12> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7ff810a52000 -     0x7ff811a59ff0 com.apple.AppKit (6.9) <af96f40f-d333-3647-9da4-eddc52df4753> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7ff80d780000 -     0x7ff80d7c7ff3 libdispatch.dylib (*) <c03e068c-2b62-3aed-9358-e0aa79ff7851> /usr/lib/system/libdispatch.dylib
    0x7ff817438000 -     0x7ff81772fffd com.apple.HIToolbox (2.1.1) <a6003e8b-72cc-3d98-b569-26102836c61f> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
    0x7ff917d08000 -     0x7ff9193a3ff4 com.apple.SwiftUI (4.4.36) <72ed51a9-3d6b-3e38-91ef-26162ea48e7f> /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
    0x7ff80d5c4000 -     0x7ff80d65c5a7 dyld (*) <f22a1143-9732-3e23-a8b7-cbade6bb8301> /usr/lib/dyld
    0x7ff80d91e000 -     0x7ff80d929fff libsystem_pthread.dylib (*) <86dfa543-95fa-36b4-83c6-bf03d01b2aad> /usr/lib/system/libsystem_pthread.dylib
    0x7ff80d8e4000 -     0x7ff80d91dff7 libsystem_kernel.dylib (*) <08606a44-7008-3658-9f00-6c250b80e9c3> /usr/lib/system/libsystem_kernel.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 2
    thread_create: 2
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=631.9M resident=0K(0%) swapped_out_or_unallocated=631.9M(100%)
Writable regions: Total=2.7G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.7G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               128K        1 
Activity Tracing                   256K        1 
CG backing stores                 3408K        8 
CG image                            60K        7 
ColorSync                          252K       29 
CoreAnimation                      116K       12 
CoreGraphics                        16K        3 
CoreUI image data                  540K        7 
Foundation                          16K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           420.4M       77 
MALLOC guard page                   48K       10 
MALLOC_MEDIUM (reserved)           1.9G       16         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
Memory Tag 244                       4K        1 
STACK GUARD                       56.0M       12 
Stack                             13.6M       12 
VM_ALLOCATE                       1132K       24 
__CTF                               824        1 
__DATA                            25.2M      429 
__DATA_CONST                      24.4M      255 
__DATA_DIRTY                      1122K      135 
__FONT_DATA                        2352        1 
__LINKEDIT                       171.0M        4 
__OBJC_RO                         66.2M        1 
__OBJC_RW                         2012K        2 
__TEXT                           460.9M      449 
dyld private memory                260K        2 
mapped file                      197.1M       38 
shared memory                     1308K       20 
===========                     =======  ======= 
TOTAL                              3.7G     1560 
TOTAL, minus reserved VM space     1.4G     1560 



-----------
Full Report
-----------

{"app_name":"Keyboard Cowboy","timestamp":"2023-05-25 19:36:01.00 +0800","app_version":"3.0.0","slice_uuid":"2ffe8a50-655a-3599-a9de-90aba4e693e8","build_version":"139","platform":1,"bundleID":"com.zenangst.Keyboard-Cowboy","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.3.1 (22E261)","roots_installed":0,"name":"Keyboard Cowboy","incident_id":"0CE6BF6D-BE62-442A-B0D5-94B7ECC4BD62"}
{
  "uptime" : 580000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro16,1",
  "coalitionID" : 94153,
  "osVersion" : {
    "train" : "macOS 13.3.1",
    "build" : "22E261",
    "releaseType" : "User"
  },
  "captureTime" : "2023-05-25 19:36:00.4564 +0800",
  "incident" : "0CE6BF6D-BE62-442A-B0D5-94B7ECC4BD62",
  "pid" : 2958,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-05-25 19:35:59.2670 +0800",
  "procStartAbsTime" : 585938331905640,
  "procExitAbsTime" : 585939520164212,
  "procName" : "Keyboard Cowboy",
  "procPath" : "\/Applications\/Keyboard Cowboy.app\/Contents\/MacOS\/Keyboard Cowboy",
  "bundleInfo" : {"CFBundleShortVersionString":"3.0.0","CFBundleVersion":"139","CFBundleIdentifier":"com.zenangst.Keyboard-Cowboy"},
  "storeInfo" : {"deviceIdentifierForVendor":"7A18BA60-79CD-5765-AD76-443C5C506F56","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.zenangst.Keyboard-Cowboy",
  "crashReporterKey" : "D7C6AECF-2424-E55B-8030-FDB69AFE3C9D",
  "throttleTimeout" : 2147483647,
  "codeSigningID" : "com.zenangst.Keyboard-Cowboy",
  "codeSigningTeamID" : "E23HUP39A3",
  "codeSigningFlags" : 570490881,
  "codeSigningValidationCategory" : 6,
  "codeSigningTrustLevel" : 0,
  "wakeTime" : 4199,
  "bridgeVersion" : {"build":"20P4252","train":"7.4"},
  "sleepWakeUUID" : "911ACE3D-FAA3-485D-B15C-983C11C9F809",
  "sip" : "disabled",
  "vmRegionInfo" : "0 is not in any region.  Bytes before following region: 4434534400\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      __TEXT                      10851a000-10879e000    [ 2576K] r-x\/r-x SM=COW  ...yboard Cowboy",
  "exception" : {"codes":"0x0000000000000001, 0x0000000000000000","rawCodes":[1,0],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000000"},
  "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":2958},
  "vmregioninfo" : "0 is not in any region.  Bytes before following region: 4434534400\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      __TEXT                      10851a000-10879e000    [ 2576K] r-x\/r-x SM=COW  ...yboard Cowboy",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":2,"thread_set_state":0,"task_for_pid":2},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":11906512,"instructionState":{"instructionStream":{"bytes":[192,116,7,72,199,0,0,0,0,0,76,139,117,136,77,133,246,116,15,72,141,61,201,48,223,66,232,191,110,254,255,73,137,6,76,137,231,232,119,228,254,255,72,139,5,226,107,237,66,72,139,0,72,59,69,208,117,20,137,216,72,129,196,152,0,0,0,91,65,92,65,93,65,94,65,95,93,195,232,72,205,27,0,144,144,144,144,144,144,144,64,246,199,1,117,53,72,139,7,72,133,192,116,31,72,139,13,92,111,143,65,72,57,200,116,19,168,1,116,29,72,139,21,212,108,237,66,72,35,2,72,57,200,117,14,72,139,71,8,168,4,117,19,72,139,127,40,235,21,72,139,53,207,75,237,66,255,37,201,108,237,66,72,131,199,63,72,131,231,240,72,137,248,195,144,144,144,85,65,87,65,86,65,85,65,84,83,49,192,72,133,255],"offset":96}},"threadState":{"r13":{"value":0},"rax":{"value":0},"rflags":{"value":66118},"cpu":{"value":14},"r14":{"value":0},"rsi":{"value":140704463755440},"r8":{"value":140701914247456},"cr2":{"value":0},"rdx":{"value":140704463755632},"r10":{"value":140704487614280,"symbolLocation":0,"symbol":"__CFConstantStringClassReference"},"r9":{"value":63287},"r15":{"value":0},"rbx":{"value":0},"trap":{"value":14,"description":"(no mapping for user data read)"},"err":{"value":4},"r11":{"value":140703356734642,"symbolLocation":0,"symbol":"-[__NSCFString isEqual:]"},"rip":{"value":140703356815669,"matchesCrashFrame":1},"rbp":{"value":140701914247648},"rsp":{"value":140701914247560},"r12":{"value":0},"rcx":{"value":8564956305608736904},"flavor":"x86_THREAD_STATE","rdi":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":121141,"symbol":"CFDataGetBytePtr","symbolLocation":6,"imageIndex":2},{"imageOffset":2112144,"imageIndex":0},{"imageOffset":2110103,"imageIndex":0},{"imageOffset":613320,"imageIndex":0},{"imageOffset":613161,"imageIndex":0},{"imageOffset":90355,"symbol":"Subscribers.Sink.receive(_:)","symbolLocation":83,"imageIndex":3},{"imageOffset":92064,"symbol":"protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B>","symbolLocation":16,"imageIndex":3},{"imageOffset":3217369,"symbol":"closure #1 in Notification.Subscription.init(_:_:_:_:)","symbolLocation":281,"imageIndex":4},{"imageOffset":3215922,"symbol":"thunk for @escaping @callee_guaranteed @Sendable (@in_guaranteed Notification) -> ()","symbolLocation":50,"imageIndex":4},{"imageOffset":469031,"symbol":"__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__","symbolLocation":120,"imageIndex":2},{"imageOffset":1094766,"symbol":"___CFXRegistrationPost_block_invoke","symbolLocation":88,"imageIndex":2},{"imageOffset":1094595,"symbol":"_CFXRegistrationPost","symbolLocation":536,"imageIndex":2},{"imageOffset":285367,"symbol":"_CFXNotificationPost","symbolLocation":729,"imageIndex":2},{"imageOffset":40208,"symbol":"-[NSNotificationCenter postNotificationName:object:userInfo:]","symbolLocation":82,"imageIndex":4},{"imageOffset":3798895,"symbol":"__NSSelectedKeyboardInputSourcesChangedNotification","symbolLocation":58,"imageIndex":5},{"imageOffset":469105,"symbol":"__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__","symbolLocation":194,"imageIndex":2},{"imageOffset":1094766,"symbol":"___CFXRegistrationPost_block_invoke","symbolLocation":88,"imageIndex":2},{"imageOffset":7569,"symbol":"_dispatch_call_block_and_release","symbolLocation":12,"imageIndex":6},{"imageOffset":12339,"symbol":"_dispatch_client_callout","symbolLocation":8,"imageIndex":6},{"imageOffset":65487,"symbol":"_dispatch_main_queue_drain","symbolLocation":954,"imageIndex":6},{"imageOffset":64519,"symbol":"_dispatch_main_queue_callback_4CF","symbolLocation":31,"imageIndex":6},{"imageOffset":770613,"symbol":"__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__","symbolLocation":9,"imageIndex":2},{"imageOffset":508015,"symbol":"__CFRunLoopRun","symbolLocation":2452,"imageIndex":2},{"imageOffset":503921,"symbol":"CFRunLoopRunSpecific","symbolLocation":560,"imageIndex":2},{"imageOffset":192461,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":7},{"imageOffset":191966,"symbol":"ReceiveNextEventCommon","symbolLocation":657,"imageIndex":7},{"imageOffset":191288,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":64,"imageIndex":7},{"imageOffset":255904,"symbol":"_DPSNextEvent","symbolLocation":858,"imageIndex":5},{"imageOffset":251466,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":1214,"imageIndex":5},{"imageOffset":195768,"symbol":"-[NSApplication run]","symbolLocation":586,"imageIndex":5},{"imageOffset":16082,"symbol":"NSApplicationMain","symbolLocation":817,"imageIndex":5},{"imageOffset":548027,"imageIndex":8},{"imageOffset":17559364,"imageIndex":8},{"imageOffset":10335151,"imageIndex":8},{"imageOffset":15153,"imageIndex":0},{"imageOffset":25631,"symbol":"start","symbolLocation":1903,"imageIndex":9}]},{"id":11906524,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906525,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906533,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906539,"frames":[{"imageOffset":7510,"symbol":"__open","symbolLocation":10,"imageIndex":11},{"imageOffset":43891,"symbol":"open","symbolLocation":204,"imageIndex":11},{"imageOffset":119661,"symbol":"_CFReadBytesFromFile","symbolLocation":181,"imageIndex":2},{"imageOffset":117585,"symbol":"CFURLCreateDataAndPropertiesFromResource","symbolLocation":369,"imageIndex":2},{"imageOffset":116219,"symbol":"_CFBundleCopyInfoDictionaryInDirectoryWithVersion","symbolLocation":863,"imageIndex":2},{"imageOffset":114476,"symbol":"_CFBundleRefreshInfoDictionaryAlreadyLocked","symbolLocation":111,"imageIndex":2},{"imageOffset":114334,"symbol":"CFBundleGetInfoDictionary","symbolLocation":44,"imageIndex":2},{"imageOffset":1138724,"symbol":"_CFBundleCreate","symbolLocation":357,"imageIndex":2},{"imageOffset":31081,"symbol":"-[NSBundle _cfBundle]","symbolLocation":55,"imageIndex":4},{"imageOffset":30991,"symbol":"-[NSBundle infoDictionary]","symbolLocation":17,"imageIndex":4},{"imageOffset":50637,"symbol":"-[NSBundle bundleIdentifier]","symbolLocation":22,"imageIndex":4},{"imageOffset":2090917,"imageIndex":0},{"imageOffset":2088874,"imageIndex":0},{"imageOffset":2088993,"imageIndex":0},{"imageOffset":2079253,"imageIndex":0},{"imageOffset":2078155,"imageIndex":0},{"imageOffset":575313,"imageIndex":0},{"imageOffset":589313,"imageIndex":0},{"imageOffset":593585,"imageIndex":0}]},{"id":11906540,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906660,"name":"com.apple.NSEventThread","frames":[{"imageOffset":5554,"symbol":"mach_msg2_trap","symbolLocation":10,"imageIndex":11},{"imageOffset":63277,"symbol":"mach_msg2_internal","symbolLocation":78,"imageIndex":11},{"imageOffset":34276,"symbol":"mach_msg_overwrite","symbolLocation":692,"imageIndex":11},{"imageOffset":6298,"symbol":"mach_msg","symbolLocation":19,"imageIndex":11},{"imageOffset":512431,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":145,"imageIndex":2},{"imageOffset":506928,"symbol":"__CFRunLoopRun","symbolLocation":1365,"imageIndex":2},{"imageOffset":503921,"symbol":"CFRunLoopRunSpecific","symbolLocation":560,"imageIndex":2},{"imageOffset":1698057,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":5},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":10},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":10}]},{"id":11906664,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906665,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906666,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906667,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]},{"id":11906668,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4434534400,
    "CFBundleShortVersionString" : "3.0.0",
    "CFBundleIdentifier" : "com.zenangst.Keyboard-Cowboy",
    "size" : 2637824,
    "uuid" : "2ffe8a50-655a-3599-a9de-90aba4e693e8",
    "path" : "\/Applications\/Keyboard Cowboy.app\/Contents\/MacOS\/Keyboard Cowboy",
    "name" : "Keyboard Cowboy",
    "CFBundleVersion" : "139"
  },
  {
    "source" : "P",
    "arch" : "x86_64h",
    "base" : 4608053248,
    "size" : 65536,
    "uuid" : "d2da3b5f-f5ba-3ef1-b99d-bc64a8487401",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64h",
    "base" : 140703356694528,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 4837360,
    "uuid" : "315a3f65-0954-3635-96dc-2f65c691d074",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1971"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703646298112,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.combine",
    "size" : 1032184,
    "uuid" : "f2b2287e-dd1d-3357-a36b-39536bc06109",
    "path" : "\/System\/Library\/Frameworks\/Combine.framework\/Versions\/A\/Combine",
    "name" : "Combine",
    "CFBundleVersion" : "310"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703372058624,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 9998329,
    "uuid" : "b2777f39-79a2-3f29-849d-99acb74e4a12",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1971"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703407874048,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 16809969,
    "uuid" : "af96f40f-d333-3647-9da4-eddc52df4753",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2299.50.120"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703354585088,
    "size" : 294900,
    "uuid" : "c03e068c-2b62-3aed-9358-e0aa79ff7851",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703518916608,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 3112958,
    "uuid" : "a6003e8b-72cc-3d98-b569-26102836c61f",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140707823124480,
    "CFBundleShortVersionString" : "4.4.36",
    "CFBundleIdentifier" : "com.apple.SwiftUI",
    "size" : 23707637,
    "uuid" : "72ed51a9-3d6b-3e38-91ef-26162ea48e7f",
    "path" : "\/System\/Library\/Frameworks\/SwiftUI.framework\/Versions\/A\/SwiftUI",
    "name" : "SwiftUI",
    "CFBundleVersion" : "4.4.36"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703352766464,
    "size" : 624040,
    "uuid" : "f22a1143-9732-3e23-a8b7-cbade6bb8301",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703356280832,
    "size" : 49152,
    "uuid" : "86dfa543-95fa-36b4-83c6-bf03d01b2aad",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703356043264,
    "size" : 237560,
    "uuid" : "08606a44-7008-3658-9f00-6c250b80e9c3",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  }
],
  "sharedCache" : {
  "base" : 140703352143872,
  "size" : 21474836480,
  "uuid" : "1b64bf32-be7f-304b-add0-ce61655e2402"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=631.9M resident=0K(0%) swapped_out_or_unallocated=631.9M(100%)\nWritable regions: Total=2.7G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.7G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               128K        1 \nActivity Tracing                   256K        1 \nCG backing stores                 3408K        8 \nCG image                            60K        7 \nColorSync                          252K       29 \nCoreAnimation                      116K       12 \nCoreGraphics                        16K        3 \nCoreUI image data                  540K        7 \nFoundation                          16K        1 \nKernel Alloc Once                    8K        1 \nMALLOC                           420.4M       77 \nMALLOC guard page                   48K       10 \nMALLOC_MEDIUM (reserved)           1.9G       16         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nMemory Tag 244                       4K        1 \nSTACK GUARD                       56.0M       12 \nStack                             13.6M       12 \nVM_ALLOCATE                       1132K       24 \n__CTF                               824        1 \n__DATA                            25.2M      429 \n__DATA_CONST                      24.4M      255 \n__DATA_DIRTY                      1122K      135 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       171.0M        4 \n__OBJC_RO                         66.2M        1 \n__OBJC_RW                         2012K        2 \n__TEXT                           460.9M      449 \ndyld private memory                260K        2 \nmapped file                      197.1M       38 \nshared memory                     1308K       20 \n===========                     =======  ======= \nTOTAL                              3.7G     1560 \nTOTAL, minus reserved VM space     1.4G     1560 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "c945529769b8424950cc13e900c49188478dcd5a",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "62c74108bcb0435c2153f963",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "64599e0866e8b82abff78329"
      },
      "deploymentId" : 240000177
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookPro16,1, BootROM 1968.100.17.0.0 (iBridge: 20.16.4252.0.0,0), 8 processors, 8-Core Intel Core i9, 2.3 GHz, 64 GB, SMC 
Graphics: Intel UHD Graphics 630, Intel UHD Graphics 630, Built-In
Graphics: AMD Radeon Pro 5500M, AMD Radeon Pro 5500M, PCIe, 8 GB
Display: Color LCD, 3072 x 1920 Retina, MirrorOff, Online
Display: 24T1W1G5, 1920 x 1080 (1080p FHD - Full High Definition), Main, MirrorOff, Online
Memory Module: BANK 0/ChannelA-DIMM0, 32 GB, DDR4, 2667 MHz, Micron, MT40A4G8BAF-062E:B
Memory Module: BANK 2/ChannelB-DIMM0, 32 GB, DDR4, 2667 MHz, Micron, MT40A4G8BAF-062E:B
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x7BF), wl0: Dec  9 2022 17:02:25 version 9.30.492.0.32.5.87 FWID 01-e7856862
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: USB 10/100/1000 LAN, Ethernet, en6
Network Service: Wi-Fi, AirPort, en0
USB Device: USB3.0 Hub
USB Device: USB 10/100/1000 LAN
USB Device: USB31Bus
USB Device: USB2.0 Hub
USB Device: Keychron K3
USB Device: USB 2.0 Hub
USB Device: NS1081
USB Device: USB 2.0 BILLBOARD
USB Device: Razer DeathAdder V2 Mini
USB Device: T2Bus
USB Device: composite_device
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5
Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5

@zenangst
Copy link
Owner

Hey @zer0yu, oh wow... that is not great.
Thanks for the bug report, I'll look into it and see if I can smash this bug 🐛🔨

@zenangst zenangst added bug Something isn't working critical labels May 25, 2023
@zenangst zenangst added this to the 3.0.1 milestone May 25, 2023
@zenangst
Copy link
Owner

@zer0yu did this happen as soon as you launched the app, or after you gave the app permissions?

@zer0yu
Copy link
Author

zer0yu commented May 25, 2023

After I launch the app, it crashes immediately. It crashed so fast that I didn't even see the app authorization UI.

@zenangst
Copy link
Owner

Oh, at least that gives me a hint that this is happening very early in the apps life-cycle. I'll start by looking into how combine is used early inside the app.

I'm currently on 13.4 (22F66) on this machine and on Apple Silicon, so there are some differences in our setups.

@zenangst
Copy link
Owner

@zer0yu I just pushed a new version to GitHub.
Would you mind trying that one out?

Based of what you shared in the stack trace, it is related to Combine. So what I've done in the new version is to wait with setting up some of the subscription until after Keyboard Cowboy has been given permissions.

Excerpt from the release notes of 3.0.1

🚦Refactor the use of Combine; instead of using a collection of AnyCancellable, we now have multiple instance types with explicitly named subscriptions. This means that we can't have more than one subscription at a time, which should be a lot safer in the future. Also, subscriptions wait for the mach port to be established before subscribing. This should ensure that we don't try to listen for events before the application is ready to go.

https://github.com/zenangst/KeyboardCowboy/releases/tag/3.0.1

@zenangst zenangst modified the milestones: 3.0.1, 3.0.2 May 25, 2023
@zenangst
Copy link
Owner

zenangst commented May 25, 2023

Oh... I found something, that might be the cause of it.
Or at least, I found an additional Combine subscription that should also be moved to a later stage in the applications lifecycle.

With a bit of luck and if life allows, I should be able to pump out 3.0.2 tomorrow, or rather, later today.

But for good measure, if you don't mind testing 3.0.1 while the new version is cooking.

Stay tuned.

@zenangst
Copy link
Owner

Made a PR here - #257

@zenangst
Copy link
Owner

@zer0yu
Copy link
Author

zer0yu commented May 26, 2023

wow, awesome! I'll try the latest version! 😁

@zer0yu
Copy link
Author

zer0yu commented May 26, 2023

It works! I will continue to test and see if there are any other bugs. It's really great that you were able to fix this bug so quickly!

@zer0yu zer0yu closed this as completed May 26, 2023
@zenangst
Copy link
Owner

@zer0yu wow, that's great! My hunch really paid off. Thanks for providing all the information, bringing this to my attention and testing the new releases

Teamwork makes dream work 😎

@zenangst zenangst modified the milestones: 3.0.1, 3.0.2 May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical
Projects
None yet
Development

No branches or pull requests

2 participants