gpt4 book ai didi

swift - 有没有办法了解导致 `_NSTouchBarFinderObservation` 崩溃的原因?

转载 作者:行者123 更新时间:2023-12-05 03:29:01 25 4
gpt4 key购买 nike

My Crashlytics 显示多个用户遇到以下崩溃(见下文)。我能够重新创建它的唯一方法(我怀疑用户正在这样做)是调出 Xcode Touch Bar 模拟器并在应用程序运行时在 generations 之间切换:

TouchBar

以下设备和操作系统已报告崩溃:

  • macOS 12.2.0 MacBookPro16,1
  • macOS 12.2.0 MacBookPro15,4
  • macOS 12.1.0 MacBookPro15,4
  • macOS 12.0.0 MacBookPro15,4

我的应用是:

  • 仅限 macOS
  • 用 SwiftUI 编写,包含一个 NSViewControllerNSTextView
  • 永远不要触摸/观察/引用触摸栏。

谁知道这次崩溃的原因?


Cannot remove an observer <_NSTouchBarFinderObservation 0x6000026f6260> for the key path "nextResponder" from <GUL_SwiftUI.AppDelegate-0624A6E4-3CE4-4739-BDD0-0721CE556CBA 0x600000290360> because it is not registered as an observer.
2022-02-13 14:28:47.289790+0400 Lyrcs[63176:1681748] [General] (
0 CoreFoundation 0x00000001c1dd41cc __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001c1b257b8 objc_exception_throw + 60
2 Foundation 0x00000001c2c1b96c -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 668
3 Foundation 0x00000001c2c1b67c -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 144
4 Foundation 0x00000001c2c1b304 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:context:] + 204
5 AppKit 0x00000001c4f29df8 -[_NSTouchBarFinderObservation invalidate] + 316
6 AppKit 0x00000001c4f2a2ec -[NSTouchBarFinder invalidate] + 268
7 AppKit 0x00000001c48ae584 -[NSApplicationFunctionRowController _teardown] + 104
8 AppKit 0x00000001c48ae31c -[NSApplicationFunctionRowController _sync] + 484
9 Foundation 0x00000001c2bfa13c NSKeyValueNotifyObserver + 292
10 Foundation 0x00000001c2cc655c NSKeyValueDidChange + 356
11 Foundation 0x00000001c2d79770 NSKeyValueDidChangeWithPerThreadPendingNotifications + 160
12 AppKit 0x00000001c5173f80 __33+[NSFunctionRowDevice initialize]_block_invoke.1 + 492
13 AppKit 0x00000001c5174324 ___NSMainRunLoopPerformBlockInModes_block_invoke + 44
14 CoreFoundation 0x00000001c1d54708 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
15 CoreFoundation 0x00000001c1d5457c __CFRunLoopDoBlocks + 412
16 CoreFoundation 0x00000001c1d531f4 __CFRunLoopRun + 800
17 CoreFoundation 0x00000001c1d52734 CFRunLoopRunSpecific + 600
18 HIToolbox 0x00000001ca8e4f68 RunCurrentEventLoopInMode + 292
19 HIToolbox 0x00000001ca8e4cdc ReceiveNextEventCommon + 552
20 HIToolbox 0x00000001ca8e4a9c _BlockUntilNextEventMatchingListInModeWithFilter + 72
21 AppKit 0x00000001c48a8ce0 _DPSNextEvent + 844
22 AppKit 0x00000001c48a7584 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1332
23 AppKit 0x00000001c48995a4 -[NSApplication run] + 596
24 AppKit 0x00000001c486ac78 NSApplicationMain + 1064
25 SwiftUI 0x00000001e6779c9c $s7SwiftUI6runAppys5NeverOSo21NSApplicationDelegate_So11NSResponderCXcFTf4e_nAA07TestingdG0C_Tg5 + 148
26 SwiftUI 0x00000001e72a3a54 $s7SwiftUI6runAppys5NeverOxAA0D0RzlF + 260
27 SwiftUI 0x00000001e6d3366c $s7SwiftUI3AppPAAE4mainyyFZ + 128

最佳答案

原来罪魁祸首是 Firebase Analytics。防止此崩溃的解决方案是将 FirebaseAppDelegateProxyEnabled 添加到信息 plist 并为其指定 BooleanNO。似乎 SwiftUI、macOS 和 Firebase Analytics 不能很好地协同工作。

关于swift - 有没有办法了解导致 `_NSTouchBarFinderObservation` 崩溃的原因?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71091412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com