Xcode crash on both Distribute App and Validate App

When an application is created with dynamic frameworks included in Archive-2.zip package, Xcode successfully builds, runs and archives application. But if I try to validate that application by clicking "Validate App" button in Organizer window, Xcode crashes. If I click "Distribute App", select "IOS App Store" and click "Next" then it crashes again.


I tried many things (deleted all cache folders, created new projects, reinstalled Xcode) to overcome this but unfortunately I wasn't successful.


Do you have any recommendations to prevent Xcode crashing?


These are the steps to reproduce the problem:


1. Create a tabbed application in Xcode

2. Import frameworks found in Archive-2.zip (available in https://www.dropbox.com/s/zqfqhz69dgljprk/Archive-2.zip link).

3. Embed these frameworks to your application.

4. Set deployment target as 12.1

5. Archive application

6. Try to validate app by clicking "Validate App" button.

7. Try to distribute app by clicking "Distribute App" button, select "IOS App Store" and click "Next".


My Xcode version is 10.1 (14460.46), below you can see the top of my crash report.


Process: Xcode [69258]

Path: /Applications/Xcode.app/Contents/MacOS/Xcode

Identifier: com.apple.dt.Xcode

Version: 10.1 (14460.46)

Build Info: IDEFrameworks_Fall2018-14460046000000000~5

App Item ID: 497799835

App External ID: 828917606

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: Xcode [69258]

User ID: 501



Date/Time: 2018-12-20 21:13:18.813 +0300

OS Version: Mac OS X 10.14.2 (18C54)

Report Version: 12

Anonymous UUID: A896343D-FA82-CFBA-1295-0E1BB9ED9AE8


Time Awake Since Boot: 6900 seconds


System Integrity Protection: enabled


Crashed Thread: 0 Dispatch queue: com.apple.main-thread


Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY


Application Specific Information:

com.apple.main-thread

ProductBuildVersion: 10B61

UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]

UserInfo: (null)

Hints:


Backtrace:

0 __exceptionPreprocess (in CoreFoundation)

1 DVTFailureHintExceptionPreprocessor (in DVTFoundation)

2 objc_exception_throw (in libobjc.A.dylib)

3 -[CFPrefsConfigurationFileSource initWithConfigurationPropertyList:containingPreferences:] (in CoreFoundation)

4 -[__NSPlaceholderArray initWithObjects:count:] (in CoreFoundation)

5 +[NSArray arrayWithObjects:count:] (in CoreFoundation)

6 -[IDEDistributionAssistantWindowController presentUnrecoverableError:] (in IDEKit)

7 -[IDEDistributionStepViewController presentErrorAndCancel:] (in IDEKit)

8 __66-[IDEDistributionAnalyzeArchiveStepViewController _analyzeArchive]_block_invoke.62 (in IDEKit)

9 ___DVTAsyncPerformBlockOnMainRunLoop_block_invoke (in DVTFoundation)

10 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)

11 __CFRunLoopDoBlocks (in CoreFoundation)

12 __CFRunLoopRun (in CoreFoundation)

13 CFRunLoopRunSpecific (in CoreFoundation)

14 RunCurrentEventLoopInMode (in HIToolbox)

15 ReceiveNextEventCommon (in HIToolbox)

16 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)

17 _DPSNextEvent (in AppKit)

18 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)

19 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)

20 -[NSApplication run] (in AppKit)

21 NSApplicationMain (in AppKit)

22 main (in Xcode)

23 start (in libdyld.dylib)

abort() called

  • 在app store后台中,同意一下最新的协议,再次上传就可以了

Add a Comment

Replies

Hey man did you find a solution for this?

Previous XCode versions correctly reported the problem without crashing, see:

https://stackoverflow.com/questions/41786330/uploading-app-to-app-store-mach-o-header-code-0x72613c21


You can check the xcdistributionlogs/IDEDistribution.standard.log


2019-03-07 16:34:58 +0000 [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7f91fdb33e40:'/Users/bruno/Library/Developer/Xcode/Archives/2019-03-07/TEST 07-03-2019, 17.34.xcarchive/Products/Applications/TEST.app/Frameworks/libavdevice.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/bruno/Library/Developer/Xcode/Archives/2019-03-07/TEST 07-03-2019, 17.34.xcarchive/Products/Applications/TEST.app/Frameworks/libavdevice.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/bruno/Library/Developer/Xcode/Archives/2019-03-07/TEST 07-03-2019, 17.34.xcarchive/Products/Applications/TEST.app/Frameworks/libavdevice.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}


2019-03-07 16:34:58 +0000 Failed to generate distribution items with error: (null)

I encountered the same problem lately on XCode 11.2.1. Suddenly without much updates on my code or XCode, the organizer started crashing when I try to Distribute or Validate without any message (not even triggering crash report). Been trying to figure out for days. Then I realized It crashes everytime I click next on "Automatically Manage Signing". So I tried "Manually manage signing", that's the only time I saw it doesn't recognize my wildcard (*) provisioning profile which worked a few days ago and no certificate or profile expired recently. Anyway, I created a new provisioning profile specifically for this app and then it worked! ******!!!! This is so un-APPLE-like... or is it nowadays?