[SPApplication _accessibilityInitialize]: unrecognized selector sent to instance on watchOS4 - swift

Once my watch app starts, it crashes with the following error:
2017-08-17 13:59:54.304792-0300 watchOS4 Extension[11500:1617313] -[SPApplication _accessibilityInitialize]: unrecognized selector sent to instance 0x79e5b8f0
2017-08-17 13:59:56.173675-0300 watchOS4 Extension[11500:1617313] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SPApplication _accessibilityInitialize]: unrecognized selector sent to instance 0x79e5b8f0'
*** First throw call stack:
(
0 CoreFoundation 0x015ae80d __exceptionPreprocess + 189
1 libobjc.A.dylib 0x00f22bcf objc_exception_throw + 49
2 CoreFoundation 0x0162f978 -[NSObject(NSObject) doesNotRecognizeSelector:] + 136
3 CoreFoundation 0x015322c4 ___forwarding___ + 1300
4 CoreFoundation 0x01531d8e _CF_forwarding_prep_0 + 14
5 UIAccessibility 0x19a13e2c __54+[UIAccessibilityLoader _accessibilityLoadSubbundles:]_block_invoke.338 + 44
6 libdispatch.dylib 0x05f990bf _dispatch_call_block_and_release + 15
7 libdispatch.dylib 0x05f9a42c _dispatch_client_callout + 14
8 libdispatch.dylib 0x05fa4e88 _dispatch_main_queue_callback_4CF + 1204
9 CoreFoundation 0x0157116e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
10 CoreFoundation 0x0153677e __CFRunLoopRun + 3310
11 CoreFoundation 0x015357e5 CFRunLoopRunSpecific + 373
12 CoreFoundation 0x0153565a CFRunLoopRunInMode + 122
13 GraphicsServices 0x08fde249 GSEventRunModal + 71
14 GraphicsServices 0x08fde12e GSEventRun + 80
15 UIKit 0x01a402d1 UIApplicationMain + 148
16 libxpc.dylib 0x06350a67 _xpc_objc_main + 528
17 libxpc.dylib 0x063533a0 xpc_main + 158
18 Foundation 0x009543c5 -[NSXPCListener resume] + 185
19 PlugInKit 0x057be28b -[PKService run] + 799
20 WatchKit 0x001cd123 main + 160
21 libdyld.dylib 0x05ffdd41 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
What does the SPApplication _accessibilityInitialize means? I do not implement any accessibility functionality yet.
Im running watchOS4 beta 6 and XCode 9 beta 5

For who else experiencing this problem: just restart Xcode and simulators and perform a Clean in the project. Worked for me.

Related

Getting to the bottom of crash

I have the following crash that I can't replicate on demand but does happen enough to get noticed by the users.
This crash report has been symbolicated as well. How would you find out the cause!!! This only seems to happen on 4.1
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x9f069184
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x000027d8 objc_msgSend + 16
1 CoreFoundation 0x0007d749 ____CFXNotificationPost_old_block_invoke_1 + 45
2 libSystem.B.dylib 0x000d5984 _dispatch_call_block_and_release + 20
3 libSystem.B.dylib 0x000d66b0 _dispatch_continuation_pop + 72
4 libSystem.B.dylib 0x000d69fc _dispatch_main_queue_callback_4CF + 220
5 CoreFoundation 0x0002789b __CFRunLoopRun + 1335
6 CoreFoundation 0x00027277 CFRunLoopRunSpecific + 231
7 CoreFoundation 0x0002717f CFRunLoopRunInMode + 59
8 GraphicsServices 0x000045f3 GSEventRunModal + 115
9 GraphicsServices 0x0000469f GSEventRun + 63
10 UIKit 0x00004123 -[UIApplication _run] + 403
11 UIKit 0x0000212f UIApplicationMain + 671
12 MyApp 0x000024e3 main (main.m:17)
I have since managed to get a little more info, but not much.
2012-02-12 18:03:04.556 MyApp[462:307] (null): unrecognized selector sent to class 0x3e0a360c
2012-02-12 18:03:04.618 MyApp[462:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '(null): unrecognized selector sent to class 0x3e0a360c'
*** Call stack at first throw:
(
0 CoreFoundation 0x33506ed3 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x30412811 objc_exception_throw + 24
2 CoreFoundation 0x335086ff +[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x334b01d9 ___forwarding___ + 508
4 CoreFoundation 0x334aff90 _CF_forwarding_prep_0 + 48
5 Foundation 0x302a86b3 _nsnote_callback + 142
6 CoreFoundation 0x334e4749 ____CFXNotificationPost_old_block_invoke_1 + 44
7 libSystem.B.dylib 0x31d05984 _dispatch_call_block_and_release + 20
8 libSystem.B.dylib 0x31d066b0 _dispatch_continuation_pop + 72
9 libSystem.B.dylib 0x31d069fc _dispatch_main_queue_callback_4CF + 220
10 CoreFoundation 0x3348e89b __CFRunLoopRun + 1334
11 CoreFoundation 0x3348e277 CFRunLoopRunSpecific + 230
12 CoreFoundation 0x3348e17f CFRunLoopRunInMode + 58
13 GraphicsServices 0x31b5e5f3 GSEventRunModal + 114
14 GraphicsServices 0x31b5e69f GSEventRun + 62
15 UIKit 0x341bd123 -[UIApplication _run] + 402
16 UIKit 0x341bb12f UIApplicationMain + 670
Now all of my addObservers are block based so I can't see why it would lead to an unrecognised selector.
This way won't help us much while Debugging crash. I found one of the best way to Debug the code for Crash. Follow the link for debugging technique:
https://cocoadev.com/DebuggingAutorelease.html
You need to analyze your Console very carefully to see actually why the Crash occurs. This helped me in almost all of the Code that are without ARC enabled.

App Crash While hitting web Services

I have a table view in which Iam selecting a row of the table view and then it hits the web services, retrieves data and then displayed. Now this is my error log Iam getting.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-
[__NSCFData setDownloadedLogoImage:]: unrecognized selector sent to instance 0x806cf90'
*** Call stack at first throw:
(
0 CoreFoundation 0x02abdb99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02c0d40e objc_exception_throw + 47
2 CoreFoundation 0x02abf6ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02a2f2b6 ___forwarding___ + 966
4 CoreFoundation 0x02a2ee72 _CF_forwarding_prep_0 + 50
5 FlightSearch 0x000401ef -[AirlineNames connectionDidFinishImage:] + 168
6 FlightSearch 0x0002f535 -[SAHttpManager connectionDidFinishLoading:] + 195
7 Foundation 0x001acb96 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 108
8 Foundation 0x001acaef _NSURLConnectionDidFinishLoading + 133
9 CFNetwork 0x0307172f _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 285
10 CFNetwork 0x0313cfcf _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 389
11 CFNetwork 0x03066968 _ZN19URLConnectionClient13processEventsEv + 100
12 CFNetwork 0x030667e5 _ZN17MultiplexerSource7performEv + 251
13 CoreFoundation 0x02a9efaf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
14 CoreFoundation 0x029fd39b __CFRunLoopDoSources0 + 571
15 CoreFoundation 0x029fc896 __CFRunLoopRun + 470
16 CoreFoundation 0x029fc350 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x029fc271 CFRunLoopRunInMode + 97
18 GraphicsServices 0x032b000c GSEventRunModal + 217
19 GraphicsServices 0x032b00d1 GSEventRun + 115
20 UIKit 0x00419af2 UIApplicationMain + 1160
21 FlightSearch 0x00001e86 main + 84
22 FlightSearch 0x00001e29 start + 53
23 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Kindly suggest me what should i do.
You're sending the message setDownloadedLogoImage: to an NSData object, which has no idea what to do with it! One of two things has happened:
1) You have not retained something. Take a look at whatever object you expect to call setDownloadedLogoImage on and find out where you create it - you should probably be retaining it there ;)
2) (less likely) Your code is just wrong! Add it to your question and we can take a look.

Exception when running PhoneGap0.9.6 application on iPhone

We have an PhoneGap application that runs perfectly okay when using the simulator but once running this in the actual iPhone connected to mac we get an exception (errors below). Note the application was working perfectly fine before upgrade to PhoneGap0.9.6/
objc[356]: Class Connection is implemented in both /System/Library/PrivateFrameworks/Message.framework/Message and /var/mobile/Applications/D1D682A1-010B-4AE9-8761-4D553FCF8089/Frank151.app/Frank151. One of the two will be used. Which one is undefined.
[Switching to process 13059 thread 0x0]
2011-07-08 18:00:45.355 Frank151[356:707] -[Connection initWithWebView:]: unrecognized selector sent to instance 0x17e4e0
2011-07-08 18:00:45.378 Frank151[356:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Connection initWithWebView:]: unrecognized selector sent to instance 0x17e4e0'
*** Call stack at first throw:
(
0 CoreFoundation 0x3166564f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x35180c5d objc_exception_throw + 24
2 CoreFoundation 0x316691bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x31668649 ___forwarding___ + 508
4 CoreFoundation 0x315df180 _CF_forwarding_prep_0 + 48
5 Frank151 0x00017469 -[PhoneGapDelegate getCommandInstance:] + 164
6 Frank151 0x00002f7f -[AppDelegate getCommandInstance:] + 62
7 Frank151 0x00016807 -[PhoneGapDelegate deviceProperties] + 234
8 Frank151 0x00016475 -[PhoneGapDelegate webViewDidFinishLoad:] + 28
9 Frank151 0x00003071 -[AppDelegate webViewDidFinishLoad:] + 212
10 UIKit 0x318a9061 -[UIWebView webView:didFinishLoadForFrame:] + 244
11 UIKit 0x318a8427 -[UIWebViewWebViewDelegate webView:didFinishLoadForFrame:] + 22
12 CoreFoundation 0x316687a4 __invoking___ + 68
13 CoreFoundation 0x315e043d -[NSInvocation invoke] + 108
14 CoreFoundation 0x315e00d9 -[NSInvocation invokeWithTarget:] + 36
15 WebKit 0x345887bd -[_WebSafeForwarder forwardInvocation:] + 408
16 CoreFoundation 0x3166868d ___forwarding___ + 576
17 CoreFoundation 0x315df180 _CF_forwarding_prep_0 + 48
18 CoreFoundation 0x316687a4 __invoking___ + 68
19 CoreFoundation 0x315e043d -[NSInvocation invoke] + 108
20 WebCore 0x36c39c3d _ZL11SendMessageP12NSInvocation + 16
21 WebCore 0x36cdcadf _ZL20HandleDelegateSourcePv + 66
22 CoreFoundation 0x3163ca79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
23 CoreFoundation 0x3163e75f __CFRunLoopDoSources0 + 382
24 CoreFoundation 0x3163f4eb __CFRunLoopRun + 230
25 CoreFoundation 0x315cfec3 CFRunLoopRunSpecific + 230
26 CoreFoundation 0x315cfdcb CFRunLoopRunInMode + 58
27 GraphicsServices 0x30f4e41f GSEventRunModal + 114
28 GraphicsServices 0x30f4e4cb GSEventRun + 62
29 UIKit 0x316f5d69 -[UIApplication _run] + 404
30 UIKit 0x316f3807 UIApplicationMain + 670
31 Frank151 0x00002caf main + 78
32 Frank151 0x00002c5c start + 40
)
terminate called after throwing an instance of 'NSException'
[Switching to process 11779 thread 0x0]
(gdb)
UPDATE: After not much luck after trying many things we decided to downgrade the application to PG 0.9.5.1 and it worked with no issues. Not sure of the cause but something to do with PhoneGap 0.9.6 upgrade.
Start by disabling any plug ins......
webView may be referring to ChildBrowser Plugin.

application crashes -= XMPP for iPhone

I am creating chat application and I am using the XMPP code ,
Here is the application logs shows the crash , please help me out if any one knows the solutions
Terminating app due to uncaught exception
'NSInvalidArgumentException',
reason: '-[XMPPvCardCoreDataStorage clearvCardTempForJID:xmppStream:]: unrecognized selector sent to instance 0x29bbe0'
Here is the Stack
Call stack at first throw:
(
0 CoreFoundation 0x3172464f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x3523fc5d objc_exception_throw + 24
2 CoreFoundation 0x317281bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x317278ad -[NSObject(NSObject) forwardInvocation:] + 36
4 CoreFoundation 0x3172768d ___forwarding___ + 576
5 CoreFoundation 0x3169e180 _CF_forwarding_prep_0 + 48
6 iPhoneXMPP 0x0003681d -[XMPPvCardAvatarModule xmppStreamWillConnect:] + 132
7 CoreFoundation 0x317277a4 __invoking___ + 68
8 CoreFoundation 0x3169f43d -[NSInvocation invoke] + 108
9 CoreFoundation 0x3169f0d9 -[NSInvocation invokeWithTarget:] + 36
10 iPhoneXMPP 0x0002a383 __42-[GCDMulticastDelegate forwardInvocation:]_block_invoke_0 + 70
11 libdispatch.dylib 0x3600a8e7 _dispatch_call_block_and_release + 10
12 libdispatch.dylib 0x36005ec1 _dispatch_queue_drain + 240
13 libdispatch.dylib 0x36006033 _dispatch_queue_invoke + 78
14 libdispatch.dylib 0x360055f1 _dispatch_worker_thread2 + 192
15 libsystem_c.dylib 0x3640b591 _pthread_wqthread + 264
16 libsystem_c.dylib 0x3640bbc4 _init_cpu_capabilities + 4294967295
)
Thanks in advance
I think you are calling the following method,
- (void)clearvCardTempForJID:(XMPPJID *)jid xmppStream:(XMPPStream *)stream
it should be called with two arguments ie JabberId and XmppStream object.You may set those thing wrongly.
[XMPPvCardCoreDataStorage clearvCardTempForJID:urNeededJid:xmppStream];

Terminating app due to uncaught exception 'NSInvalidArgumentException'

I am using ShareKit to allow the user to share their score on Twitter and Facebook in my iPhone app. However, it seems to crash shortly after sharing on either service. I get an console message which says:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString rangeOfString:options:range:locale:]: nil argument'
*** Call stack at first throw:
(
0 CoreFoundation 0x026d6919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x028245de objc_exception_throw + 47
2 CoreFoundation 0x0268f078 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x0268efea +[NSException raise:format:] + 58
4 Foundation 0x0008f97b -[NSString rangeOfString:options:range:locale:] + 424
5 Foundation 0x0009de16 -[NSString rangeOfString:] + 104
6 iPhone Typer 0x00030220 -[SHKOAuthView webView:shouldStartLoadWithRequest:navigationType:] + 151
7 UIKit 0x004bb456 -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 458
8 CoreFoundation 0x0264742d __invoking___ + 29
9 CoreFoundation 0x02647301 -[NSInvocation invoke] + 145
10 WebCore 0x030940f0 _ZL20HandleDelegateSourcePv + 64
11 CoreFoundation 0x026b7d7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
12 CoreFoundation 0x026162cb __CFRunLoopDoSources0 + 571
13 CoreFoundation 0x026157c6 __CFRunLoopRun + 470
14 CoreFoundation 0x02615280 CFRunLoopRunSpecific + 208
15 CoreFoundation 0x026151a1 CFRunLoopRunInMode + 97
16 GraphicsServices 0x02e5e2c8 GSEventRunModal + 217
17 GraphicsServices 0x02e5e38d GSEventRun + 115
18 UIKit 0x00339b58 UIApplicationMain + 1160
19 iPhone Typer 0x00002894 main + 102
20 iPhone Typer 0x00002825 start + 53
)
terminate called after throwing an instance of 'NSException'
How would I fix this? Thanks.
Set a breakpoint on objc_exception_throw, then build the app for debug, run the app with breakpoints on and cause the crash again, then go up the stack to the relevant code.
Something inside SHKOAuthView webView:shouldStartLoadWithRequest:navigationType: is passing a nil argument to NSString rangeOfString. When you know what is passing the nil, it may be obvious what the problem is - failing that update your question with the relevant code and any extra information you've determined.