Mac Catalyst 应用程序在其他 mac 上崩溃,但在 Xcode 运行 时可以正常工作
Mac Catalyst app crashed on other mac, but works when run from Xcode
我在向测试人员分发我的 Mac 催化剂应用程序时遇到问题,虽然它在我的 machine 上正常 运行ning,但在其他人上启动后立即崩溃,没有任何人类可理解的崩溃报告。
此外,当我们 运行 在 mac 上使用 Xcode 它工作正常,但在运送到我的 mac 时崩溃。
这是我所做的 - 我正在使用 Xcode 11.3.1,应用程序是自动签名的,我在发货前对其进行了无误公证。
有谁知道它崩溃的原因吗?
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
terminating with uncaught exception of type NSException
abort() called
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff3913a8ab __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff6f3f4805 objc_exception_throw + 48
2 CoreFoundation 0x00007fff391e98ae _CFThrowFormattedException + 202
3 CoreFoundation 0x00007fff391f424b -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.5 + 0
4 CoreFoundation 0x00007fff39044d69 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 235
5 CoreFoundation 0x00007fff39044c66 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
6 CoinStats 0x0000000108e5cbbf CoinStats + 2198463
7 UIKitCore 0x00007fff76fa6657 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
8 UIKitCore 0x00007fff76f8fc50 -[UIViewController loadViewIfRequired] + 1023
9 UIKitCore 0x00007fff76f8f83e -[UIViewController view] + 27
10 UIKit 0x00007fff70a187df -[UISplitViewControllerAccessibility _axModalizeViewControllerViews] + 309
11 UIKit 0x00007fff70a18a8c -[UISplitViewControllerPanelImplAccessibility loadView] + 158
12 UIKitCore 0x00007fff76f8f8fd -[UIViewController loadViewIfRequired] + 172
13 UIKitCore 0x00007fff76f8f83e -[UIViewController view] + 27
14 CoinStats 0x0000000108c99b5f CoinStats + 351071
15 UIKitCore 0x00007fff77b8361f -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 276
16 UIKitCore 0x00007fff77b834dd -[UIStoryboardSegueTemplate _perform:] + 82
17 UIKitCore 0x00007fff775a477a -[UIViewController performSegueWithIdentifier:sender:] + 99
18 UIKit 0x00007fff70a92720 -[UIViewControllerAccessibility performSegueWithIdentifier:sender:] + 102
19 CoinStats 0x0000000108d937d7 CoinStats + 1374167
20 CoinStats 0x0000000108d91ed7 CoinStats + 1367767
21 UIKitCore 0x00007fff76fa6657 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
22 UIKitCore 0x00007fff76f8fc50 -[UIViewController loadViewIfRequired] + 1023
23 UIKitCore 0x00007fff76f8f83e -[UIViewController view] + 27
24 UIKitCore 0x00007fff76fe99c5 -[UIWindow addRootViewControllerViewIfPossible] + 156
25 UIKitCore 0x00007fff76f7c8e3 -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 210
26 UIKitCore 0x00007fff76fe7944 -[UIWindow _setHidden:forced:] + 361
27 UIKit 0x00007fff70a18944 -[UIWindowAccessibility _orderFrontWithoutMakingKey] + 86
28 UIKitCore 0x00007fff76fe7787 -[UIWindow _mainQueue_makeKeyAndVisible] + 42
29 CoinStats 0x0000000108dbd543 CoinStats + 1545539
30 UIKitCore 0x00007fff76f710d0 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 312
31 UIKitCore 0x00007fff76f70947 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5764
32 UIKitCore 0x00007fff76f6dd3e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1319
33 UIKitCore 0x00007fff76f6d70b -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
34 UIKitCore 0x00007fff76f6890b _UIScenePerformActionsWithLifecycleActionMask + 83
35 UIKitCore 0x00007fff76f6ce55 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
36 UIKitCore 0x00007fff76f6cc34 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 467
37 UIKitCore 0x00007fff76f6be39 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 823```
好的,经过长时间的研究,我发现了这个问题。我们在我们的应用程序中使用了自定义字体并导致了崩溃,这似乎是苹果错误,因为字体是正确的 link 并添加到 Info.plist 中。同样在安装了字体的机器上,应用程序不会崩溃。将字体更改为苹果提供的类似字体后,应用程序完美运行。
我在向测试人员分发我的 Mac 催化剂应用程序时遇到问题,虽然它在我的 machine 上正常 运行ning,但在其他人上启动后立即崩溃,没有任何人类可理解的崩溃报告。
此外,当我们 运行 在 mac 上使用 Xcode 它工作正常,但在运送到我的 mac 时崩溃。 这是我所做的 - 我正在使用 Xcode 11.3.1,应用程序是自动签名的,我在发货前对其进行了无误公证。
有谁知道它崩溃的原因吗?
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
terminating with uncaught exception of type NSException
abort() called
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff3913a8ab __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff6f3f4805 objc_exception_throw + 48
2 CoreFoundation 0x00007fff391e98ae _CFThrowFormattedException + 202
3 CoreFoundation 0x00007fff391f424b -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.5 + 0
4 CoreFoundation 0x00007fff39044d69 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 235
5 CoreFoundation 0x00007fff39044c66 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
6 CoinStats 0x0000000108e5cbbf CoinStats + 2198463
7 UIKitCore 0x00007fff76fa6657 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
8 UIKitCore 0x00007fff76f8fc50 -[UIViewController loadViewIfRequired] + 1023
9 UIKitCore 0x00007fff76f8f83e -[UIViewController view] + 27
10 UIKit 0x00007fff70a187df -[UISplitViewControllerAccessibility _axModalizeViewControllerViews] + 309
11 UIKit 0x00007fff70a18a8c -[UISplitViewControllerPanelImplAccessibility loadView] + 158
12 UIKitCore 0x00007fff76f8f8fd -[UIViewController loadViewIfRequired] + 172
13 UIKitCore 0x00007fff76f8f83e -[UIViewController view] + 27
14 CoinStats 0x0000000108c99b5f CoinStats + 351071
15 UIKitCore 0x00007fff77b8361f -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 276
16 UIKitCore 0x00007fff77b834dd -[UIStoryboardSegueTemplate _perform:] + 82
17 UIKitCore 0x00007fff775a477a -[UIViewController performSegueWithIdentifier:sender:] + 99
18 UIKit 0x00007fff70a92720 -[UIViewControllerAccessibility performSegueWithIdentifier:sender:] + 102
19 CoinStats 0x0000000108d937d7 CoinStats + 1374167
20 CoinStats 0x0000000108d91ed7 CoinStats + 1367767
21 UIKitCore 0x00007fff76fa6657 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
22 UIKitCore 0x00007fff76f8fc50 -[UIViewController loadViewIfRequired] + 1023
23 UIKitCore 0x00007fff76f8f83e -[UIViewController view] + 27
24 UIKitCore 0x00007fff76fe99c5 -[UIWindow addRootViewControllerViewIfPossible] + 156
25 UIKitCore 0x00007fff76f7c8e3 -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 210
26 UIKitCore 0x00007fff76fe7944 -[UIWindow _setHidden:forced:] + 361
27 UIKit 0x00007fff70a18944 -[UIWindowAccessibility _orderFrontWithoutMakingKey] + 86
28 UIKitCore 0x00007fff76fe7787 -[UIWindow _mainQueue_makeKeyAndVisible] + 42
29 CoinStats 0x0000000108dbd543 CoinStats + 1545539
30 UIKitCore 0x00007fff76f710d0 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 312
31 UIKitCore 0x00007fff76f70947 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5764
32 UIKitCore 0x00007fff76f6dd3e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1319
33 UIKitCore 0x00007fff76f6d70b -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
34 UIKitCore 0x00007fff76f6890b _UIScenePerformActionsWithLifecycleActionMask + 83
35 UIKitCore 0x00007fff76f6ce55 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
36 UIKitCore 0x00007fff76f6cc34 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 467
37 UIKitCore 0x00007fff76f6be39 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 823```
好的,经过长时间的研究,我发现了这个问题。我们在我们的应用程序中使用了自定义字体并导致了崩溃,这似乎是苹果错误,因为字体是正确的 link 并添加到 Info.plist 中。同样在安装了字体的机器上,应用程序不会崩溃。将字体更改为苹果提供的类似字体后,应用程序完美运行。