Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to understand watchkit extension crash

I am getting these crash reports on Xcode organizer from users of the app. It does not show any line of my code in the crash, looks like it crashed on init. I do not know how to progress with the debug. Can you please help:

Thread 0#0  (null) in 0x300000 ()
#1  (null) in 0x300000 ()
#2  (null) in _WKInterfaceControllerCreateClass ()
#3  (null) in __115-[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:]_block_invoke_3 ()
#4  (null) in __115-[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:]_block_invoke_2 ()
#5  (null) in spUtils_dispatchAsyncToMainThread ()
#6  (null) in __115-[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:]_block_invoke ()
#7  (null) in -[SPRemoteInterface performAfterApplicationDidFinishLaunching:] ()
#8  (null) in -[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:] ()
#9  (null) in __140-[SPExtensionConnection interfaceViewController:createCompanionControllerClass:properties:initializationContextID:info:gestureDescriptions:]_block_invoke ()
#10 (null) in __62-[SPExtensionConnection performOnSendQueue:syncIfUnsuspended:]_block_invoke.583 ()
#11 (null) in spUtils_dispatchAsyncToMainThread ()
#12 (null) in -[SPExtensionConnection performOnSendQueue:syncIfUnsuspended:] ()
#13 (null) in -[SPExtensionConnection interfaceViewController:createCompanionControllerClass:properties:initializationContextID:info:gestureDescriptions:] ()
#14 (null) in -[SPApplicationDelegate interfaceViewController:createCompanionControllerClass:properties:initializationContextID:] ()
#15 (null) in -[SPInterfaceViewController loadView] ()
#16 (null) in -[UIViewController loadViewIfRequired] ()
#17 (null) in -[UIViewController view] ()
#18 (null) in -[SPModalViewController setContentViewController:] ()
#19 (null) in -[SPApplicationDelegate extensionConnection:interfaceViewController:presentViewController:info:initializationContextID:] ()
#20 (null) in -[SPExtensionConnection handlePlistDictionary:] ()
#21 (null) in -[SPExtensionConnection handleProtoPlist:] ()
#22 (null) in __43-[SPExtensionConnection receiveData:reply:]_block_invoke ()
#23 (null) in spUtils_dispatchAsyncToMainThread ()
#24 (null) in -[SPExtensionConnection receiveData:reply:] ()
#25 (null) in -[SPRemoteInterface performForClientConnections:directToUIBlock:] ()
#26 (null) in __54-[SPRemoteInterface sendData:clientIdentifiers:reply:]_block_invoke ()
#27 (null) in spUtils_dispatchAsyncToMainThread ()
#28 (null) in -[SPRemoteInterface sendData:clientIdentifiers:reply:] ()
#29 (null) in -[SPRemoteInterface sendData:clientIdentifiers:] ()
#30 (null) in -[SPRemoteInterface sendPlist:clientIdentifiers:] ()
#31 (null) in -[SPRemoteInterface controller:presentInterfaceController:initializationContextID:] ()
#32 (null) in +[SPRemoteInterface controller:presentInterfaceController:context:] ()
#33 (null) in __59-[WKInterfaceController presentControllerWithName:context:]_block_invoke ()
#34 (null) in -[WKInterfaceController presentControllerWithName:context:] ()
like image 708
user7143420 Avatar asked Sep 30 '18 15:09

user7143420


2 Answers

I had a similar issue. In my case, the issue was that I changed the watch app extension name, so it doesn't include the underscore character. After this, I experienced this crash.

The solution was, to go into the storyboard file of the watch app extension, and in the identity inspector of the existing view controllers, I just retyped the name of the custom class names, and the module updated automatically. After this, it worked. Hope it works for you as well.

like image 105
Peter Robert Avatar answered Nov 19 '22 07:11

Peter Robert


Just FYI. The issue that I had was one of those embarrassing ones.

The storyboard had "Inherit Module From Target" on.

However, the default layout that Apple creates, has the executable in a separate (Extension) target.

I need to uncheck that box, and explicitly reference my extension target.

D'oh!

like image 40
Chris Marshall Avatar answered Nov 19 '22 06:11

Chris Marshall