@skucas Interesting. I just removed Input Monitoring for my app with AX permissions, and the APIs still work after a restart...
Should I continue to ask users to grant me Input Monitoring permissions? Does Apple intend to keep this "feature" of the accessibility permission?
Post
Replies
Boosts
Views
Activity
@eskimo
Nope, I don't have a crash report, but I figured out the cause. It is indeed the force unwrap! (from a race condition). Thanks!
@eskimo misinterpreted the crash logs :/
Here is the supposed source of error [1]. Do you have any clues as to what can cause a SIGILL? From what I can see I am not working with any lower level things that would cause this issue.
[1] https://github.com/dexterleng/vimac/blob/930d63373d17ed9c6bc2e4120e6698d220c97499/ViMac-Swift/ViewControllers/HintModeViewController.swift#L136
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dexterleng.vimac 0x000000010dbf284f HintModeViewController.onLetterKeyDown(event:) (in Vimac) (HintModeViewController.swift:83)
1 dexterleng.vimac 0x000000010dbf7e5a partial apply for closure #1 in HintModeViewController.observeLetterKeyDown() (in Vimac) (<compiler-generated>:0)
2 dexterleng.vimac 0x000000010dbf09f3 partial apply for closure #2 in HintModeInputListener.observeSpaceKey(onEvent:) (in Vimac) (<compiler-generated>:0)
3 dexterleng.vimac 0x000000010dc0af6f thunk for @escaping @callee_guaranteed (@guaranteed NSEvent) -> () (in Vimac) (<compiler-generated>:0)
4 org.cocoapods.RxSwift 0x000000010de8d859 closure #1 in ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) + 361
5 org.cocoapods.RxSwift 0x000000010de8dab5 partial apply for closure #1 in ObservableType.subscribe(onNext:onError:onCompleted:onDisposed:) + 53
6 org.cocoapods.RxSwift 0x000000010de3de93 AnonymousObserver.onCore(_:) + 35
7 org.cocoapods.RxSwift 0x000000010de90457 ObserverBase.on(_:) + 167
8 org.cocoapods.RxSwift 0x000000010de905f0 protocol witness for ObserverType.on(_:) in conformance ObserverBase<A> + 16
9 org.cocoapods.RxSwift 0x000000010deb10d3 Sink.forwardOn(_:) + 99
10 org.cocoapods.RxSwift 0x000000010de7bbe8 FilterSink.on(_:) + 440
11 org.cocoapods.RxSwift 0x000000010de7bd30 protocol witness for ObserverType.on(_:) in conformance FilterSink<A> + 16
12 org.cocoapods.RxSwift 0x000000010de909a3 partial apply + 67
13 org.cocoapods.RxSwift 0x000000010deadb41 partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed Event<A>) -> () + 17
14 org.cocoapods.RxSwift 0x000000010deac80d ShareReplay1WhileConnectedConnection.on(_:) + 109
15 org.cocoapods.RxSwift 0x000000010dead347 protocol witness for ObserverType.on(_:) in conformance ShareWhileConnectedConnection<A> + 23
16 org.cocoapods.RxSwift 0x000000010deb10d3 Sink.forwardOn(_:) + 99
17 org.cocoapods.RxSwift 0x000000010de68b94 AnonymousObservableSink.on(_:) + 228
18 org.cocoapods.RxSwift 0x000000010de68dc0 protocol witness for ObserverType.on(_:) in conformance AnonymousObservableSink<A> + 16
19 org.cocoapods.RxSwift 0x000000010de909a3 partial apply + 67
20 org.cocoapods.RxSwift 0x000000010de3dfc1 AnyObserver.on(_:) + 33
21 org.cocoapods.RxSwift 0x000000010de90776 ObserverType.onNext(_:) + 166
22 dexterleng.vimac 0x000000010dbf81b4 closure #1 in closure #1 in variable initialization expression of InputListener.events (in Vimac) (InputListener.swift:11)
23 dexterleng.vimac 0x000000010dbf81ec thunk for @escaping @callee_guaranteed (@guaranteed NSEvent) -> (@owned NSEvent?) (in Vimac) (<compiler-generated>:0)
24 com.apple.AppKit 0x00007fff36c3f982 _NSSendEventToObservers + 323
25 com.apple.AppKit 0x00007fff36c3e446 -[NSApplication(NSEvent) sendEvent:] + 82
26 com.apple.AppKit 0x00007fff36a8b5bf -[NSApplication run] + 707
27 com.apple.AppKit 0x00007fff36a5d396 NSApplicationMain + 777
28 dexterleng.vimac 0x000000010dbeec69 main (in Vimac) (AppDelegate.swift:19)
29 libdyld.dylib 0x00007fff73895cc9 start + 1