I am facing issue/crash in distribution build app. But not in Development build. Development is running fine. (Distribution app validate successfully)
What is problem while I create distribution build. I checked all configs debug and release.
Here crash log : from device when I use Distribution (Distribution by AdHoc and upload to
Hardware Model: iPhone4,1
Process: AppName [513]
Path: /private/var/mobile/Containers/Bundle/Application/F2922A29-2E11-4377-XXXX-327A3DFC4612/AppName.app/AppName
Identifier: com.user.AppName
Version: 1.2.5 (1.2.5)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-11-12 13:05:32.465 +0530
Launch Time: 2014-11-12 12:59:08.534 +0530
OS Version: iOS 8.1 (12B411)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xf0419f0b
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3083ef76 objc_msgSend + 22
1 AppName 0x000d7cc0 -[AsyncUdpSocket doReceive:] (AsyncUdpSocket.m:2181)
2 AppName 0x000d7fa0 -[AsyncUdpSocket doCFSocketCallback:forSocket:withAddress:withData:] (AsyncUdpSocket.m:2281)
3 AppName 0x000d3e7c MyCFSocketCallback (AsyncUdpSocket.m:2297)
4 CoreFoundation 0x22f9ce9c __CFSocketPerformV0 + 552
5 CoreFoundation 0x22f9a5e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
6 CoreFoundation 0x22f999f6 __CFRunLoopDoSources0 + 218
7 CoreFoundation 0x22f98074 __CFRunLoopRun + 764
8 CoreFoundation 0x22ee597c CFRunLoopRunSpecific + 472
9 CoreFoundation 0x22ee578e CFRunLoopRunInMode + 102
10 GraphicsServices 0x2a2be04c GSEventRunModal + 132
11 UIKit 0x264d797c UIApplicationMain + 1436
12 AppName 0x000d80ca main (main.m:16)
13 AppName 0x0009149c start + 36
)
I missed any configurations ?
Please help me for this issue.
Thanks.
Recently I had this issue with AsyncUDPSocket and I believe it's because AsyncUDPSocket is not thread safe, and in debug mode you may be running only a single thread while in distribution, various optimizations will cause it to crash.
I've converted over to GDCAsyncUdpSocket and my distribution builds do not crash. Good luck!
Related
I have a strange crash.
Process: MyApp [91555]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/3EDD7C49-65E2-4046-8BEE-0AC829A2A276/data/Containers/Bundle/Application/7667EA2E-A89B-44E8-8C14-828700B482E1/MyApp.app/MyApp
Identifier: MyApp
Version: 6.7 (6.7.0.3709)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [11615]
Responsible: MyApp [91555]
User ID: 501
Date/Time: 2017-03-04 18:29:43.848 +0800
OS Version: Mac OS X 10.12.3 (16D32)
Report Version: 12
Anonymous UUID: 74452B06-5487-4AB3-CA87-6DE166EFD550
Time Awake Since Boot: 790000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000001013a9018
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2
kernel messages:
VM Regions Near 0x1013a9018:
--> __TEXT 00000001013a9000-0000000113ce1000 [297.2M] r-x/rwx SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/3EDD7C49-65E2-4046-8BEE-0AC829A2A276/data/Containers/Bundle/Application/7667EA2E-A89B-44E8-8C14-828700B482E1/MyApp.app/MyApp
__DATA 0000000113ce1000-0000000115cef000 [ 32.1M] rw-/rwx SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/3EDD7C49-65E2-4046-8BEE-0AC829A2A276/data/Containers/Bundle/Application/7667EA2E-A89B-44E8-8C14-828700B482E1/MyApp.app/MyApp
Application Specific Information:
CoreSimulator 338.16 - Device: iPhone 7 - Runtime: iOS 10.2 (14C89) - DeviceType: iPhone 7
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dyld_sim 0x000000011cea69dc ImageLoaderMachO::usesTwoLevelNameSpace() const + 8
1 dyld_sim 0x000000011ceac85b ImageLoaderMachOCompressed::doBindFastLazySymbol(unsigned int, ImageLoader::LinkContext const&, void (*)(), void (*)()) + 43
2 dyld_sim 0x000000011ce9abb9 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 90
3 libdyld.dylib 0x000000012b2b7516 dyld_stub_binder + 282
4 ??? 0x0000000113ce1008 0 + 4627238920
5 MyApp 0x000000010ecca652 __54-[SpriteDataManager loadAnimFrames:savePath:callback:]_block_invoke_2 + 210
6 libclang_rt.asan_iossim_dynamic.dylib 0x000000012827b334 __wrap_dispatch_async_block_invoke + 260
7 libdispatch.dylib 0x000000012b24f808 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x000000012b27112e _dispatch_client_callout + 8
9 libdispatch.dylib 0x000000012b2584fb _dispatch_main_queue_callback_4CF + 1054
10 com.apple.CoreFoundation 0x0000000121e88e49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11 com.apple.CoreFoundation 0x0000000121e4e37d __CFRunLoopRun + 2205
12 com.apple.CoreFoundation 0x0000000121e4d884 CFRunLoopRunSpecific + 420
13 com.apple.GraphicsServices 0x000000012a484a6f GSEventRunModal + 161
14 com.apple.UIKit 0x000000012408ec68 UIApplicationMain + 159
15 MyApp 0x0000000104c4f326 main + 1238
16 libdyld.dylib 0x000000012b2ba68d start + 1
Since apps on simulator don't need code signing at all, why the Exception Type says EXC_BAD_ACCESS (Code Signature Invalid)? Could anyone explain what this kind of crash is and how it happens.
Try going into "Edit Scheme" and unchecking all of the tests from "Build" clean your app And run it again.
Go to TARGETS> Tests make sure you signin or if its ad hoc signed in the Test Target then set up a profile for the Test target or click Automatically Signing
xcode swift project runs with couple cocoapods frameworks like MQTTClient, uses keychain and keychain returns null,works well on xcode but crashes on distribution adhoc, I have done everything re installing cocoapods, adding the .a files of cocoa to build phases, adding library search path, i'm not figuring out why keychain keeps returning nil and why it keeps crashing on Distribution adhoc, here is the crash report
Class MQTTManager start function accesses the cocopods MQTTClient.a
And accesses the keychain
Incident Identifier: 4B4B005E-7BC2-487D-9A8A-FEEAB4967CF4
CrashReporter Key: TODO
Hardware Model: iPhone7,2
Process: testProj [494]
Path: /private/var/mobile/Containers/Bundle/Application /3A3B094D-FACB-49B9-BE84-5EA6F8F40D2A/testProj.app/testProj
Identifier: com.test.testProj
Version: 205
Code Type: ARM-64
Parent Process: launchd [1]
Date/Time: 2015-03-13 14:28:20 +0000
OS Version: iPhone OS 8.2 (12D508)
Report Version: 104
Exception Type: SIGTRAP
Exception Codes: #0 at 0x1002559e4
Crashed Thread: 0
Thread 0 Crashed:
0 testProj 0x00000001002559e4 _TFC9testProj11MQTTManager5startfS0_FT_T_ + 2000
1 testProj 0x000000010014a134 _TFFC9testProj16SignInController9checkUserFS0_FT_T_U_FTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqPSs9AnyObject__GSqCSo7NSError__T_ + 3848
2 testProj 0x0000000100244b68 _TFFFC9testProj7Request8responseFDS0_FT5queueGSqCSo8NSObject_10serializerFTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqCSo6NSData__TGSqPSs9AnyObject__GSqCSo7NSError__17completionHandlerFTS2_GSqS3__GSqPS5___GSqS6___T__DS0_U_FT_T_U_FT_T_ + 640
3 libdispatch.dylib 0x0000000198631994 <redacted> + 24
4 libdispatch.dylib 0x0000000198631954 <redacted> + 16
5 libdispatch.dylib 0x000000019863620c _dispatch_main_queue_callback_4CF + 1608
6 CoreFoundation 0x0000000186fc22ec <redacted> + 12
7 CoreFoundation 0x0000000186fc0394 <redacted> + 1492
8 CoreFoundation 0x0000000186eed1f4 CFRunLoopRunSpecific + 396
9 GraphicsServices 0x000000019030f6fc GSEventRunModal + 168
10 UIKit 0x000000018b87e10c UIApplicationMain + 1488
11 testProj 0x00000001001c0c60 main + 116
12 libdyld.dylib 0x000000019865ea08 <redacted> + 4
Found a solution here
http://dasdev.de/2014/12/04/assessing-the-keychain-in-swift/
I found that its not connected to cocoapods libraries of any searchpaths
I had to change the swift compiler optimization flags to [NONE], took me 2 days to found an answer, and thats it, it works fine
I have an app that I am distributing using AdHoc - that works fine (using testflightapp.com) on most devices, however I have two older ones which run iOS 5.1.1 and iOS 4.3 respectively and on those I just can't get the app installed.
The app has been built using XCode 5.1.1 and deployment target of iOS 4.3.
The installation goes about 75% through (i.e. icon shows on home screen, progress indicator starts running up to about 75%), then an error message is shown: "Unable to Download Application" - ... could not be downloaded at this time.
Checking the logs I found crash of /usr/libexec/installd - see below.
Btw the same happens when I try to install the app via iTunes, so it's not related to Testflight.
Any hints on why this happens and how I can fix it would be highly appreciated.
Patrick
Incident Identifier: 55B1E8CF-AF1B-4E2E-9445-9001A1E9181F
CrashReporter Key: 2c384f06f249d55ddbb948525a8bef5b10aef496
Hardware Model: iPad1,1
Process: installd [301]
Path: /usr/libexec/installd
Identifier: installd
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-08-15 19:45:40.965 +1000
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
Crashed Thread: 2
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x35b5c004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35b5c1fa mach_msg + 50
2 CoreFoundation 0x35aca3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x35ac90ea __CFRunLoopRun + 818
4 CoreFoundation 0x35a4c49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x35a4c366 CFRunLoopRunInMode + 98
6 installd 0x00070bb8 0x64000 + 52152
7 installd 0x00065856 0x64000 + 6230
8 installd 0x0006528c 0x64000 + 4748
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x35b5c3a8 kevent + 24
1 libdispatch.dylib 0x33e8fea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x33e8fbc2 _dispatch_mgr_thread + 30
Thread 2 name: Dispatch queue: com.apple.root.default-priority
Thread 2 Crashed:
0 libsystem_c.dylib 0x34d0c884 strlen + 12
1 libstdc++.6.dylib 0x37151e2c std::string::operator+=(char const*) + 8
2 libmis.dylib 0x32d7c43e ___lldb_unnamed_function268$$libmis.dylib + 226
3 libmis.dylib 0x32d728bc ___lldb_unnamed_function40$$libmis.dylib + 112
4 libmis.dylib 0x32d784ee ___lldb_unnamed_function174$$libmis.dylib + 298
5 libmis.dylib 0x32d747aa ___lldb_unnamed_function81$$libmis.dylib + 166
6 libmis.dylib 0x32d71b2a ___lldb_unnamed_function22$$libmis.dylib + 14
7 libmis.dylib 0x32d71fa2 MISValidateSignatureAndCopyInfo + 266
8 installd 0x00067b56 0x64000 + 15190
It is not possible to install one build that includes arm64 architecture on devices running iOS 5.x other than using the App Store.
So to install development or ad-hoc builds on a device with iOS 5.x or 4.x you need to make an extra build that does not include 64 bit architecture.
When submitting to the App Store, the build can contain all architectures, and Apple will modify the binary on their end so the problem won't occur in that case.
I have consistently getting the following error message when trying to launch UIAutomation test with the instruments command line tool:
2013-10-30 12:08:47.868 ScriptAgent[4687:2e07] CLTilesManagerClient:
initialize, sSharedTilesManagerClient
2013-10-30 12:08:47.869 ScriptAgent[4687:2e07] CLTilesManagerClient:
init 2013-10-30 12:08:47.869 ScriptAgent[4687:2e07]
CLTilesManagerClient: reconnecting, 0xa5b0aa0 2013-10-30 12:09:17.989
ScriptAgent[4687:2e07] +[UIAXElement initializeAccessibility]:
UIAutomation never received kAXAccessibilityLoaded. Waited 30.02
seconds. 2013-10-30 12:09:17.990 ScriptAgent[4687:2e07] AXError: Could
not auto-register for pid status change 2013-10-30 12:09:18.008
ScriptAgent[4687:2e07] Failed to enable accessiblity,
kAXErrorServerNotFound 2013-10-30 12:09:18.381
instruments[4633:240f] Automation Instrument ran into an exception
while trying to run the script. UIAScriptAgentSignaledException
2013-10-30 11:09:18 +0000 Fail: An error occurred while trying to run
the script.
Anyone else have this issue?
Thanks for your help.
Try sudo rm /tmp/instruments_sock -- this is the socket file created by instruments.js to communicate with instruments. That file is probably not deleateable for some reason.
That command will delete the file. Alternatively try to change the permission settings for the file.
I also encounter this issue on Xcode 5.0.1, instruments doesn't work even start from UI
but instruments works fine with Xcode 5.0
After some investigation, I found that when instruments is starting, the scriptAgent in iPhoneSimulator SDK crashes.
Process: ScriptAgent [4297]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/usr/bin/ScriptAgent
Identifier: ScriptAgent
Version: 270
Code Type: X86 (Native)
Parent Process: instruments [4208]
Responsible: eclipse [1017]
User ID: 110125050
Date/Time: 2013-11-11 10:52:49.044 +0800
OS Version: Mac OS X 10.9 (13A603)
Report Version: 11
Anonymous UUID: A496DC68-476F-589B-352C-303FA1CD2355
Sleep/Wake UUID: F65E37D7-0AFF-4867-9538-8736C8F0B908
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
iPhone Simulator (external launch) , iPhone OS 7.0.3 (unknown/11B508)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x02e94952 __pthread_kill + 10
1 libsystem_pthread.dylib 0x02e58167 pthread_kill + 101
2 libsystem_sim_c.dylib 0x02b6ae12 abort + 127
3 ScreenReaderCore 0x03db5853 SCRCUncaughtExceptionHandler + 111
4 CoreFoundation 0x005f7a1d __handleUncaughtException + 749
5 libobjc.A.dylib 0x0224ab5c _objc_terminate() + 100
6 libc++abi.dylib 0x02a5bf60 std::__terminate(void (*)()) + 14
7 libc++abi.dylib 0x02a5b97d __cxa_throw + 116
8 libobjc.A.dylib 0x0224a9cd objc_exception_throw + 323
9 CoreFoundation 0x005673bb +[NSException raise:format:] + 139
10 UIAutomation 0x00cbdf54 +[UIAXElement initializeAccessibility] + 668
11 UIAutomation 0x00cc1361 +[UIAXElement uiaxSystemWideElement] + 37
12 UIAutomation 0x00cd76d3 -[UIATarget init] + 317
13 UIAutomation 0x00cd758a +[UIATarget localTarget] + 65
14 ScriptAgent 0x0000ae25 0x1000 + 40485
15 ScriptAgent 0x00005e85 0x1000 + 20101
16 ScriptAgent 0x00008887 0x1000 + 30855
17 libdyld.dylib 0x02d5e70d start + 1
So I replaced iPhoneSimulator7.0.sdk with the one in Xcode 5.0, then this issue is solved.
But I am not sure whether this replacement has any side effect.
I have a submitted iOS app and I have the build archive with me. So, I took the crashes from iTunesConnect but when I tried to symbolicate them (dragged the .crash files to Xcode Organizer they didn't get symbolicated. I also pressed the Symbolicate button.
I am using Xcode 5.0, and I am pretty sure that the crashes that I am symbolicating came from the correct version of the build archive that I have.
Any ideas of why it doesn't work?
Thanks!
EDIT
Incident Identifier: E2A64AF6-C8A3-465D-81C3-09674CD18771
Hardware Model: iPhone4,1
Process: MyApp [9551]
Path: /var/mobile/Applications/0B0523C1-0EF9-41D8-AE91-D0C43B8DC00E/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-09-17 16:42:10.390 -0500
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xc2269d62
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3975f5b0 objc_msgSend + 16
1 MyApp 0x00215812 0x100000 + 1136658
2 MyApp 0x00216ca0 0x100000 + 1141920
3 MyApp 0x001494e2 0x100000 + 300258
4 UIKit 0x33898fb0 -[UIApplication _deactivateForReason:notify:] + 396
5 UIKit 0x338cef26 -[UIApplication _handleApplicationSuspend:eventInfo:] + 310
6 UIKit 0x338451e2 -[UIApplication handleEvent:withNewEvent:] + 2454
7 UIKit 0x338446c8 -[UIApplication sendEvent:] + 68
8 UIKit 0x33844116 _UIApplicationHandleEvent + 6150
9 GraphicsServices 0x3555c5a0 _PurpleEventCallback + 588
10 GraphicsServices 0x3555c1ce PurpleEventCallback + 30
11 CoreFoundation 0x31a11170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
12 CoreFoundation 0x31a11112 __CFRunLoopDoSource1 + 134
13 CoreFoundation 0x31a0ff94 __CFRunLoopRun + 1380
14 CoreFoundation 0x31982eb8 CFRunLoopRunSpecific + 352
15 CoreFoundation 0x31982d44 CFRunLoopRunInMode + 100
16 GraphicsServices 0x3555b2e6 GSEventRunModal + 70
17 UIKit 0x338982fc UIApplicationMain + 1116
18 MyApp 0x00148b9a 0x100000 + 297882
19 MyApp 0x001028f4 0x100000 + 10484
Here's one of the crashes.
I had the same problem and for me it was due to the name I had given the Xcode application.
I was still working on production code in 4.6 when the GM version of 5 came out. Prior releases had DPn appended but the GM was called "Xcode" so I renamed it to "Xcode 5". That space was my problem.
Looking in the console log and expanding [symbolicatecrash] stderr: I found the following line after it started looking for my app's symbols:
sh: /Applications/Xcode: No such file or directory
Renaming the application to "Xcode5" and hitting re-symbolicate immediately symbolicated the crash log.
That may not be your exact problem but it's certainly worth expanding that stderr: section in the console log and looking for any errors related to fetching the symbol file for your app.
In my case checking the consol log for [symbolicatecrash] stderr showed nothing specific. I restarted Xcode and checked the consol for error entries generated by Xcode. There were several entries mentioning problems with the keychain. One of my certificates was missing.
I requested new certificates from Xcode by going to:
Preferences>Accounts>View Details
Xcode detected there was a missing certificate and provided the option to submit a request. After going through that process, Xcode was able to re-symbolicate from the Organizer Window as expected.
Make sure that your Xcode application name doesn't contain any spaces. This was the reason it didn't work for me. So /Applications/Xcode.app works, while /Applications/Xcode 6.1.1.app doesn't work.