Strange iOS app crashes on simulator - ios

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

Related

iOS App Crash on Startup with EXC_CORPSE_NOTIFY exception

Xamarin based iOS Application crashed with following crash log in Release version. This issue observed in multiple (iPad Air, iPhoneX, iPhone 6s) devices. Not able to replicate this issue in debug or beta mode.
App Crashed before starting app log file. Not able to understand Crash Log. Would you help me to to identify the Crash Log and cause.
AppVariant: 1:10
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Date/Time: 2018-12-09 02:35:13.9818 -0500
Launch Time: 2018-12-09 02:35:10.8014 -0500
OS Version: iPhone OS 12.1 (16B92)
Baseband Version: 5.21.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001bd76b104 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001bd7e6070 pthread_kill$VARIANT$mp + 380 (pthread.c:1492)
2 libsystem_c.dylib 0x00000001bd6c2d78 abort + 140 (abort.c:94)
3 MyApp 0x0000000103ec9ca8 0x1025dc000 + 26139816 xamarin_printf (in MyApp) (runtime.m:2335)
4 MyApp 0x0000000103dcc464 0x1025dc000 + 25101412 mono_invoke_unhandled_exception_hook (in MyApp) (exception.c:1119)
5 MyApp 0x0000000103d83628 0x1025dc000 + 24802856 mono_handle_exception_internal (in MyApp) (mini-exceptions.c:2002)
6 MyApp 0x0000000103d823c0 0x1025dc000 + 24798144 mono_handle_exception (in MyApp) (mini-exceptions.c:2288)
7 MyApp 0x0000000103d7a084 0x1025dc000 + 24764548 mono_arm_throw_exception (in MyApp) (exceptions-arm64.c:411)
8 MyApp 0x0000000102d4e0c8 0x1025dc000 + 7807176 rethrow_exception (in MyApp) + 168
9 MyApp 0x00000001028de350 0x1025dc000 + 3154768 MyApp_Application_Main_string__ (in MyApp) (/:1)
10 MyApp 0x0000000102d1b798 0x1025dc000 + 7600024 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr (in MyApp) + 248
11 MyApp 0x0000000103d93968 0x1025dc000 + 24869224 mono_jit_runtime_invoke (in MyApp) (mini-runtime.c:2777)
12 MyApp 0x0000000103e10950 0x1025dc000 + 25381200 do_runtime_invoke (in MyApp) (object.c:2849)
13 MyApp 0x0000000103e13d54 0x1025dc000 + 25394516 do_exec_main_checked (in MyApp) (object.c:4726)
14 MyApp 0x0000000103d7678c 0x1025dc000 + 24749964 mono_jit_exec (in MyApp) (driver.g.c:1040)
15 MyApp 0x0000000103ed09e8 0x1025dc000 + 26167784 xamarin_main (in MyApp) (monotouch-main.m:0)
16 MyApp 0x000000010284dbac 0x1025dc000 + 2562988 main (in MyApp) (main.m:207)
17 libdyld.dylib
Device Logs was useful in this analysis. Device log had application crash information. Application was crashed due to null pointer in one of application thread.

App With CocoaPods Distribution AdHoc Crash (uses keychain and keychain returns null)

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

iOS - Development build working but Distribution build crash

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!

AdHoc Installation fails on older iPad running iOS 5.1.1 - /usr/libexec/installd crashes

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.

Xcode 5.0.2 crashes on load

I'm using Xcode 5.0.2 on os x mavericks 10.9.1 and i'm facing a strange problem as Xcode keeps loading for about 30 secs and then crashes when i opened it and do any mouse event i tried to unable the Source control as suggested in this post answer but with no mean, the problem report is as follows:
Process: Xcode [684]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.0.2 (3335.32)
Build Info: IDEApplication-3335032000000000~4
Code Type: X86-64 (Native)
Parent Process: launchd [142]
Responsible: Xcode [684]
User ID: 502
Date/Time: 2014-01-19 16:18:32.647 +0200
OS Version: Mac OS X 10.9.1 (13B42)
Report Version: 11
Anonymous UUID: 04B4E5B4-74DF-8C99-FE04-776F426F8551
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Application Specific Information:
ProductBuildVersion: 5A3005
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8d33f0e6 objc_release + 22
1 libobjc.A.dylib 0x00007fff8d33e65a (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 502
2 com.apple.CoreFoundation 0x00007fff8a716d72 _CFAutoreleasePoolPop + 50
3 com.apple.Foundation 0x00007fff8da0c6ab -[__NSOperationInternal _start:] + 913
4 com.apple.Foundation 0x00007fff8da0c23b __NSOQSchedule_f + 64
5 libdispatch.dylib 0x00007fff94c772ad _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff94c7ef03 _dispatch_main_queue_callback_4CF + 333
7 com.apple.CoreFoundation 0x00007fff8a793839 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
8 com.apple.CoreFoundation 0x00007fff8a74eb14 __CFRunLoopRun + 1636
9 com.apple.CoreFoundation 0x00007fff8a74e275 CFRunLoopRunSpecific + 309
10 com.apple.HIToolbox 0x00007fff9518cf0d RunCurrentEventLoopInMode + 226
11 com.apple.HIToolbox 0x00007fff9518ccb7 ReceiveNextEventCommon + 479
12 com.apple.HIToolbox 0x00007fff9518cabc _BlockUntilNextEventMatchingListInModeWithFilter + 65
13 com.apple.AppKit 0x00007fff8eda828e _DPSNextEvent + 1434
14 com.apple.AppKit 0x00007fff8eda78db -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
15 com.apple.AppKit 0x00007fff8ed9b9cc -[NSApplication run] + 553
16 com.apple.AppKit 0x00007fff8ed86803 NSApplicationMain + 940
17 libdyld.dylib 0x00007fff9345a5fd start + 1
I'm working on a Mac mini mid 2010 with processor 2.4 Ghz Intel Core 2 Duo, Memory 8 GB 1067 MHz DDR3, Does anyone know how to fix this and why this is happening? thanks in advance.
You might have an autosave problem where Xcode had trouble autosaving the project that keeps crashing. Go to the following location on your Mac:
/Users/YourUsername/Library/Autosave Information
Delete anything in there related to Xcode, such as files named Unsaved Xcode Document.xcworkspace. Restart Xcode and see if that fixes it.
https://discussions.apple.com/message/23991398#23991398

Resources