2016-12-05 59 views
0

我有一個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「運行」複製我卡住了。

感謝幫助社區!

回答

0

發佈崩潰(在通過App Store或TestFlight發送的版本上發生的崩潰)可能很難確定。我有一個在NSArraycontainsObject:功能上崩潰,無法自己再現,或者我想。

我做了以下重現錯誤。

  1. 又到產品 - >計劃 - >編輯計劃...
  2. 點擊「信息」選項卡上的我的標準的調試方案
  3. 從「調試」改變了構建配置以「釋放」
  4. 重建,跑項目

在某些情況下,這是不夠的重現釋放崩潰。我做了下一步重現它。

  1. 未選中「調試可執行」的方案,該方案早信息選項卡中
  2. 清理我的項目,並建立文件夾(分別司令部移-K和命令的Alt-Shift鍵K)
  3. 重建,運行該項目

下面是我的配置,如果我需要做同樣的事情,它會是什麼樣子。

enter image description here

一旦你能夠重現崩潰(希望你可以用原木重現),嘗試你平時的調試方法,看看它崩潰。播放聲音的東西執行時,註釋掉線等

我很遺憾無法知道你的確切崩潰,儘管上述這種方法幫我複製90%的用戶是有一個問題,我不乾脆,因爲我之前正在構建調試。

+0

嗨埃德溫,謝謝你的真棒答案!我已經嘗試了你提到的所有這些方法。我也試圖提高調試的優化級別,但無濟於事。最糟糕的部分也是它在記錄器有機會使用TestFlight提交崩潰之前崩潰。我將再次嘗試改變配置以釋放。牛逼 –

+0

很抱歉我不能幫助更多:(。這是一個艱難的一個,但我敢肯定你會通過它! –

2

我的應用出現同樣的問題。它只能通過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.

+0

哇!傳說中的答案。這一直是幾個星期絕對貝恩現在。我給你的解決方案試試,讓你知道。謝謝! –