I'm pretty new to Monotouch, and running into an error that is baffling me. I made a binding to an objective-c library for a sliding-style view ( https://github.com/edgecase/ECSlidingViewController ), and have been getting SIGSEVs while executing native code during the use of that library (specifically, it happens when I try to reveal the bottom view from the sliding controller).
Stacktrace:
at (wrapper managed-to-native) System.Runtime.InteropServices.GCHandle.CheckCurrentDomain (int) <IL 0x00021, 0xffffffff>
at System.Runtime.InteropServices.GCHandle.op_Explicit (intptr) [0x0001b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:124
at System.Runtime.InteropServices.GCHandle.FromIntPtr (intptr) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:169
at MonoTouch.ObjCRuntime.BlockDescriptor.CopyHelper (MonoTouch.ObjCRuntime.BlockLiteral*,MonoTouch.ObjCRuntime.BlockLiteral*) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/ObjCRuntime/Blocks.cs:54
at (wrapper native-to-managed) MonoTouch.ObjCRuntime.BlockDescriptor.CopyHelper (MonoTouch.ObjCRuntime.BlockLiteral*,MonoTouch.ObjCRuntime.BlockLiteral*) <IL 0x0001e, 0xffffffff>
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSendSuper_int_IntPtr_IntPtr (intptr,intptr,int,intptr,intptr) <IL 0x00028, 0xffffffff>
at Enriquez.ECSlidingViewController.ECSlidingViewController.AnchorTopView (Enriquez.ECSlidingViewController.ECSide,Enriquez.ECSlidingViewController.ECAnimations,Enriquez.ECSlidingViewController.ECOnComplete) <IL 0x00097, 0x002ef>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___int_object_object (object,intptr,intptr,intptr) <IL 0x00066, 0xffffffff>
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSendSuper_int (intptr,intptr,int) <IL 0x00025, 0xffffffff>
at Enriquez.ECSlidingViewController.ECSlidingViewController.AnchorTopView (Enriquez.ECSlidingViewController.ECSide) <IL 0x0002d, 0x0009f>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___int (object,intptr,intptr,intptr) <IL 0x00054, 0xffffffff>
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at FanApp.Application.Main (string[]) [0x00000] in /Users/markrubeo/Projects/FanApp/MonoTouch/Test Stuff/FanApp/Fan App/FanApp/Main.cs:17
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Native stacktrace:
0 FanApp 0x00098adc mono_handle_native_sigsegv + 284
1 FanApp 0x0000c3b8 mono_sigsegv_signal_handler + 248
2 libsystem_c.dylib 0x99be28cb _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 FanApp 0x00112aba GCHandle_CheckCurrentDomain + 26
5 ??? 0x0d86e766 0x0 + 226944870
6 ??? 0x0d86e668 0x0 + 226944616
7 ??? 0x0d86e590 0x0 + 226944400
8 ??? 0x0d86e4f8 0x0 + 226944248
9 ??? 0x0d86db7c 0x0 + 226941820
10 libsystem_sim_blocks.dylib 0x0243acb6 _Block_call_copy_helper + 29
11 libsystem_sim_blocks.dylib 0x0243b73f _Block_copy_internal + 228
12 FanApp 0x00004a91 -[ECSlidingViewController anchorTopViewTo:animations:onComplete:] + 545
13 ??? 0x0d86e458 0x0 + 226944088
14 ??? 0x0d86d2f0 0x0 + 226939632
15 ??? 0x0d86d505 0x0 + 226940165
16 FanApp 0x00010782 mono_jit_runtime_invoke + 722
17 FanApp 0x00173c5e mono_runtime_invoke + 126
18 FanApp 0x002169a6 monotouch_trampoline + 3686
19 FanApp 0x00004864 -[ECSlidingViewController anchorTopViewTo:] + 84
20 ??? 0x08618c4c 0x0 + 140610636
21 ??? 0x06bfbd28 0x0 + 113229096
22 ??? 0x08618bb0 0x0 + 140610480
23 FanApp 0x00010782 mono_jit_runtime_invoke + 722
24 FanApp 0x00173c5e mono_runtime_invoke + 126
25 FanApp 0x002169a6 monotouch_trampoline + 3686
26 FanApp 0x00004700 -[ECSlidingViewController updateTopViewHorizontalCenterWithRecognizer:] + 1680
27 UIKit 0x00bede29 _UIGestureRecognizerSendActions + 143
28 UIKit 0x00bed133 -[UIGestureRecognizer _updateGestureWithEvent:] + 379
29 UIKit 0x00bee3bf -[UIGestureRecognizer _delayedUpdateGesture] + 46
30 UIKit 0x00bf0a21 ___UIGestureRecognizerUpdate_block_invoke_0541 + 57
31 UIKit 0x00bf097c _UIGestureRecognizerApplyBlocksToArray + 277
32 UIKit 0x00be93d7 _UIGestureRecognizerUpdate + 1026
33 UIKit 0x0094e1a2 -[UIWindow _sendGesturesForEvent:] + 1121
34 UIKit 0x0094e532 -[UIWindow sendEvent:] + 93
35 UIKit 0x00934dc4 -[UIApplication sendEvent:] + 464
36 UIKit 0x00928634 _UIApplicationHandleEvent + 8196
37 GraphicsServices 0x025f5ef5 PurpleEventCallback + 1274
38 CoreFoundation 0x01c0f195 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
39 CoreFoundation 0x01b73ff2 __CFRunLoopDoSource1 + 146
40 CoreFoundation 0x01b728da __CFRunLoopRun + 2218
41 CoreFoundation 0x01b71d84 CFRunLoopRunSpecific + 212
42 CoreFoundation 0x01b71c9b CFRunLoopRunInMode + 123
43 GraphicsServices 0x025f47d8 GSEventRunModal + 190
44 GraphicsServices 0x025f488a GSEventRun + 103
45 UIKit 0x00926626 UIApplicationMain + 1163
46 ??? 0x0861397d 0x0 + 140589437
47 ??? 0x085974f8 0x0 + 140080376
48 ??? 0x08597100 0x0 + 140079360
49 ??? 0x08597256 0x0 + 140079702
50 FanApp 0x00010782 mono_jit_runtime_invoke + 722
51 FanApp 0x00173c5e mono_runtime_invoke + 126
52 FanApp 0x00177e54 mono_runtime_exec_main + 420
53 FanApp 0x0017d245 mono_runtime_run_main + 725
54 FanApp 0x0006de15 mono_jit_exec + 149
55 FanApp 0x0020bc04 main + 1988
56 FanApp 0x00009685 start + 53
57 ??? 0x00000004 0x0 + 4
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
The weird part about this is that it only happens when I run the app in the iOS simulator. On devices, everything appears to work fine.
Anyone have any clue what's going on?
ETA: Crash Report:
Process: FanApp [50509]
Path: /Users/USER/Library/Application Support/iPhone Simulator/*/
Identifier: FanApp
Version: ???
Code Type: X86 (Native)
Parent Process: launchd [151]
User ID: 501
Date/Time: 2013-05-22 17:16:55.967 -0400
OS Version: Mac OS X 10.8.3 (12D78)
Report Version: 10
Crashed Thread: 0
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000008
VM Regions Near 0x8:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Users/USER/Library/Application Support/iPhone Simulator/*/FanApp.app/FanApp
__TEXT 0000000000001000-00000000002cd000 [ 2864K] r-x/rwx SM=COW /Users/USER/Library/Application Support/iPhone Simulator/*/FanApp.app/FanApp
Application Specific Information:
iPhone Simulator 369.2, iPhone OS 5.1 (iPhone/9B176)
abort() called
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x94925a6a __pthread_kill + 10
1 libsystem_c.dylib 0x99bf7b2f pthread_kill + 101
2 libsystem_c.dylib 0x99c2e4ec abort + 168
3 FanApp 0x00098d1a mono_handle_native_sigsegv + 858
4 FanApp 0x0000c3b8 mono_sigsegv_signal_handler + 248
5 libsystem_c.dylib 0x99be28cb _sigtramp + 43
6 ??? 0xffffffff 0 + 4294967295
7 FanApp 0x0000c2c0 mono_sigill_signal_handler + 64
8 FanApp 0x00112aba GCHandle_CheckCurrentDomain + 26
9 ??? 0x0d86e766 0 + 226944870
10 ??? 0x0d86e668 0 + 226944616
11 ??? 0x0d86e590 0 + 226944400
12 ??? 0x0d86e4f8 0 + 226944248
13 ??? 0x0d86db7c 0 + 226941820
14 libsystem_sim_blocks.dylib 0x0243acb6 _Block_call_copy_helper + 29
15 libsystem_sim_blocks.dylib 0x0243b73f _Block_copy_internal + 228
16 FanApp 0x00004a91 -[ECSlidingViewController anchorTopViewTo:animations:onComplete:] + 545
17 ??? 0x0d86e458 0 + 226944088
18 ??? 0x0d86d2f0 0 + 226939632
19 ??? 0x0d86d505 0 + 226940165
20 FanApp 0x00010782 mono_jit_runtime_invoke + 722
21 FanApp 0x00173c5e mono_runtime_invoke + 126
22 FanApp 0x002169a6 monotouch_trampoline + 3686
23 FanApp 0x00004864 -[ECSlidingViewController anchorTopViewTo:] + 84
24 ??? 0x08618c4c 0 + 140610636
25 ??? 0x06bfbd28 0 + 113229096
26 ??? 0x08618bb0 0 + 140610480
27 FanApp 0x00010782 mono_jit_runtime_invoke + 722
28 FanApp 0x00173c5e mono_runtime_invoke + 126
29 FanApp 0x002169a6 monotouch_trampoline + 3686
30 FanApp 0x00004700 -[ECSlidingViewController updateTopViewHorizontalCenterWithRecognizer:] + 1680
31 UIKit 0x00bede29 _UIGestureRecognizerSendActions + 143
32 UIKit 0x00bed133 -[UIGestureRecognizer _updateGestureWithEvent:] + 379
33 UIKit 0x00bee3bf -[UIGestureRecognizer _delayedUpdateGesture] + 46
34 UIKit 0x00bf0a21 ___UIGestureRecognizerUpdate_block_invoke_0541 + 57
35 UIKit 0x00bf097c _UIGestureRecognizerApplyBlocksToArray + 277
36 UIKit 0x00be93d7 _UIGestureRecognizerUpdate + 1026
37 UIKit 0x0094e1a2 -[UIWindow _sendGesturesForEvent:] + 1121
38 UIKit 0x0094e532 -[UIWindow sendEvent:] + 93
39 UIKit 0x00934dc4 -[UIApplication sendEvent:] + 464
40 UIKit 0x00928634 _UIApplicationHandleEvent + 8196
41 GraphicsServices 0x025f5ef5 PurpleEventCallback + 1274
42 CoreFoundation 0x01c0f195 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
43 CoreFoundation 0x01b73ff2 __CFRunLoopDoSource1 + 146
44 CoreFoundation 0x01b728da __CFRunLoopRun + 2218
45 CoreFoundation 0x01b71d84 CFRunLoopRunSpecific + 212
46 CoreFoundation 0x01b71c9b CFRunLoopRunInMode + 123
47 GraphicsServices 0x025f47d8 GSEventRunModal + 190
48 GraphicsServices 0x025f488a GSEventRun + 103
49 UIKit 0x00926626 UIApplicationMain + 1163
50 ??? 0x0861397d 0 + 140589437
51 ??? 0x085974f8 0 + 140080376
52 ??? 0x08597100 0 + 140079360
53 ??? 0x08597256 0 + 140079702
54 FanApp 0x00010782 mono_jit_runtime_invoke + 722
55 FanApp 0x00173c5e mono_runtime_invoke + 126
56 FanApp 0x00177e54 mono_runtime_exec_main + 420
57 FanApp 0x0017d245 mono_runtime_run_main + 725
58 FanApp 0x0006de15 mono_jit_exec + 149
59 FanApp 0x0020bc04 main + 1988
60 FanApp 0x00009685 start + 53
Thread 1:
0 libsystem_kernel.dylib 0x949269ae kevent + 10
1 libdispatch.dylib 0x02474372 _dispatch_mgr_invoke + 918
2 libdispatch.dylib 0x02472be1 _dispatch_mgr_thread + 53
Thread 2:
0 libsystem_kernel.dylib 0x94925b3e __recvfrom + 10
1 libsystem_c.dylib 0x99c80bbf recv$UNIX2003 + 54
2 FanApp 0x0020d021 recv_uninterrupted + 81
3 FanApp 0x0020e88b monotouch_process_connection + 107
4 FanApp 0x0020ddef monotouch_connect_wifi + 3279
5 FanApp 0x0020cd07 monotouch_configure_debugging + 2311
6 FanApp 0x0020bce5 -[CocoaThreadInitializer entryPoint:] + 133
7 Foundation 0x005da4d6 -[NSThread main] + 76
8 Foundation 0x005da447 __NSThread__main__ + 1258
9 libsystem_c.dylib 0x99bf65b7 _pthread_start + 344
10 libsystem_c.dylib 0x99be0d4e thread_start + 34
Thread 3:
0 libsystem_kernel.dylib 0x949237d2 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x94922cb0 mach_msg + 68
2 FanApp 0x000de03a mach_exception_thread + 90
3 FanApp 0x0020816d GC_start_routine + 93
4 libsystem_c.dylib 0x99bf65b7 _pthread_start + 344
5 libsystem_c.dylib 0x99be0d4e thread_start + 34
Thread 4:
0 libsystem_kernel.dylib 0x9492380e semaphore_wait_trap + 10
1 FanApp 0x001e91ea mono_sem_wait + 26
2 FanApp 0x00112d2a finalizer_thread + 74
3 FanApp 0x001aeca6 start_wrapper + 422
4 FanApp 0x001e0c6a thread_start_routine + 154
5 FanApp 0x0020816d GC_start_routine + 93
6 libsystem_c.dylib 0x99bf65b7 _pthread_start + 344
7 libsystem_c.dylib 0x99be0d4e thread_start + 34
Thread 5:
0 libsystem_kernel.dylib 0x94925b3e __recvfrom + 10
1 libsystem_c.dylib 0x99c80bbf recv$UNIX2003 + 54
2 FanApp 0x0020d021 recv_uninterrupted + 81
3 FanApp 0x0020d104 sdb_recv + 52
4 FanApp 0x000af49a debugger_thread + 186
5 FanApp 0x001e0c6a thread_start_routine + 154
6 FanApp 0x0020816d GC_start_routine + 93
7 libsystem_c.dylib 0x99bf65b7 _pthread_start + 344
8 libsystem_c.dylib 0x99be0d4e thread_start + 34
Thread 6:
0 libsystem_kernel.dylib 0x94925c72 __semwait_signal + 10
1 libsystem_c.dylib 0x99c80a55 nanosleep$UNIX2003 + 189
2 libsystem_c.dylib 0x99c8091e usleep$UNIX2003 + 60
3 FanApp 0x00211342 monotouch_pump_gc + 50
4 libsystem_c.dylib 0x99bf65b7 _pthread_start + 344
5 libsystem_c.dylib 0x99be0d4e thread_start + 34
Thread 7:: WebThread
0 libsystem_kernel.dylib 0x949237d2 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x94922cb0 mach_msg + 68
2 CoreFoundation 0x01c0f10a __CFRunLoopServiceMachPort + 186
3 CoreFoundation 0x01b725d5 __CFRunLoopRun + 1445
4 CoreFoundation 0x01b71d84 CFRunLoopRunSpecific + 212
5 CoreFoundation 0x01b71c9b CFRunLoopRunInMode + 123
6 WebCore 0x03933420 RunWebThread(void*) + 560
7 libsystem_c.dylib 0x99bf65b7 _pthread_start + 344
8 libsystem_c.dylib 0x99be0d4e thread_start + 34
Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0x07ad42e8 ecx: 0xbfffbc2c edx: 0x94925a6a
edi: 0xacd18a28 esi: 0x00000006 ebp: 0xbfffbc48 esp: 0xbfffbc2c
ss: 0x00000023 efl: 0x00000206 eip: 0x94925a6a cs: 0x0000000b
ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f
cr2: 0x010cd88c
Logical CPU: 0
Binary Images:
// Omitted to get under character limit
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 20396
thread_create: 0
thread_set_state: 66
VM Region Summary:
ReadOnly portion of Libraries: Total=131.8M resident=44.7M(34%) swapped_out_or_unallocated=87.1M(66%)
Writable regions: Total=60.1M written=3060K(5%) resident=9756K(16%) swapped_out=0K(0%) unallocated=50.6M(84%)
REGION TYPE VIRTUAL
=========== =======
CG image 16K
CoreAnimation 328K
MALLOC 41.7M
MALLOC guard page 32K
Memory tag=35 9900K
Stack 68.8M
VM_ALLOCATE 2456K
__DATA 8484K
__LINKEDIT 50.5M
__OBJC 4K
__PAGEZERO 4K
__TEXT 81.3M
__UNICODE 544K
mapped file 237.1M
shared memory 12K
=========== =======
TOTAL 500.7M
It looks like a problem with marshaling an Objective-C block to a managed delegate in ECSlidingViewController.AnchorTopView.
We do not currently support marshaling Objective-C blocks (that didn't originate from a managed delegate in the first place), you'll end up with a crash just like this one.
If you do not need to override ECSlidingViewController.AnchorTopView, you can just type the block as an IntPtr in the binding, so it would be something like this (note that I'm just guessing about how you did your binding):
interface ECSlidingViewController {
void AnchorTopView (ECSide first, ECAnimations second, IntPtr block);
}
If you're interested here is someone with a similar problem (and this forum thread contains a bit more explanation).
"Got a SIGSEGV while executing native code" may be indicate that some Actions assigned to UI elements in InterfaceBuilder are not found when app is executing. Verify all IBActions connected with your UIElements (UIButtons, GesturesRecognizers, etc.). Clear it and reassign to correct IBAction in .h files. Pay attention specially in duplicate Views.
Related
Would really appreciate if someone could point me in right direction. My app was rejected by apple app review board stating that the application crashed at launch. Unfortunately I am unable to reproduce the crash. The relevant sections of the symbolicated crash log are listed below. Would really appreciate some guidance on resolving this
Hardware Model: xxx
Process: Havana [11291]
Path: /private/var/containers/Bundle/Application/7168627A-AC55-4E81-9FE0-05228C71B31E/Havana.app/Havana
Identifier: au.com.nextx.havana
Version: 6 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: au.com.nextx.havana [3636]
Date/Time: 2018-09-10 18:04:16.6495 -0700
Launch Time: 2018-09-10 18:04:15.6077 -0700
OS Version: iPhone OS 11.4.1 (15G77)
Baseband Version: 6.80.00
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000101310d3c
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x0000000101310d3c 0x101160000 + 1772860
1 libswiftCore.dylib 0x0000000101310d3c 0x101160000 + 1772860
2 libswiftCore.dylib 0x00000001011a8094 0x101160000 + 295060
3 Havana 0x0000000100dea374 #objc AppDelegate.applicationWillResignActive(_:) + 172916 (AppDelegate.swift:0)
4 UIKit 0x000000018f06ddbc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 408
5 UIKit 0x000000018f06d1c4 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3484
6 UIKit 0x000000018f03a5e0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1680
7 UIKit 0x000000018f66ab1c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 784
8 UIKit 0x000000018f039dd0 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160
9 UIKit 0x000000018f039c6c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240
10 UIKit 0x000000018f038afc -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 724
11 UIKit 0x000000018fcce84c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 296
12 UIKit 0x000000018f0381ec -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432
13 UIKit 0x000000018fab3ac8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220
14 UIKit 0x000000018fc01bf8 _performActionsWithDelayForTransitionContext + 112
15 UIKit 0x000000018f037c0c -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248
16 UIKit 0x000000018f0375a8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368
17 UIKit 0x000000018f0345e0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
18 UIKit 0x000000018f034330 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364
19 FrontBoardServices 0x0000000187c60470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 364
20 FrontBoardServices 0x0000000187c68d6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 224
21 libdispatch.dylib 0x0000000184d50a60 _dispatch_client_callout + 16
22 libdispatch.dylib 0x0000000184d58170 _dispatch_block_invoke_direct$VARIANT$mp + 224
23 FrontBoardServices 0x0000000187c94878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
24 FrontBoardServices 0x0000000187c9451c -[FBSSerialQueue _performNext] + 404
25 FrontBoardServices 0x0000000187c94ab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
26 CoreFoundation 0x0000000185407404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
27 CoreFoundation 0x0000000185406c2c __CFRunLoopDoSources0 + 276
28 CoreFoundation 0x000000018540479c __CFRunLoopRun + 1204
29 CoreFoundation 0x0000000185324da8 CFRunLoopRunSpecific + 552
30 GraphicsServices 0x000000018730a020 GSEventRunModal + 100
31 UIKit 0x000000018f344758 UIApplicationMain + 236
32 Havana 0x0000000100dc7e88 main + 32392 (ThresholdPanGesture.swift:13)
33 libdyld.dylib 0x0000000184db5fc0 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x0000000184ee5d78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000185083eb4 _pthread_wqthread + 928
2 libsystem_pthread.dylib 0x0000000185083b08 start_wqthread + 4
Thread 2:
0 libsystem_pthread.dylib 0x0000000185083b04 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x0000000185083b04 start_wqthread + 0
Thread 4 name: com.apple.uikit.eventfetch-thread
Thread 4:
0 libsystem_kernel.dylib 0x0000000184ec3de8 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000184ec3c60 mach_msg + 72
2 CoreFoundation 0x0000000185406e40 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000185404908 __CFRunLoopRun + 1568
4 CoreFoundation 0x0000000185324da8 CFRunLoopRunSpecific + 552
5 Foundation 0x0000000185d99674 -[NSRunLoop+ 34420 (NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x0000000185d994dc -[NSRunLoop+ 34012 (NSRunLoop) runUntilDate:] + 84
7 UIKit 0x000000018f029768 -[UIEventFetcher threadMain] + 136
8 Foundation 0x0000000185ea9efc __NSThread__start__ + 1040
9 libsystem_pthread.dylib 0x0000000185085220 _pthread_body + 272
10 libsystem_pthread.dylib 0x0000000185085110 _pthread_body + 0
11 libsystem_pthread.dylib 0x0000000185083b10 thread_start + 4
Thread 5:
0 libsystem_pthread.dylib 0x0000000185083b04 start_wqthread + 0
I am trying to debug a crash whenever an iOS document provider extension is started. As it is a extension I am not able to debug it correctly, and this error log is the best i was able to get out of the device. How can i see what is throwing the exception (or what the assertion is) when none of the methods that get called are mine.
Incident Identifier: 0B4EA724-9AFB-4EE3-B752-7E1FDF3B9A75
CrashReporter Key: ac4cdaa3c5ddd65a3bffef5cc28903f683f0309d
Hardware Model: iPad3,1
Process: FileProvider [1100]
Path: /private/var/containers/Bundle/Application/CEDD148D-420D-4BE8-ABF8-8E83F6385ABC/Privat.app/PlugIns/FileProvider.appex/FileProvider
Identifier: com.privat.cloud.FileProvider
Version: 1 (2.5.6)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2017-02-09 15:19:03.03 +0100
Launch Time: 2017-02-09 15:19:02.02 +0100
OS Version: iOS 9.3.5 (13G36)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x22673916 __exceptionPreprocess + 122
1 libobjc.A.dylib 0x21e0ee12 objc_exception_throw + 34
2 CoreFoundation 0x226737ec +[NSException raise:format:arguments:] + 100
3 Foundation 0x22e57524 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 88
4 UIKit 0x26fc83e0 -[UIDocumentPickerExtensionViewController _prepareWithExtensionInfo:completionHandler:] + 504
5 CoreFoundation 0x226784c0 __invoking___ + 64
6 CoreFoundation 0x2259e878 -[NSInvocation invoke] + 288
7 CoreFoundation 0x225a22f2 -[NSInvocation invokeWithTarget:] + 46
8 UIKit 0x27489390 -[_UIViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 252
9 CoreFoundation 0x22676d7e ___forwarding___ + 346
10 CoreFoundation 0x225a2234 _CF_forwarding_prep_0 + 20
11 CoreFoundation 0x226784c0 __invoking___ + 64
12 CoreFoundation 0x2259e878 -[NSInvocation invoke] + 288
13 CoreFoundation 0x225a22f2 -[NSInvocation invokeWithTarget:] + 46
14 UIKit 0x27408b32 -[_UIQueueingProxy forwardInvocation:] + 370
15 CoreFoundation 0x22676d7e ___forwarding___ + 346
16 CoreFoundation 0x225a2234 _CF_forwarding_prep_0 + 20
17 CoreFoundation 0x226784c0 __invoking___ + 64
18 CoreFoundation 0x2259e878 -[NSInvocation invoke] + 288
19 CoreFoundation 0x225a22f2 -[NSInvocation invokeWithTarget:] + 46
20 CoreFoundation 0x22676d7e ___forwarding___ + 346
21 CoreFoundation 0x225a2234 _CF_forwarding_prep_0 + 20
22 CoreFoundation 0x226784c0 __invoking___ + 64
23 CoreFoundation 0x2259e878 -[NSInvocation invoke] + 288
24 CoreFoundation 0x225a22f2 -[NSInvocation invokeWithTarget:] + 46
25 CoreFoundation 0x22676d7e ___forwarding___ + 346
26 CoreFoundation 0x225a2234 _CF_forwarding_prep_0 + 20
27 CoreFoundation 0x226784c0 __invoking___ + 64
28 CoreFoundation 0x2259e878 -[NSInvocation invoke] + 288
29 FrontBoardServices 0x23d16c02 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 14
30 FrontBoardServices 0x23d16ab4 -[FBSSerialQueue _performNext] + 220
31 FrontBoardServices 0x23d16db4 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
32 CoreFoundation 0x22635dfa __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
33 CoreFoundation 0x226359e8 __CFRunLoopDoSources0 + 448
34 CoreFoundation 0x22633d56 __CFRunLoopRun + 790
35 CoreFoundation 0x22583224 CFRunLoopRunSpecific + 516
36 CoreFoundation 0x22583010 CFRunLoopRunInMode + 104
37 GraphicsServices 0x23b73ac4 GSEventRunModal + 156
38 UIKit 0x26c57184 UIApplicationMain + 140
39 libxpc.dylib 0x223cd07c _xpc_objc_main + 700
40 libxpc.dylib 0x223ce730 xpc_main + 164
41 Foundation 0x22f74790 -[NSXPCListener resume] + 160
42 PlugInKit 0x28afe128 -[PKService run] + 504
43 PlugInKit 0x28afddf6 +[PKService main] + 54
44 PlugInKit 0x28afe15c +[PKService _defaultRun:arguments:] + 16
45 libextension.dylib 0x22db37c8 NSExtensionMain + 44
46 libdyld.dylib 0x2222b86e tlv_get_addr + 42
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x222fec5c __pthread_kill + 8
1 libsystem_pthread.dylib 0x223a8732 pthread_kill + 62
2 libsystem_c.dylib 0x222930ac abort + 108
3 libc++abi.dylib 0x21deaae4 __cxa_bad_cast + 0
4 libc++abi.dylib 0x21e0369e default_terminate_handler() + 266
5 libobjc.A.dylib 0x21e0f0b0 _objc_terminate() + 192
6 libc++abi.dylib 0x21e00e16 std::__terminate(void (*)()) + 78
7 libc++abi.dylib 0x21e008f8 __cxa_increment_exception_refcount + 0
8 libobjc.A.dylib 0x21e0ef5e objc_exception_rethrow + 42
9 CoreFoundation 0x225832ae CFRunLoopRunSpecific + 654
10 CoreFoundation 0x22583014 CFRunLoopRunInMode + 108
11 GraphicsServices 0x23b73ac8 GSEventRunModal + 160
12 UIKit 0x26c57188 UIApplicationMain + 144
13 libxpc.dylib 0x223cd080 _xpc_objc_main + 704
14 libxpc.dylib 0x223ce734 xpc_main + 168
15 Foundation 0x22f74794 service_connection_handler + 0
16 PlugInKit 0x28afe12c -[PKService run] + 508
17 PlugInKit 0x28afddfa +[PKService main] + 58
18 PlugInKit 0x28afe160 +[PKService _defaultRun:arguments:] + 20
19 libextension.dylib 0x22db37cc NSExtensionMain + 48
20 libdyld.dylib 0x2222b872 start + 2
Thread 1:
0 libsystem_kernel.dylib 0x222ff864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x223a5b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x223a5718 start_wqthread + 8
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x223002f8 kevent_qos + 24
1 libdispatch.dylib 0x221f5d60 _dispatch_mgr_invoke + 256
2 libdispatch.dylib 0x221f5abe _dispatch_mgr_thread$VARIANT$mp + 38
Thread 3:
0 libsystem_kernel.dylib 0x222ff864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x223a5b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x223a5718 start_wqthread + 8
Thread 4:
0 libsystem_kernel.dylib 0x222ff864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x223a5b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x223a5718 start_wqthread + 8
Thread 5:
0 libsystem_kernel.dylib 0x222ff864 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x223a5b34 _pthread_wqthread + 1036
2 libsystem_pthread.dylib 0x223a5718 start_wqthread + 8
Thread 6 name: com.apple.coremedia.player.async
Thread 6:
0 libsystem_kernel.dylib 0x222ea920 semaphore_wait_trap + 8
1 libdispatch.dylib 0x221f294a _dispatch_semaphore_wait_slow + 190
2 MediaToolbox 0x279571ec fpa_AsyncMovieControlThread + 1916
3 CoreMedia 0x2462b9b8 figThreadMain + 208
4 libsystem_pthread.dylib 0x223a785a _pthread_body + 138
5 libsystem_pthread.dylib 0x223a77ce _pthread_start + 110
6 libsystem_pthread.dylib 0x223a5724 thread_start + 8
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00000000
r4: 0x00000006 r5: 0x395c3000 r6: 0x38803304 r7: 0x0037e378
r8: 0x14582d00 r9: 0x21e048fd r10: 0x3428ff05 r11: 0x14582d24
ip: 0x00000148 sp: 0x0037e36c lr: 0x223a8733 pc: 0x222fec5c
cpsr: 0x00000010
If i setup a global exception breakpoint i get this, and it is not helpful:
libobjc.A.dylib`objc_exception_throw:
-> 0x23c5edf0 <+0>: push {r4, r5, r6, r7, lr}
0x23c5edf2 <+2>: add r7, sp, #0xc
0x23c5edf4 <+4>: .long 0x0d00e92d ; unknown opcode
0x23c5edf8 <+8>: .long 0x6dfaf5ad ; unknown opcode
0x23c5edfc <+12>: mov r5, r0
0x23c5edfe <+14>: movs r0, #0x10
0x23c5ee00 <+16>: bl 0x23c5027c ; __cxa_allocate_exception
The app that I have runs perfectly fine in debug mode but when tested in ad hoc in release mode a crash happens. The crash actually happens when the app first starts. I don't really know how to debug or proceed to find out what's the issue. Xcode doesn't throw any error.
The following is my crash log
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2eb6dfce __exceptionPreprocess + 126
1 libobjc.A.dylib 0x3970ecca objc_exception_throw + 34
2 CoreFoundation 0x2eaa49c0 -[__NSArrayM removeObjectAtIndex:] + 420
3 geezer 0x0008dfce 0x25000 + 430030
4 geezer 0x0008d2c0 0x25000 + 426688
5 UIKit 0x3138e4c6 -[UIViewController loadViewIfRequired] + 514
6 UIKit 0x3138e284 -[UIViewController view] + 20
7 geezer 0x000413fa 0x25000 + 115706
8 geezer 0x00041082 0x25000 + 114818
9 geezer 0x0005616e 0x25000 + 201070
10 UIKit 0x313f95a2 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 270
11 UIKit 0x313f8ef6 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1606
12 UIKit 0x313f3586 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 710
13 UIKit 0x3138f704 -[UIApplication handleEvent:withNewEvent:] + 3536
14 UIKit 0x3138e86c -[UIApplication sendEvent:] + 68
15 UIKit 0x313f2cc4 _UIApplicationHandleEvent + 612
16 GraphicsServices 0x339c8ae8 _PurpleEventCallback + 604
17 GraphicsServices 0x339c86d2 PurpleEventCallback + 30
18 CoreFoundation 0x2eb38ab2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
19 CoreFoundation 0x2eb38a4e __CFRunLoopDoSource1 + 342
20 CoreFoundation 0x2eb37222 __CFRunLoopRun + 1394
21 CoreFoundation 0x2eaa1f0a CFRunLoopRunSpecific + 518
22 CoreFoundation 0x2eaa1cee CFRunLoopRunInMode + 102
23 UIKit 0x313f1eec -[UIApplication _run] + 756
24 UIKit 0x313ed168 UIApplicationMain + 1132
25 geezer 0x0008b19a 0x25000 + 418202
26 libdyld.dylib 0x39c1bab2 tlv_initializer + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x39cd11f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x39d3b792 pthread_kill + 54
2 libsystem_c.dylib 0x39c81fd8 abort + 72
3 libc++abi.dylib 0x38fb0cd2 abort_message + 70
4 libc++abi.dylib 0x38fc96e0 default_terminate_handler() + 248
5 libobjc.A.dylib 0x3970ef62 _objc_terminate() + 190
6 libc++abi.dylib 0x38fc71c4 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x38fc6d28 __cxa_rethrow + 96
8 libobjc.A.dylib 0x3970ee12 objc_exception_rethrow + 38
9 CoreFoundation 0x2eaa1f80 CFRunLoopRunSpecific + 636
10 CoreFoundation 0x2eaa1cee CFRunLoopRunInMode + 102
11 UIKit 0x313f1eec -[UIApplication _run] + 756
12 UIKit 0x313ed168 UIApplicationMain + 1132
13 geezer 0x0008b19a 0x25000 + 418202
14 libdyld.dylib 0x39c1bab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x39cbe808 kevent64 + 24
1 libdispatch.dylib 0x39c00078 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x39bffdfe _dispatch_mgr_thread$VARIANT$mp + 34
Thread 2:
0 libsystem_kernel.dylib 0x39cd1c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39d38bda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39d38a94 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x39cd1c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39d38bda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39d38a94 start_wqthread + 4
Thread 4 name: AFNetworking
Thread 4:
0 libobjc.A.dylib 0x3971794c objc_opt::objc_selopt_t::get(char const*) const + 36
1 libobjc.A.dylib 0x39717828 __sel_registerName(char const*, int, int) + 40
2 CFNetwork 0x2e7fec56 ___ZN24ClassicConnectionSession14processDefaultEv_block_invoke + 34
3 libdispatch.dylib 0x39bf681c _dispatch_client_callout + 20
4 libdispatch.dylib 0x39bfe60a dispatch_once_f$VARIANT$mp + 42
5 CFNetwork 0x2e7fec2e ClassicConnectionSession::processDefault() + 38
6 CFNetwork 0x2e7a9e90 URLProtocol::getProtocolRegistry() + 4
7 CFNetwork 0x2e761d28 _CFURLProtocolRegisterFoundationBridge + 8
8 Foundation 0x2f4dfb94 +[_NSCFURLProtocolBridge registerWithCFURLProtocol] + 168
9 Foundation 0x2f4dfa9c NSURLProtocolInit + 316
10 libsystem_pthread.dylib 0x39d3b82c __pthread_once_handler + 48
11 libsystem_platform.dylib 0x39d334e0 _os_once + 40
12 libsystem_pthread.dylib 0x39d39ada pthread_once + 46
13 Foundation 0x2f4aca0c +[NSURLProtocol(NSURLProtocolPrivate) _registeredClasses] + 48
14 libdispatch.dylib 0x39bf681c _dispatch_client_callout + 20
15 libdispatch.dylib 0x39bfe60a dispatch_once_f$VARIANT$mp + 42
16 Foundation 0x2f4abccc -[NSURLConnection(Private) _initWithRequest:delegate:usesCache:maxContentLength:startImmediately:connectionProperties:] + 464
17 Foundation 0x2f4fdd0a -[NSURLConnection initWithRequest:delegate:startImmediately:] + 50
18 geezer 0x0003153a 0x25000 + 50490
19 Foundation 0x2f556c6e __NSThreadPerformPerform + 382
20 CoreFoundation 0x2eb39258 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
21 CoreFoundation 0x2eb38726 __CFRunLoopDoSources0 + 202
22 CoreFoundation 0x2eb36f1a __CFRunLoopRun + 618
23 CoreFoundation 0x2eaa1f0a CFRunLoopRunSpecific + 518
24 CoreFoundation 0x2eaa1cee CFRunLoopRunInMode + 102
25 Foundation 0x2f4941e6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
26 Foundation 0x2f4e509c -[NSRunLoop(NSRunLoop) run] + 76
27 geezer 0x0002fd12 0x25000 + 44306
28 Foundation 0x2f556a5a __NSThread__main__ + 1058
29 libsystem_pthread.dylib 0x39d3a916 _pthread_body + 138
30 libsystem_pthread.dylib 0x39d3a886 _pthread_start + 98
31 libsystem_pthread.dylib 0x39d38aa0 thread_start + 4
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 5:
0 libsystem_kernel.dylib 0x39cbea58 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39cbe854 mach_msg + 44
2 CoreFoundation 0x2eb38896 __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x2eb36fbc __CFRunLoopRun + 780
4 CoreFoundation 0x2eaa1f0a CFRunLoopRunSpecific + 518
5 CoreFoundation 0x2eaa1cee CFRunLoopRunInMode + 102
6 Foundation 0x2f4e1082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7 Foundation 0x2f556a5a __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x39d3a916 _pthread_body + 138
9 libsystem_pthread.dylib 0x39d3a886 _pthread_start + 98
10 libsystem_pthread.dylib 0x39d38aa0 thread_start + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x3bcb518c r6: 0x00000000 r7: 0x27dde584
r8: 0x17d745a0 r9: 0x00000001 r10: 0x000e6070 r11: 0x000e3994
ip: 0x00000148 sp: 0x27dde578 lr: 0x39d3b797 pc: 0x39cd11f0
cpsr: 0x00000010
Update: After reading tonnes of stuff on the internet about symbolicating, finally I managed to do it with Xcode 5. Some were pretty complicated with the need to use the terminal. Luckily all I needed to do was to go to Organizer in Xcode, grab the latest Archive in Finder. Show Package Contents from that file to get the dsym folder. Copy it out to a folder together with the ipa file and then just install the ipa through Organizer. The crash log will look much more meaningful.
After reading tonnes of stuff on the internet about symbolicating, finally I managed to do it with Xcode 5. Some were pretty complicated with the need to use the terminal. Luckily all I needed to do was to go to Organizer in Xcode, grab the latest Archive in Finder. Show Package Contents from that file to get the dsym folder. Copy it out to a folder together with the ipa file and then just install the ipa through Organizer. The crash log will look much more meaningful.
Actually this crash is not reproducing every time, even not frequently but we got this crash in our production app. I am not sure where is the problem. It is telling crash is happening in thread 4 in Environments class line number 38.
Code:
NSBundle* bundle = [NSBundle mainBundle];
NSString* envsPListPath = [bundle pathForResource:#"Environment" ofType:#"plist"];
Line 38:
NSDictionary *environments = [[NSDictionary alloc] initWithContentsOfFile:envsPListPath];
But according to exception type:00000020 , app is failed to launch in in-time.
I don't understand whats wrong with above code. Please help me out the relation b/w watchdog crash and above lines of code.
Crash Log:
Incident Identifier: FBDC0D68-9EC3-423C-A0DF-CD08EA079215
Hardware Model: iPod4,1
Process: Sparkle [16542]
Path: /var/mobile/Applications/55887817-5FD2-479A-B124-6ABF1907B339/Sparkle.app/Sparkle
Identifier: Sparkle
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-10-26 14:30:43.046 -0400
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread: 4
Application Specific Information:
com.xxxx.xxx failed to launch in time
Elapsed total CPU time (seconds): 15.060 (user 15.060, system 0.000), 50% CPU
Elapsed application CPU time (seconds): 1.756, 6% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x3a106eb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a107048 mach_msg + 36
2 UIKit 0x33ebb7e6 _UIPasteboardServerCreate + 158
3 UIKit 0x33ebb684 UIPasteboardServerCreate + 208
4 UIKit 0x33ebb54a -[UIPasteboard(Static) _initWithName:system:create:] + 90
5 UIKit 0x34055d9c +[UIPasteboard pasteboardWithName:create:] + 292
6 Sparkle 0x0049fe8a -[ADMS_Churn readFacebookReferrer] + 42
7 Sparkle 0x0049f5ac -[ADMS_Churn setInstallVariables] + 204
8 Sparkle 0x0049f2b0 -[ADMS_Churn setLaunchTypeVariables] + 68
9 Sparkle 0x0049ead4 -[ADMS_Churn trackSessionStart] + 40
10 Sparkle 0x0049ea56 -[ADMS_Churn resumeSession] + 46
11 Sparkle 0x004a7ae4 -[ADMS_NotificationHandler handleApplicationNotifications:] + 112
12 CoreFoundation 0x31eec034 _CFXNotificationPost + 1424
13 Foundation 0x32802594 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
14 UIKit 0x33e03896 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1754
15 UIKit 0x33dfb846 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
16 UIKit 0x33da3c34 -[UIApplication handleEvent:withNewEvent:] + 1000
17 UIKit 0x33da36c8 -[UIApplication sendEvent:] + 68
18 UIKit 0x33da3116 _UIApplicationHandleEvent + 6150
19 GraphicsServices 0x35a955a0 _PurpleEventCallback + 588
20 GraphicsServices 0x35a951ce PurpleEventCallback + 30
21 CoreFoundation 0x31f70170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
22 CoreFoundation 0x31f70112 __CFRunLoopDoSource1 + 134
23 CoreFoundation 0x31f6ef94 __CFRunLoopRun + 1380
24 CoreFoundation 0x31ee1eb8 CFRunLoopRunSpecific + 352
25 CoreFoundation 0x31ee1d44 CFRunLoopRunInMode + 100
26 UIKit 0x33dfa480 -[UIApplication _run] + 664
27 UIKit 0x33df72fc UIApplicationMain + 1116
28 Sparkle 0x003fafd2 main (main.m:18)
29 libdyld.dylib 0x3a050b1c start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3a107648 kevent64 + 24
1 libdispatch.dylib 0x3a0404ec _dispatch_mgr_invoke + 792
2 libdispatch.dylib 0x3a032df4 _dispatch_mgr_thread$VARIANT$up + 32
Thread 2:
0 libsystem_kernel.dylib 0x3a117d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3a065cf6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3a065a12 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3a0658a0 start_wqthread + 4
Thread 3 name: WebThread
Thread 3:
0 libsystem_kernel.dylib 0x3a106eb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a107048 mach_msg + 36
2 CoreFoundation 0x31f70040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x31f6ed9e __CFRunLoopRun + 878
4 CoreFoundation 0x31ee1eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x31ee1d44 CFRunLoopRunInMode + 100
6 WebCore 0x37ecf500 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x3a07030e _pthread_start + 306
8 libsystem_c.dylib 0x3a0701d4 thread_start + 4
Thread 4 name: Dispatch queue: momentumMapQueue
Thread 4:
0 libsystem_c.dylib 0x3a060332 szone_malloc_should_clear + 110
1 libsystem_c.dylib 0x3a060290 malloc_zone_malloc + 68
2 CoreFoundation 0x31eda712 _CFRuntimeCreateInstance + 210
3 CoreFoundation 0x31f7953a __CFStringCreateImmutableFunnel3 + 1882
4 CoreFoundation 0x31edd6c6 CFStringCreateWithBytes + 46
5 CoreFoundation 0x31effe76 _uniqueStringForUTF8Bytes + 90
6 CoreFoundation 0x31effd40 parseStringTag + 1304
7 CoreFoundation 0x31efe930 parseXMLElement + 2760
8 CoreFoundation 0x31efdc8e getContentObject + 450
9 CoreFoundation 0x31efe6aa parseXMLElement + 2114
10 CoreFoundation 0x31efdc8e getContentObject + 450
11 CoreFoundation 0x31efe6aa parseXMLElement + 2114
12 CoreFoundation 0x31efdc8e getContentObject + 450
13 CoreFoundation 0x31efe1c4 parseXMLElement + 860
14 CoreFoundation 0x31f0a044 _CFPropertyListCreateFromUTF8Data + 1592
15 CoreFoundation 0x31edcfb6 _CFPropertyListCreateWithData + 882
16 CoreFoundation 0x31edcbe0 CFPropertyListCreateFromXMLData + 116
17 Foundation 0x328114ea +[NSDictionary(NSDictionary) newWithContentsOf:immutable:] + 110
18 Sparkle 0x006c4f66 -[Environments initializeSharedInstance] (Environments.m:38)
19 Sparkle 0x006c4d54 +[Environments sharedInstance] (Environments.m:27)
20 Sparkle 0x006c4992 +[ConfigurationManager getLogLevel:] (ConfigurationManager.m:54)
21 Sparkle 0x006c4870 +[ConfigurationManager logLevelForFileName:] (ConfigurationManager.m:21)
22 Sparkle 0x006e824a -[NTRequestPolicy init] (NTRequestPolicy.m:38)
23 Sparkle 0x006e80f6 +[NTRequestPolicy sharedRequestPolicy] (NTRequestPolicy.m:24)
24 Sparkle 0x004f5fe8 +[WAGServiceHandler execute:requestObject:responseClass:serviceCallBack:requestType:additionalHTTPHeaders:backgroundRequest:] (WAGServiceHandler.m:39)
25 Sparkle 0x004f5ed0 +[WAGServiceHandler execute:requestObject:responseClass:serviceCallBack:requestType:] (WAGServiceHandler.m:26)
26 Sparkle 0x004f5e72 +[WAGServiceHandler execute:requestObject:responseClass:serviceCallBack:] (WAGServiceHandler.m:20)
27 Sparkle 0x0040acaa -[Mbox load] (Mbox.m:118)
28 Sparkle 0x0040bf52 -[MBoxHandler invokeMboxManager] (MBoxHandler.m:47)
29 Sparkle 0x0040d548 __39-[MomentumMapPlugIn downloadIconImages]_block_invoke (MomentumMapPlugIn.m:222)
30 libdispatch.dylib 0x3a03111c _dispatch_call_block_and_release + 8
31 libdispatch.dylib 0x3a030996 _dispatch_queue_drain$VARIANT$up + 142
32 libdispatch.dylib 0x3a030890 _dispatch_queue_invoke$VARIANT$up + 32
33 libdispatch.dylib 0x3a03f212 _dispatch_root_queue_drain + 190
34 libdispatch.dylib 0x3a03f3b4 _dispatch_worker_thread2 + 80
35 libsystem_c.dylib 0x3a065a0e _pthread_wqthread + 358
36 libsystem_c.dylib 0x3a0658a0 start_wqthread + 4
Simply put, Exception Type 20 means you are doing asynchronous networking on the main thread and when the connection or operation is slow, the App can be terminated by iOS. This will occur randomly. See this note:
https://developer.apple.com/library/ios/qa/qa1693/_index.html
If you get Exception Type: 00000020 and Exception Codes: 0x8badf00d in your crash log then it is Watchdog time out crash report.
This happens when you execute activity synchronously on main thread.
Fix for this is to use asynchronously on main thread.
This Apple document provides detail about this crash in detail.
Do one thing modify your code like that below and test.
if([[NSFileManager DefaultManger]
fileExistAtPath:envsPListPath]){
NSDictionary *environments = [[NSDictionary
dictionaryWithContentsOfFile:envsPListPath];
}
Find in which thread your app is crashing and put that thread in
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
// run that crashing thread here.
});
});
I have an app of sending free text MSG ..
While i select a contact i got my application crash and from crash log i didn't get solution of it ..
Can any one tell me how to solve crash log with proper stapes ..
Here is my Crash Log :
Incident Identifier: A8E3BBD6-CD0D-45C8-8134-65EF03CBFF5E
CrashReporter Key: 64c47e02a46dcc17a25718b8b3d9f579f535b545
Hardware Model: iPhone2,1
Process: [6703]
Path: /var/mobile/Applications/9055F800-A876-4D5E-B1CD-202BC6F80BDB/.app/
Identifier:
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-11-24 13:27:16.113 +0530
OS Version: iPhone OS 4.1 (8B117)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x656a6277
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x000027d8 objc_msgSend + 16
1 CoreFoundation 0x000042ae CFRetain + 62
2 CoreFoundation 0x0002832a +[__NSArrayI __new::] + 54
3 CoreFoundation 0x00028152 -[__NSPlaceholderArray initWithObjects:count:] + 122
4 CoreFoundation 0x00027ef4 +[NSArray arrayWithObjects:] + 356
5 0x00033fcc 0x1000 + 208844
6 0x00033f46 0x1000 + 208710
7 UIKit 0x0022fb26 -[UISearchDisplayController searchBar:textDidChange:] + 78
8 UIKit 0x001f48aa -[UISearchBar(UISearchBarStatic) _searchFieldEditingChanged] + 106
9 CoreFoundation 0x00047712 -[NSObject(NSObject) performSelector:withObject:withObject:] + 18
10 UIKit 0x0010dfa0 -[UIApplication sendAction:fromSender:toTarget:forEvent:] + 76
11 UIKit 0x00137c00 -[UIControl(Deprecated) sendAction:toTarget:forEvent:] + 28
12 UIKit 0x000ab930 -[UIControl(Internal) _sendActionsForEventMask:withEvent:] + 352
13 UIKit 0x000dd888 -[UITextField fieldEditorDidChange:] + 188
14 UIKit 0x000dd6c0 -[UIFieldEditor webViewDidChange:] + 48
15 Foundation 0x000146ac _nsnote_callback + 136
16 CoreFoundation 0x0002670c __CFXNotificationPost_old + 396
17 CoreFoundation 0x000263ac _CFXNotificationPostNotification + 112
18 Foundation 0x00003db0 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
19 CoreFoundation 0x0004b42c __invoking___ + 60
20 CoreFoundation 0x0004b2fe -[NSInvocation invoke] + 102
21 WebCore 0x00049816 SendMessage(NSInvocation*) + 10
22 WebCore 0x00057dc0 SendDelegateMessage(NSInvocation*) + 700
23 WebCore 0x000617f4 WebThreadPostNotification + 88
24 WebKit 0x0001347c WebEditorClient::respondToChangedContents() + 24
25 WebCore 0x0026d8ce WebCore::Editor::respondToChangedContents(WebCore::VisibleSelection const&) + 98
26 WebCore 0x0026db34 WebCore::Editor::appliedEditing(WTF::PassRefPtr<WebCore::EditCommand>) + 204
27 WebCore 0x004e852a WebCore::TypingCommand::insertTextRunWithoutNewlines(WebCore::String const&, bool) + 258
28 WebCore 0x004e8606 WebCore::TypingCommand::insertText(WebCore::String const&, bool) + 134
29 WebCore 0x004e6c7a WebCore::TypingCommand::doApply() + 126
30 WebCore 0x0026af2e WebCore::EditCommand::apply() + 86
31 WebCore 0x0026af8c WebCore::applyCommand(WTF::PassRefPtr<WebCore::EditCommand>) + 4
32 WebCore 0x004e8ba6 WebCore::TypingCommand::insertText(WebCore::Document*, WebCore::String const&, WebCore::VisibleSelection const&, bool, bool) + 526
33 WebCore 0x0027020a WebCore::Editor::insertTextWithoutSendingTextEvent(WebCore::String const&, bool, WebCore::Event*) + 210
34 WebCore 0x002751e0 WebCore::EventHandler::defaultTextInputEventHandler(WebCore::TextEvent*) + 76
35 WebCore 0x00066a86 WebCore::Node::defaultEventHandler(WebCore::Event*) + 342
36 WebCore 0x000666e2 WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr<WebCore::Event>) + 578
37 WebCore 0x00066440 WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 144
38 WebCore 0x00164232 WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, int&) + 54
39 WebCore 0x0027535c WebCore::EventHandler::handleTextInputEvent(WebCore::String const&, WebCore::Event*, bool, bool) + 43 WebCore 0x004ee42c -[WAKResponder tryToPerform:with:] + 40
44 WebKit 0x000122ac -[WebView(WebViewEditingActions) _performResponderOperation:with:] + 76
45 WebKit 0x00012254 -[WebView(WebViewEditingActions) insertText:] + 16
46 UIKit 0x00100f46 -[UIWebDocumentView insertText:] + 26
47 UIKit 0x0010076c -[UIKeyboardImpl addInputString:fromVariantK
ey:] + 2504
48 UIKit 0x000ffd80 -[UIKeyboardImpl handleStringInput:fromVariantKey:] + 128
49 UIKit 0x000fec0c -[UIKeyboardImpl handleKeyEvent:] + 1292
50 UIKit 0x000fe6ec -[UIApplication _handleKeyEvent:] + 28
51 UIKit 0x000fe6be -[UIResponder(Internal) _handleKeyEvent:] + 22
52 UIKit 0x000fe6be -[UIResponder(Internal) _handleKeyEvent:] + 22
53 UIKit 0x000fe6be -[UIResponder(Internal) _handleKeyEvent:] + 22
54 UIKit 0x000fe6be -[UIResponder(Internal) _handleKeyEvent:] + 22
55 UIKit 0x000fe6be -[UIResponder(Internal) _handleKeyEvent:] + 22
56 UIKit 0x000fe6be -[UIResponder(Internal) _handleKeyEvent:] + 22
57 UIKit 0x000fe694 -[UIApplication handleKeyEvent:] + 40
58 UIKit 0x000fe5ae -[UIKeyboardLayoutStar sendStringAction:forKey:] + 394
59 UIKit 0x000fc2e4 -[UIKeyboardLayoutStar touchUp:] + 1656
60 UIKit 0x000fbbe0 -[UIKeyboardLayout touchesEnded:withEvent:] + 296
61 UIKit 0x00062dd6 -[UIWindow _sendTouchesForEvent:] + 362
62 UIKit 0x00062750 -[UIWindow sendEvent:] + 256
63 UIKit 0x0005d9f8 -[UIApplication sendEvent:] + 292
64 UIKit 0x0005d330 _UIApplicationHandleEvent + 5104
65 GraphicsServices 0x00005044 PurpleEventCallback + 660
66 CoreFoundation 0x00034cdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
67 CoreFoundation 0x00034ca0 __CFRunLoopDoSource1 + 160
68 CoreFoundation 0x00027566 __CFRunLoopRun + 514
69 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224
70 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52
71 GraphicsServices 0x000045ec GSEventRunModal + 108
72 GraphicsServices 0x00004698 GSEventRun + 56
73 UIKit 0x0000411c -[UIApplication _run] + 396
74 UIKit 0x00002128 UIApplicationMain + 664
75 0x0000265a 0x1000 + 5722
76 0x1000 + 5668
Thread 1:
0 libSystem.B.dylib 0x0002d330 kevent + 24
1 libSystem.B.dylib 0x000d6b6c _dispatch_mgr_invoke + 88
2 libSystem.B.dylib 0x000d65bc _dispatch_queue_invoke + 96
3 libSystem.B.dylib 0x000d675c _dispatch_worker_thread2 + 120
4 libSystem.B.dylib 0x0007a67a _pthread_wqthread + 258
5 libSystem.B.dylib 0x00073190 start_wqthread + 0
Thread 2:
0 libSystem.B.dylib 0x0007b19c __workq_kernreturn + 8
1 libSystem.B.dylib 0x0007a790 _pthread_wqthread + 536
2 libSystem.B.dylib 0x00073190 start_wqthread + 0
Thread 3:
0 libSystem.B.dylib 0x00000cf4 semaphore_wait_signal_trap + 8
1 libSystem.B.dylib 0x0002e4ee semaphore_wait_signal + 2
2 libSystem.B.dylib 0x00002ae4 pthread_mutex_lock + 248
3 WebCore 0x00002620 _WebTryThreadLock(bool) + 140
4 WebCore 0x00002566 WebRunLoopLock(__CFRunLoopObserver*, unsigned long, void*) + 18
5 CoreFoundation 0x00030236 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 10
6 CoreFoundation 0x000300aa __CFRunLoopDoObservers + 406
7 CoreFoundation 0x000276c0 __CFRunLoopRun + 860
8 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224
9 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52
10 WebCore 0x000024e2 RunWebThread(void*) + 362
11 libSystem.B.dylib 0x0007a27e _pthread_start + 242
12 libSystem.B.dylib 0x0006f2a8 thread_start + 0
Thread 4:
0 libSystem.B.dylib 0x00000c98 mach_msg_trap + 20
1 libSystem.B.dylib 0x00002d64 mach_msg + 44
2 CoreFoundation 0x00027c38 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x000274c2 __CFRunLoopRun + 350
4 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52
6 CFNetwork 0x00069074 CFURLConnectionSendSynchronousRequest + 244
7 Foundation 0x000aed8c +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 76
8 0x00025ea4 0x1000 + 151204
9 0x000296c8 0x1000 + 165576
10 Foundation 0x0000b222 -[NSThread main] + 38
11 Foundation 0x000042d6 __NSThread__main__ + 966
12 libSystem.B.dylib 0x0007a27e _pthread_start + 242
13 libSystem.B.dylib 0x0006f2a8 thread_start + 0
Thread 5:
0 libSystem.B.dylib 0x00000c98 mach_msg_trap + 20
1 libSystem.B.dylib 0x00002d64 mach_msg + 44
2 CoreFoundation 0x00027c38 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x000274c2 __CFRunLoopRun + 350
4 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52
6 Foundation 0x0002d686 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7 Foundation 0x0000b222 -[NSThread main] + 38
8 Foundation 0x000042d6 __NSThread__main__ + 966
9 libSystem.B.dylib 0x0007a27e _pthread_start + 242
10 libSystem.B.dylib 0x0006f2a8 thread_start + 0
Thread 6:
0 libSystem.B.dylib 0x00025060 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x0005edfc __CFSocketManager + 540
2 libSystem.B.dylib 0x0007a27e _pthread_start + 242
3 libSystem.B.dylib 0x0006f2a8 thread_start + 0
Thread 7:
0 libSystem.B.dylib 0x0007b19c __workq_kernreturn + 8
1 libSystem.B.dylib 0x0007a790 _pthread_wqthread + 536
2 libSystem.B.dylib 0x00073190 start_wqthread + 0
Thread 8:
0 libSystem.B.dylib 0x00000c98 mach_msg_trap + 20
1 libSystem.B.dylib 0x00002d64 mach_msg + 44
2 libSystem.B.dylib 0x0002591e thread_policy + 118
3 libSystem.B.dylib 0x00025896 pthread_setschedparam_internal + 62
4 libSystem.B.dylib 0x000257d0 pthread_setschedparam + 68
5 UIKit 0x00100ea2 InitTextChecker + 22
6 libSystem.B.dylib 0x0007a27e _pthread_start + 242
7 libSystem.B.dylib 0x0006f2a8 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x32ca2efa r1: 0x32ca3270 r2: 0x656a626f r3: 0x339737c9
r4: 0x656a626f r5: 0x3e8055e4 r6: 0x00000005 r7: 0x2fffd824
r8: 0x06417f18 r9: 0x2fffd7c0 r10: 0x06417f10 r11: 0x2fffd870
ip: 0x3e7f23e4 sp: 0x2fffd80c lr: 0x3440f2b5 pc: 0x339737d8
cpsr: 0x20010030
Thanks in Advance ....
arrayWithObjects: takes a nil terminated list of object ids. You might have forget the nil
myArray = [NSArray arrayWithObjects:aDate, aValue, aString, nil];
Check reference
Without any details (like a completely symbolicated crash log and the corresponding code) this is like looking into a crystal ball: we have to guess.
From the crash log I'd say you create an array (via [NSArray arrayWithObjects:]) and feed it something that is not an Objective-C object. Maybe you forgot to add nil as the last object in the list? It's necessary so Objective-C knows where your list of objects ends.
You are getting EXC_BAD_ACCESS that means you are trying to reach a released object. Best practice is to put some break points and go step by step. I also recommend you to turn the zombies on. Product->Edit Scheme->Diagnostics and check Enable Zombie Objects.
after you do this when you crash you can see the point you crash and which method is trying to reach the released object.
The crash log gives you some information, which is not much, but better than nothing if you are not able to reproduce the crash yourself.
As you can see from these lines:
4 CoreFoundation 0x00027ef4 +[NSArray arrayWithObjects:] + 356
5 - 0x00033fcc 0x1000 + 208844
6 - 0x00033f46 0x1000 + 208710
7 UIKit 0x0022fb26 -[UISearchDisplayController searchBar:textDidChange:] + 78
the crash happens after a change in your searchBar, which triggers the corresponding action in your code. The action then tries to create an array and it crashes.
So, I would start checking the action that you associated to the search bar and see what happens there. You could also post it here, so that we can have a look.