iOS App Crash on Startup with EXC_CORPSE_NOTIFY exception - ios

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.

Related

Xamarin iOS app crashing on startup only in release mode. xamarin_initialize EXC_BAD_ACCESS

Crash log from testflight. can't reproduce in debug mode. Haven't changed anything near startup recently that I can think of. did update visual studio recently, which is always risky. Any ideas on where to look? I'm currently at a loss.
Incident Identifier: A16565BD-14CB-422F-8201-1F83E62D0636
Beta Identifier: 9AC85708-52C8-4855-9C08-F86429C52CA2
Hardware Model: iPhone11,6
Process: app [47469]
Path: /private/var/containers/Bundle/Application/DEBBDCD7-7D27-4B7D-AB2E-22D5C399BA37/app/app
Identifier:
Version: 2 (2.6.3)
AppStoreTools: 11C29
AppVariant: 1:iPhone11,6:13
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition:
Date/Time: 2019-12-13 12:32:17.7284 -0600
Launch Time: 2019-12-13 12:32:17.1647 -0600
OS Version: iPhone OS 13.2.3 (17B111)
Release Type: User
Baseband Version: 2.02.12
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4295278592
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 000000010004c000-0000000100164000 [ 1120K] r-x/r-x SM=COW ...toGrindersiOS
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001a094eefc __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001a086ed10 pthread_kill + 196 (pthread.c:1456)
2 libsystem_c.dylib 0x00000001a07feaf4 __abort + 116 (abort.c:147)
3 libsystem_c.dylib 0x00000001a07fea80 abort + 116 (abort.c:118)
4 appname 0x0000000101a38ca0 xamarin_initialize.cold.1 + 0
5 appname 0x0000000101a2ef54 xamarin_printf + 27144020 (runtime.m:2541)
6 appname 0x00000001018f8ad8 mono_invoke_unhandled_exception_hook + 132
7 appname 0x000000010188d68c mono_handle_exception_internal + 5580
8 appname 0x000000010188c0b4 mono_handle_exception + 56
9 appname 0x0000000101881c2c mono_arm_throw_exception + 376
10 appname 0x000000010043433c throw_exception + 172
11 appname 0x00000001019686a8 mono_raise_exception + 64
12 appname 0x0000000101a2ed6c xamarin_process_managed_exception + 27143532 (runtime.m:2497)
13 appname 0x0000000101a2f458 xamarin_initialize + 27145304 (runtime.m:979)
14 appname 0x0000000101a360e4 xamarin_main + 27173092 (monotouch-main.m:432)
15 appname 0x0000000100165878 main + 1153144 (main.m:142)
16 libdyld.dylib 0x00000001a0958e18 start + 4
For future me or anyone that runs into something similar, I solved this with some framework updates/downgrades. I haven't narrowed it down to the exact issue because i did several at once based on what the project was asking for and past experience.
The main change I made that I think is the most likely culprit was a downgrade of Xamarin.Build.Download to 0.4.11. Sorry I can't be more helpful.

Strange iOS app crashes on simulator

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

iOS: Fabric causing crash on ad-hoc distribution, validateFABKitConformance exception immediately after opening

The app works fine when run from XCode and only the ad-hoc dist crashes. There doesn't seem to be anyway to to debug this issue since it doesn't present locally.
Incident Identifier: 9C35632A-360A-410E-A752-C9BA34CA997A
CrashReporter Key: d3968346e579b09218f41593d7591290ebd7c231
Hardware Model: iPod7,1
Process: myApp [243]
Path: /private/var/mobile/Containers/Bundle/Application/FD154011-4A81-4C50-9F8C-E84404FAE72E/myApp.app/myApp
Identifier: com.stuff.myApp
Version: 0.5934.1629 (0.5934.1629)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-03-31 19:30:52.843 -0400
Launch Time: 2016-03-31 19:30:52.191 -0400
OS Version: iOS 8.4 (12H143)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1844e82d8 __exceptionPreprocess + 132
1 libobjc.A.dylib 0x1959340e4 objc_exception_throw + 60
2 CoreFoundation 0x1844e8218 +[NSException raise:format:] + 128
3 myApp 0x1000fc2dc +[Fabric validateFABKitConformance:] + 512
4 myApp 0x1000fbda0 __15+[Fabric with:]_block_invoke + 168
5 libdispatch.dylib 0x195fb1954 _dispatch_client_callout + 16
6 libdispatch.dylib 0x195fb282c dispatch_once_f + 96
7 myApp 0x1000fbcf4 +[Fabric with:] + 180
8 myApp 0x100047774 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:38)

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.1 iOS 7.0.3 Error with instruments command line tool

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.

Resources