Adding audio player to a node in SceneKit - swift

I have some problems with adding an audio player to a node. For some reason, I get an exception and my application stops. Here is how my code looks like
let node = scene.rootNode.childNodeWithName("box", recursively: true)!
let source = SCNAudioSource(fileNamed: "test.mp3")
source.loops = true
source.volume = 2
source.positional = true
source.shouldStream = true
source.load()
let player = SCNAudioPlayer(source: source)
node.addAudioPlayer(player)
Can anybody help me find out what is the problem?
Edit: Exception:
2015-06-12 10:44:29.202 asd[10480:2157476] 10:44:29.202 ERROR: AVAudioNodeImpl.h:39: AVAE_CheckNodeHasEngine: required condition is false: _engine != nil
2015-06-12 10:44:29.208 asd[10480:2157476] * Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: _engine != nil'
* First throw call stack:
(
0 CoreFoundation 0x000000010ca18885 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010e9afdf1 objc_exception_throw + 48
2 CoreFoundation 0x000000010ca186ea +[NSException raise:format:arguments:] + 106
3 libAVFAudio.dylib 0x0000000115549efe libAVFAudio.dylib + 98046
4 libAVFAudio.dylib 0x000000011558b4fd libAVFAudio.dylib + 365821
5 libAVFAudio.dylib 0x000000011558aaa5 libAVFAudio.dylib + 363173
6 SceneKit 0x000000010d3695eb C3DTransactionFlush + 1967
7 SceneKit 0x000000010d3699e9 C3DTransactionCommit + 218
8 SceneKit 0x000000010d2f7f6e -[SCNRenderer setPointOfView:] + 4677
9 SceneKit 0x000000010d2f8c05 -[SCNRenderer setScene:completionHandler:] + 213
10 SceneKit 0x000000010d354920 -[SCNView setScene:] + 319
11 asd 0x000000010c8338b2 _TFC3asd18GameViewController11viewDidLoadfS0_FT_T_ + 2866
12 asd 0x000000010c833ba2 _TToFC3asd18GameViewController11viewDidLoadfS0_FT_T_ + 34
13 UIKit 0x000000010d7bbd65 -[UIViewController loadViewIfRequired] + 860
14 UIKit 0x000000010d7bc0b4 -[UIViewController view] + 27
15 UIKit 0x000000010d69f3d4 -[UIWindow addRootViewControllerViewIfPossible] + 61
16 UIKit 0x000000010d69fad1 -[UIWindow _setHidden:forced:] + 302
17 UIKit 0x000000011c867717 UIKit + 247575
18 UIKit 0x000000010d6b0ff8 -[UIWindow makeKeyAndVisible] + 43
19 UIKit 0x000000010d63302b -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3545
20 UIKit 0x000000010d638ef0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755
21 UIKit 0x000000010d63673f -[UIApplication workspaceDidEndTransaction:] + 188
22 FrontBoardServices 0x0000000116052d7b FrontBoardServices + 163195
23 FrontBoardServices 0x0000000116053118 FrontBoardServices + 164120
24 CoreFoundation 0x000000010c9430f1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
25 CoreFoundation 0x000000010c938eac __CFRunLoopDoSources0 + 556
26 CoreFoundation 0x000000010c938363 __CFRunLoopRun + 867
27 CoreFoundation 0x000000010c937d78 CFRunLoopRunSpecific + 488
28 UIKit 0x000000010d636091 -[UIApplication _run] + 402
29 UIKit 0x000000010d63a79b UIApplicationMain + 171
30 asd 0x000000010c83624d main + 109
31 libdyld.dylib 0x000000010f3a0a05 libdyld.dylib + 10757
32 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Try using SCNAction. Or making sure the audio file name is correct.
let source = SCNAudioSource(fileNamed: "SoundFile.mp3")
let action = SCNAction.playAudio(source!, waitForCompletion: true)
node.runAction(action)

Related

SIGABRT Crash when attaching a document to a PDFView

I'm very new to Swift - having some trouble doing the simple task of displaying a document in a PDFView. I am not using Storyboards or IBOutlets etc. Any idea why the below is crashing?
I have tried referencing an external link, but it gives me the same error. The PDF exists in the bundle directory.
import UIKit
import PDFKit
class ViewController: UIViewController {
private var pdfView = PDFView()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let myNewView = PDFView(frame: CGRect(x: 10, y: 100, width: 500, height: 500))
// Add border to UIView
myNewView.layer.borderWidth=2
// Change UIView Border Color to Red
myNewView.layer.borderColor = UIColor.red.cgColor
guard let path = Bundle.main.path(forResource: "CV", ofType: "pdf") else { return }
let url = URL(fileURLWithPath: path)
let document = PDFDocument(url: url)
myNewView.document = document
// Add UIView as a Subview
self.view.addSubview(myNewView)
}
}
Build succeeds. But I get the below.
2019-06-13 17:49:35.702174+0100 Appp[81235:19343962] * Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
* First throw call stack:
(
0 CoreFoundation 0x00000001083446fb exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000106250ac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000108344555 +[NSException raise:format:] + 197
3 QuartzCore 0x000000010b4072ae _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 140
4 QuartzCore 0x000000010b3f668b -[CALayer setPosition:] + 57
5 QuartzCore 0x000000010b3f6de3 -[CALayer setFrame:] + 560
6 PDFKit 0x0000000107135097 -[PDFPageLayerTile initWithFrame:forPageLayer:withRenderingTransform:tileContentsScale:generationID:] + 168
7 PDFKit 0x000000010713a805 -[PDFPageLayer _updateTiles] + 3439
8 PDFKit 0x0000000107135d8e -[PDFPageLayer setNeedsTilesUpdate] + 87
9 PDFKit 0x000000010714a97d -[PDFPageView setNeedsTilesUpdate] + 48
10 PDFKit 0x000000010714c816 -[PDFPageView setFrame:] + 334
11 PDFKit 0x000000010714311c -[PDFDocumentView createPageViewForPageAtIndex:] + 764
12 PDFKit 0x0000000107144326 -[PDFDocumentView updateVisibility] + 1726
13 PDFKit 0x00000001071b376f -[PDFView resizeDisplayView:] + 517
14 PDFKit 0x00000001071accdf -[PDFView layoutDocumentView] + 464
15 PDFKit 0x00000001071a836a -[PDFView setDocument:waitDuration:] + 1246
16 Appp 0x000000010596c4d1 $s7Appp14ViewControllerC11viewDidLoadyyF + 1441
17 Appp 0x000000010596c7b4 $s7Appp14ViewControllerC11viewDidLoadyyFTo + 36
18 UIKitCore 0x000000010d0ec43b -[UIViewController loadViewIfRequired] + 1183
19 UIKitCore 0x000000010d0ec868 -[UIViewController view] + 27
20 UIKitCore 0x000000010d724c33 -[UIWindow addRootViewControllerViewIfPossible] + 122
21 UIKitCore 0x000000010d725327 -[UIWindow _setHidden:forced:] + 289
22 UIKitCore 0x000000010d737f86 -[UIWindow makeKeyAndVisible] + 42
23 UIKitCore 0x000000010d6e7f1c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4555
24 UIKitCore 0x000000010d6ed0c6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
25 UIKitCore 0x000000010cf326d6 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
26 UIKitCore 0x000000010cf3afce +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
27 UIKitCore 0x000000010cf322ec -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
28 UIKitCore 0x000000010cf32c48 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
29 UIKitCore 0x000000010cf30fba __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
30 UIKitCore 0x000000010cf30c71 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
31 UIKitCore 0x000000010cf359b6 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
32 UIKitCore 0x000000010cf36610 _performActionsWithDelayForTransitionContext + 100
33 UIKitCore 0x000000010cf3571d -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
34 UIKitCore 0x000000010cf3a6d0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
35 UIKitCore 0x000000010d6eb9a8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
36 UIKitCore 0x000000010d2a2dfa -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
37 FrontBoardServices 0x00000001135df125 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
38 FrontBoardServices 0x00000001135e8ed6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
39 FrontBoardServices 0x00000001135e8700 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
40 libdispatch.dylib 0x00000001096d7db5 _dispatch_client_callout + 8
41 libdispatch.dylib 0x00000001096db2ba _dispatch_block_invoke_direct + 300
42 FrontBoardServices 0x000000011361a146 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30
43 FrontBoardServices 0x0000000113619dfe -[FBSSerialQueue _performNext] + 451
44 FrontBoardServices 0x000000011361a393 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
45 CoreFoundation 0x00000001082abbe1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
46 CoreFoundation 0x00000001082ab463 __CFRunLoopDoSources0 + 243
47 CoreFoundation 0x00000001082a5b1f __CFRunLoopRun + 1231
48 CoreFoundation 0x00000001082a5302 CFRunLoopRunSpecific + 626
49 GraphicsServices 0x00000001107c62fe GSEventRunModal + 65
50 UIKitCore 0x000000010d6eeba2 UIApplicationMain + 140
51 Appp 0x000000010596f68b main + 75
52 libdyld.dylib 0x000000010974c541 start + 1
53 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
If you move myNewView.document = document to viewDidAppear: instead of viewDidLoad, the document will load without issue.
Unfortunately, there were changes to iOS between 12.1 and 12.2 that make this necessary.

What does this error (NSInvalidArgumentException) mean?

Got this error for a Tetris game that I'm making. Not really sure how to upload the Xcode project to GitHub as I get denied as I don't have access so sorry for no context. None of this error seems to actually make sense to me, its just a random collection of numbers and some recognisable phrases like 'SpriteKit' or 'UIKit'.
2017-05-15 10:09:10.942 Tetris[2258:77198] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Setting this node as parent would create a loop: <SKNode> name:'(null)' position:{6, -6} scale:{1.00, 1.00} accumulatedFrame:{{12, -412}, {200, 400}}'
*** First throw call stack:
(
0 CoreFoundation 0x000000010fa4dd4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010cacb21e objc_exception_throw + 48
2 CoreFoundation 0x000000010fab72b5 +[NSException raise:format:] + 197
3 SpriteKit 0x000000010cfe3134 -[SKNode(setParent) setParent:] + 87
4 SpriteKit 0x000000010cfdc376 -[SKNode insertChild:atIndex:] + 230
5 SpriteKit 0x000000010cfdc26f -[SKNode addChild:] + 68
6 Tetris 0x000000010c4bafe0 _TFC6Tetris9GameScenecfT4sizeVSC6CGSize_S0_ + 1376
7 Tetris 0x000000010c4bb080 _TFC6Tetris9GameSceneCfT4sizeVSC6CGSize_S0_ + 64
8 Tetris 0x000000010c4c23f2 _TFC6Tetris18GameViewController11viewDidLoadfT_T_ + 274
9 Tetris 0x000000010c4c3222 _TToFC6Tetris18GameViewController11viewDidLoadfT_T_ + 34
10 UIKit 0x000000010d368a3d -[UIViewController loadViewIfRequired] + 1258
11 UIKit 0x000000010d368e70 -[UIViewController view] + 27
12 UIKit 0x000000010d2324b5 -[UIWindow addRootViewControllerViewIfPossible] + 71
13 UIKit 0x000000010d232c06 -[UIWindow _setHidden:forced:] + 293
14 UIKit 0x000000010d246519 -[UIWindow makeKeyAndVisible] + 42
15 UIKit 0x000000010d1bef8d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4818
16 UIKit 0x000000010d1c50ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
17 UIKit 0x000000010d1c226d -[UIApplication workspaceDidEndTransaction:] + 188
18 FrontBoardServices 0x0000000116a4b6cb __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
19 FrontBoardServices 0x0000000116a4b544 -[FBSSerialQueue _performNext] + 189
20 FrontBoardServices 0x0000000116a4b8cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
21 CoreFoundation 0x000000010f9f2761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x000000010f9d798c __CFRunLoopDoSources0 + 556
23 CoreFoundation 0x000000010f9d6e76 __CFRunLoopRun + 918
24 CoreFoundation 0x000000010f9d6884 CFRunLoopRunSpecific + 420
25 UIKit 0x000000010d1c0aea -[UIApplication _run] + 434
26 UIKit 0x000000010d1c6c68 UIApplicationMain + 159
27 Tetris 0x000000010c4c858f main + 111
28 libdyld.dylib 0x00000001109fd68d start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Adapted from the Official Documentation, NSInvalidArgumentException is:
Name of an exception that occurs when you pass an invalid argument to
a method, such as a nil pointer where a non-nil object is required.
It should also has a reason of why it occurred.
Referring to your case the reason is:
Setting this node as parent would create a loop:
name:'(null)' position:{6, -6} scale:{1.00, 1.00}
accumulatedFrame:{{12, -412}, {200, 400}}
Trying to debug the crashed scene, the reason should be clear enough for detecting what is the reason of causing the crash.

X code7 error trying to do PageViewController

In my main storyboard i have my firstViewController then secondViewController and my pageViewController is third.
I am connecting all of them using seque Modal.
First and Second is working but my third is showing me an error.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x7fb15bca4dd0>) doesn't contain a view controller with identifier 'FirstViewController''
*** First throw call stack:
(
0 CoreFoundation 0x0000000108ba7f65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010aa62deb objc_exception_throw + 48
2 UIKit 0x0000000109ccc5d4 -[UIStoryboard instantiateInitialViewController] + 0
3 0x00000001089b422d _TFC8test23SkillPageViewControllerP33_B1A346F97B9DE8BA73F8676576C06E1324newColoredViewControllerfS0_FSSCSo16UIViewController + 365
4 0x00000001089b65cc _TFFC8test23SkillPageViewControllerg22orderedViewControllersGSaCSo16UIViewController_U_FT_GSaS1__ + 92
5 0x00000001089b2f75 _TFC8test23SkillPageViewControllerg22orderedViewControllersGSaCSo16UIViewController_ + 325
6 0x00000001089b3229 _TFC8test23SkillPageViewController11viewDidLoadfS0_FT_T_ + 313
7 0x00000001089b35e2 _TToFC8test23SkillPageViewController11viewDidLoadfS0_FT_T_ + 34
8 UIKit 0x0000000109775931 -[UIViewController loadViewIfRequired] + 1344
9 UIKit 0x0000000109775c7d -[UIViewController view] + 27
10 UIKit 0x0000000109edbb2c -[_UIFullscreenPresentationController _setPresentedViewController:] + 87
11 UIKit 0x000000010974603a -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 133
12 UIKit 0x00000001097885c4 -[UIViewController _presentViewController:withAnimationController:completion:] + 3930
13 UIKit 0x000000010978b878 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 489
14 UIKit 0x000000010978b387 -[UIViewController presentViewController:animated:completion:] + 179
15 UIKit 0x0000000109ce2af3 __67-[UIStoryboardModalSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 243
16 UIKit 0x0000000109cd1189 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 460
17 UIKit 0x0000000109cd0f8c -[UIStoryboardSegueTemplate _perform:] + 82
18 UIKit 0x0000000109cd1250 -[UIStoryboardSegueTemplate perform:] + 156
19 UIKit 0x00000001095ec1fa -[UIApplication sendAction:to:from:forEvent:] + 92
20 UIKit 0x0000000109750504 -[UIControl sendAction:to:forEvent:] + 67
21 UIKit 0x00000001097507d0 -[UIControl _sendActionsForEvents:withEvent:] + 311
22 UIKit 0x000000010974f906 -[UIControl touchesEnded:withEvent:] + 601
23 UIKit 0x0000000109656aa3 -[UIWindow _sendTouchesForEvent:] + 835
24 UIKit 0x0000000109657691 -[UIWindow sendEvent:] + 865
25 UIKit 0x0000000109609752 -[UIApplication sendEvent:] + 263
26 UIKit 0x00000001095e4fcc _UIApplicationHandleEventQueue + 6693
27 CoreFoundation 0x0000000108ad40a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
28 CoreFoundation 0x0000000108ac9fcc __CFRunLoopDoSources0 + 556
29 CoreFoundation 0x0000000108ac9483 __CFRunLoopRun + 867
30 CoreFoundation 0x0000000108ac8e98 CFRunLoopRunSpecific + 488
31 GraphicsServices 0x000000010e099ad2 GSEventRunModal + 161
32 UIKit 0x00000001095ea676 UIApplicationMain + 171
33 0x00000001089ba10d main + 109
34 libdyld.dylib 0x000000010b58192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
It is a hard guess because you didn't provide any of you code, but as the error state,
You need to set identifier for the view controller you used,in Storyboard > ViewController(one you added to storyboard,I think it is FirstViewController)>attribute inspector
there something called storyboard identifier or something like this, you need to set it. as I see you need to name it "FirstViewController"
I think you are skipping some main steps of configuring a pageviewcontroller, there is a very good tutorial here
it would be very helpful, if you check this tutorial

SIGABRT Error swift

Could anyone help me understand why Im getting this error? It seems to be happening when I load one of my view controllers but I can't see why.
What usually causes an error like this?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextInputTraits length]: unrecognized selector sent to instance 0x7fbf924828a0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010664ac65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000105f27bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001066520ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001065a813c ___forwarding___ + 988
4 CoreFoundation 0x00000001065a7cd8 _CF_forwarding_prep_0 + 120
5 libswiftCore.dylib 0x0000000107ddf728 _TTSf4g_d___TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 120
6 libswiftCore.dylib 0x0000000107dc01a3 _TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 19
7 Project1 0x00000001054ec3bd _TToFC8ASA_Rank22SettingsViewControllers9ASANumberSS + 61
8 Foundation 0x0000000105abdb53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
9 CoreFoundation 0x0000000106592d50 -[NSArray makeObjectsPerformSelector:] + 224
10 UIKit 0x0000000106d1b4eb -[UINib instantiateWithOwner:options:] + 1506
11 UIKit 0x0000000106b736d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
12 UIKit 0x0000000106b73cc8 -[UIViewController loadView] + 109
13 UIKit 0x0000000106b73f39 -[UIViewController loadViewIfRequired] + 75
14 UIKit 0x0000000106b743ce -[UIViewController view] + 27
15 UIKit 0x000000010710132d -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
16 UIKit 0x0000000106b4ed69 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
17 UIKit 0x0000000106b80248 -[UIViewController _presentViewController:withAnimationController:completion:] + 1761
18 UIKit 0x0000000106b826c1 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
19 UIKit 0x0000000106b825e5 -[UIViewController presentViewController:animated:completion:] + 229
20 UIKit 0x0000000106a44d62 -[UIApplication sendAction:to:from:forEvent:] + 75
21 UIKit 0x0000000106b5650a -[UIControl _sendActionsForEvents:withEvent:] + 467
22 UIKit 0x0000000106b558d9 -[UIControl touchesEnded:withEvent:] + 522
23 UIKit 0x0000000106a91958 -[UIWindow _sendTouchesForEvent:] + 735
24 UIKit 0x0000000106a92282 -[UIWindow sendEvent:] + 682
25 UIKit 0x0000000106a58541 -[UIApplication sendEvent:] + 246
26 UIKit 0x0000000106a65cdc _UIApplicationHandleEventFromQueueEvent + 18265
27 UIKit 0x0000000106a4059c _UIApplicationHandleEventQueue + 2066
28 CoreFoundation 0x000000010657e431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x00000001065742fd __CFRunLoopDoSources0 + 269
30 CoreFoundation 0x0000000106573934 __CFRunLoopRun + 868
31 CoreFoundation 0x0000000106573366 CFRunLoopRunSpecific + 470
32 GraphicsServices 0x000000010a1e0a3e GSEventRunModal + 161
33 UIKit 0x0000000106a438c0 UIApplicationMain + 1282
34 Project1 0x00000001054f70c7 main + 135
35 libdyld.dylib 0x0000000108530145 start + 1
36 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Please ask for any other informations that is helpful
Thanks
You most likely have an Outlet assigned to an element on the view controller you are transitioning to that is no longer connected to your code. This youtube video explains it in more detail.
To hunt down this issue, try right-clicking on all your elements (UILabels, UIViews, UIButton...) with the assistant editor open and cross check to see if the outlet name is referenced in the view controller.

SIGABRT error Objective C

I have tried to do various things to fix this SIGABRT error, I know it's very common but I can't seem to figure it out. Here is my error:
2013-10-09 22:16:41.277 Tap![4895:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<gameViewController 0x9944780> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tapAction.'
*** First throw call stack:
(
0 CoreFoundation 0x017365e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014b98b6 objc_exception_throw + 44
2 CoreFoundation 0x017c66a1 -[NSException raise] + 17
3 Foundation 0x0117ac2e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010e6f3b _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010e6493 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0114894a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004cdcd5 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x014cb7d2 -[NSObject performSelector:] + 62
9 CoreFoundation 0x01731b6a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004cc82e -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x0075f38f -[UIStoryboard instantiateViewControllerWithIdentifier:] + 220
12 UIKit 0x0075f988 -[UIStoryboardSegueTemplate _perform:] + 88
13 UIKit 0x0075fa59 -[UIStoryboardSegueTemplate perform:] + 115
14 libobjc.A.dylib 0x014cb874 -[NSObject performSelector:withObject:withObject:] + 77
15 UIKit 0x0022dc8c -[UIApplication sendAction:to:from:forEvent:] + 108
16 UIKit 0x0022dc18 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
17 UIKit 0x003256d9 -[UIControl sendAction:to:forEvent:] + 66
18 UIKit 0x00325a9c -[UIControl _sendActionsForEvents:withEvent:] + 577
19 UIKit 0x00324d4b -[UIControl touchesEnded:withEvent:] + 641
20 UIKit 0x0026b0cd -[UIWindow _sendTouchesForEvent:] + 852
21 UIKit 0x0026bd34 -[UIWindow sendEvent:] + 1232
22 UIKit 0x0023fa36 -[UIApplication sendEvent:] + 242
23 UIKit 0x00229d9f _UIApplicationHandleEventQueue + 11421
24 CoreFoundation 0x016bf8af __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
25 CoreFoundation 0x016bf23b __CFRunLoopDoSources0 + 235
26 CoreFoundation 0x016dc30e __CFRunLoopRun + 910
27 CoreFoundation 0x016dbb33 CFRunLoopRunSpecific + 467
28 CoreFoundation 0x016db94b CFRunLoopRunInMode + 123
29 GraphicsServices 0x036879d7 GSEventRunModal + 192
30 GraphicsServices 0x036877fe GSEventRun + 104
31 UIKit 0x0022c94b UIApplicationMain + 1225
32 Tap! 0x00003add main + 141
33 libdyld.dylib 0x01d72725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have looked at the related classes and they do not have any problem. This problem occurs when I try to use a Segue.