应用程序在启动时立即崩溃..仅通过TestFlight或Store在iOS9上发生崩溃。使用Xcode 8发布
我有一个iPhone应用程序,它只有在通过TestFlight或App Store发布后才会在iOS9设备上崩溃。构建规范是:应用程序在启动时立即崩溃..仅通过TestFlight或Store在iOS9上发生崩溃。使用Xcode 8发布
部署目标8.1 基地SDK:最新的iOS(iOS版10.1)
之前,我张贴的崩溃日志我想提一提,这个应用程序已经在App Store在过去的2年并从未有过问题。今年我们已经对应用商店进行了3次更新,其中2次是在iOS10发布之后,iOS9设备没有问题。
奇怪的是,我们使用的是Crashlytics,它已经报告了600多次崩溃,其中每一次崩溃都指向内部苹果框架或私有API。我有一个iOS 9.2.1设备,它也崩溃,我已经从日志中提取。他们开始遵循一个趋势,但我需要一些帮助来破译崩溃的原因。
崩溃1:
Thread 0 Crashed:
0 libobjc.A.dylib 0x22fb3af6 objc_msgSend + 22
1 libobjc.A.dylib 0x22fc0f8a objc_object::sidetable_release(bool) + 150
2 libobjc.A.dylib 0x22fc13cc (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 388
3 FrontBoardServices 0x24aebc7e -[FBSSerialQueue _performNext] + 242
4 FrontBoardServices 0x24aebf60 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
5 CoreFoundation 0x2379d256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
6 CoreFoundation 0x2379ce46 __CFRunLoopDoSources0 + 454
7 CoreFoundation 0x2379b1ae __CFRunLoopRun + 806
8 CoreFoundation 0x236edbb8 CFRunLoopRunSpecific + 516
9 CoreFoundation 0x236ed9ac CFRunLoopRunInMode + 108
10 UIKit 0x279dfa16 -[UIApplication _run] + 526
11 UIKit 0x279d9fb4 UIApplicationMain + 144
12 Where Next 0x000a7816 main (main.m:16)
13 libdyld.dylib 0x233a0872 start + 2
崩溃2:
Thread 0 Crashed:
0 libobjc.A.dylib 0x22fb3af6 objc_msgSend + 22
1 CoreUI 0x277e3022 -[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:devic eIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:] + 646
2 CoreUI 0x277e2d98 -[CUICatalog _resolvedRenditionKeyForName:scaleFactor:deviceIdiom:deviceSubt ype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:withBaseKeySelector:] + 284
3 CoreUI 0x277e252a -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:] + 94
4 UIKit 0x28183a2c __98-[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 496
5 UIKit 0x2818377e -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 230
6 UIKit 0x2798bcd4 -[_UIAssetManager imageNamed:scale:idiom:subtype:] + 108
7 UIKit 0x2798bc62 -[_UIAssetManager imageNamed:idiom:subtype:] + 46
8 UIKit 0x2798bc2e -[_UIAssetManager imageNamed:idiom:] + 46
9 UIKit 0x27e1e438 -[UIImageNibPlaceholder initWithCoder:] + 456
10 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
11 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
12 UIKit 0x27e0a602 -[UIButtonContent initWithCoder:] + 382
13 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
14 UIKit 0x27f3250c UINibDecoderDecodeObjectForValue + 1688
15 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
16 UIKit 0x27e0d03c -[UIButton initWithCoder:] + 748
17 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
18 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
19 UIKit 0x27e1d202 -[UIRuntimeConnection initWithCoder:] + 114
20 UIKit 0x27e1d88c -[UIRuntimeEventConnection initWithCoder:] + 52
21 UIKit 0x27f32180 UINibDecoderDecodeObjectForValue + 780
22 UIKit 0x27f32112 UINibDecoderDecodeObjectForValue + 670
23 UIKit 0x27f31e68 -[UINibDecoder decodeObjectForKey:] + 296
24 UIKit 0x27e1c796 -[UINib instantiateWithOwner:options:] + 1110
25 UIKit 0x27cd6676 -[UIViewController _loadViewFromNibNamed:bundle:] + 322
26 UIKit 0x27aab9d6 -[UIViewController loadView] + 142
27 UIKit 0x27971a0a -[UIViewController loadViewIfRequired] + 150
28 UIKit 0x27971958 -[UIViewController view] + 24
29 UIKit 0x281edf4a __67-[UIStoryboardEmbedSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 498
30 UIKit 0x280642d4 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 432
31 UIKit 0x28064102 -[UIStoryboardSegueTemplate _perform:] + 66
32 UIKit 0x28064374 -[UIStoryboardSegueTemplate perform:] + 132
33 UIKit 0x27971bca -[UIViewController loadViewIfRequired] + 598
34 UIKit 0x27971958 -[UIViewController view] + 24
35 UIKit 0x279786d0 -[UIWindow addRootViewControllerViewIfPossible] + 68
36 UIKit 0x27975bf2 -[UIWindow _setHidden:forced:] + 278
37 UIKit 0x279ea914 -[UIWindow makeKeyAndVisible] + 48
38 UIKit 0x27c0f11c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3320
39 UIKit 0x27c12f0e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1570
40 UIKit 0x27c26c14 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3228 + 36
41 UIKit 0x27c103f6 -[UIApplication workspaceDidEndTransaction:] + 134
42 FrontBoardServices 0x24aebc74 -[FBSSerialQueue _performNext] + 232
43 FrontBoardServices 0x24aebf60 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
44 CoreFoundation 0x2379d256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
45 CoreFoundation 0x2379ce46 __CFRunLoopDoSources0 + 454
46 CoreFoundation 0x2379b1ae __CFRunLoopRun + 806
47 CoreFoundation 0x236edbb8 CFRunLoopRunSpecific + 516
48 CoreFoundation 0x236ed9ac CFRunLoopRunInMode + 108
49 UIKit 0x279dfa16 -[UIApplication _run] + 526
50 UIKit 0x279d9fb4 UIApplicationMain + 144
51 Where Next 0x000e8816 main (main.m:16)
52 libdyld.dylib 0x233a0872 start + 2
崩溃3:
Thread 0 Crashed:
0 libsystem_malloc.dylib 0x2349c43a tiny_free_list_remove_ptr + 126
1 libsystem_malloc.dylib 0x2349b4d0 szone_free_definite_size + 932
2 libcache.dylib 0x2330d6f4 cache_set_name + 20
3 CoreFoundation 0x2372eb94 -[NSCache setName:] + 136
4 CoreUI 0x277e2f0e -[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:devic eIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:] + 370
5 CoreUI 0x277e2d98 -[CUICatalog _resolvedRenditionKeyForName:scaleFactor:deviceIdiom:deviceSubt ype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:withBaseKeySelector:] + 284
6 CoreUI 0x277e252a -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:] + 94
7 UIKit 0x28183a2c __98-[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 496
8 UIKit 0x2818377e -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 230
9 UIKit 0x28183f50 -[_UIAssetManager imageNamed:withTrait:] + 408
10 UIKit 0x27c4e94c +[UIImage imageNamed:inBundle:compatibleWithTraitCollection:] + 172
11 UIKit 0x27aae536 +[UIImage imageNamed:] + 110
12 Where Next 0x000e555e -[PreferenceObject resetLocations] (PreferenceObject.m:184)
13 Where Next 0x000e4b6e __33+[PreferenceObject sharedManager]_block_invoke (PreferenceObject.m:92)
14 libdispatch.dylib 0x23377dc2 _dispatch_client_callout + 22
15 libdispatch.dylib 0x233789b2 dispatch_once_f + 62
16 Where Next 0x000e4980 +[PreferenceObject sharedManager] (once.h:75)
17 Where Next 0x00102440 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:57)
18 Where Next 0x002ced6a VMDidFinishLaunchingWithOptions (UIApplication+VMRuntime.m:138)
19 UIKit 0x279e664e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 394
20 UIKit 0x27c0f032 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3086
21 UIKit 0x27c12f0e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1570
22 UIKit 0x27c26c14 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3228 + 36
23 UIKit 0x27c103f6 -[UIApplication workspaceDidEndTransaction:] + 134
24 FrontBoardServices 0x24aebc74 -[FBSSerialQueue _performNext] + 232
25 FrontBoardServices 0x24aebf60 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
26 CoreFoundation 0x2379d256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
27 CoreFoundation 0x2379ce46 __CFRunLoopDoSources0 + 454
28 CoreFoundation 0x2379b1ae __CFRunLoopRun + 806
29 CoreFoundation 0x236edbb8 CFRunLoopRunSpecific + 516
30 CoreFoundation 0x236ed9ac CFRunLoopRunInMode + 108
31 UIKit 0x279dfa16 -[UIApplication _run] + 526
32 UIKit 0x279d9fb4 UIApplicationMain + 144
33 Where Next 0x00103816 main (main.m:16)
34 libdyld.dylib 0x233a0872 start + 2
最后两个崩溃看起来他们可能在寻找的图像资产被失败。 ..但是,因为我不能在调试模式或任何形式的从Xcode“运行”复制我卡住了。
感谢帮助社区!
发布崩溃(在通过App Store或TestFlight发送的版本上发生的崩溃)可能很难确定。我有一个在NSArray
的containsObject:
功能上崩溃,无法自己再现,或者我想。
我做了以下重现错误。
- 又到产品 - >计划 - >编辑计划...
- 点击“信息”选项卡上的我的标准的调试方案
- 从“调试”改变了构建配置以“释放”
- 重建,跑项目
在某些情况下,这是不够的重现释放崩溃。我做了下一步重现它。
- 未选中“调试可执行”的方案,该方案早信息选项卡中
- 清理我的项目,并建立文件夹(分别司令部移-K和命令的Alt-Shift键K)
- 重建,运行该项目
下面是我的配置,如果我需要做同样的事情,它会是什么样子。
一旦你能够重现崩溃(希望你可以用原木重现),尝试你平时的调试方法,看看它崩溃。播放声音的东西执行时,注释掉线等
我很遗憾无法知道你的确切崩溃,尽管上述这种方法帮我复制90%的用户是有一个问题,我不干脆,因为我之前正在构建调试。
我的应用出现同样的问题。它只能通过TestFlight或AppStore在iOS9上崩溃。
查看接受的答案https://forums.developer.apple.com/thread/60919。它适用于我,我修复了这个错误。
如何解决“错误ITMS-90682:无效包 - 如果应用程序支持iOS 8或更低版本,'Payload/XXXXX/Assets.car'的资产目录不能包含16位或P3资产。
和Xcode 8 GM如果您在一个应用程序提交16-bit或P3资产中定位iOS之前版本的iOS版,然后9.3,会出现此错误。如果您的应用需要广泛的颜色功能,您必须将您的部署目标更改为iOS 9.3或更高版本。如果您的应用不需要广泛的颜色功能,并且希望将其部署到较早的iOS版本,则应该用8位sRGB资产替换所有16位或P3资产。您可以通过在iTunes Connect的错误消息中指定的资产目录上运行“assetutil”来查找16位或P3资产。以下步骤概述过程:
创建检查的.ipa文件。在Xcode Organizer(Xcode-> Window-> Organizer)中,选择要检查的档案,点击“Export ...”,然后选择“Export for Enterprise or Ad-Hoc Deployment”,这将创建一个本地副本。为您的应用程序IPA文件。 找到.ipa文件,并更改其扩展为.zip。 展开.zip文件。这将产生一个有效载荷文件夹包含您的.app包。 打开一个终端,并改变工作目录您的.app包CD路径的顶层/到/负载/ your.app 使用查找工具来查找Assets.car文件在您的.app捆绑,如下图所示:找到-name“Assets.car” 使用assetutil工具在您的应用程序的每个Assets.car中查找任何16位或P3资产,如下所示:sudo xcrun --sdk iphoneos assetutil --info /path/to/a/Assets.car>/tmp/Assets .json 检查产生的/ tmp/Assets.json并查找包含“DisplayGamut”:“P3”及其关联的“名称”的任何内容。这将是包含一个或多个16位或P3资产的图像集的名称。 用8位/ sRGB资产替换这些资产,然后重新构建您的应用程序。 更新:如果您的部署目标设置为8.3或8.4,并且您拥有资产目录,则即使您实际上没有16位或P3资产,也会收到相同的错误消息。在这种情况下,您需要将您的部署目标降至8.2,或将其移至9.x.
哇!传说中的答案。这一直是几个星期绝对贝恩现在。我给你的解决方案试试,让你知道。谢谢! –
嗨埃德温,谢谢你的真棒答案!我已经尝试了你提到的所有这些方法。我也试图提高调试的优化级别,但无济于事。最糟糕的部分也是它在记录器有机会使用TestFlight提交崩溃之前崩溃。我将再次尝试改变配置以释放。牛逼 –
很抱歉我不能帮助更多:(。这是一个艰难的一个,但我敢肯定你会通过它! –