2016-10-04 19 views
0

私はSwiftの新機能です。新しいIOSリリースの前に、私のゲームはAppleの店で働いていました。これで正常にビルドできますが、[スタート]ボタンをクリックすると失敗します。 私のコードに間違いが見つかりませんでした。Xcode 8にアップグレードした後、マイゲームが機能しなくなりました

以下の例外を確認してください: -

例外 'NSInvalidArgumentException'、理由: 'SKAction animateWithTextures:テクスチャ配列を空にすることはできません' ***まずスローコールスタック: ( 0 CoreFoundationの0x0000000109cca34b exceptionPreprocess + 171 1 libobjc.A。dylib 0x00000001093c521e objc_exception_throw + 48 2 CoreFoundationの0x0000000109d33265 + [NSExceptionレイズ:フォーマット:] + 197 3 SpriteKitベース0x000000010a7e1f81 + [SKAnimate animateWithTextures:timePerFrame:リサイズ:リストア:] + 120 4 SpriteKitベース0x000000010a7ddd71 + [SKAction(SKActions)animateWithTextures:timePerFrame :] + 29 5 TwistyPlane 0x0000000108dc3aea _TFC11TwistyPlane9GameScenecfT5coderCSo7NSCoder_GSqS0 + 906 6 TwistyPlane 0x0000000108dc3c0d _TToFC11TwistyPlane9GameScenecfT5coderCSo7NSCoder_GSqS0__ + 45 7財団0x0000000108e95f12 _decodeObjectBinary + 2622 8財団0x0000000108e953c6 _decodeObject + 249 9 SpriteKitベース0x000000010a84126b + [SKNodeのNOD eWithFileNamed:] + 578 10 TwistyPlane 0x0000000108dc6fdd _TTOFCSo7SKSceneCfT9fileNamedSS_GSqS__ + 77 11 TwistyPlane 0x0000000108dc6d31 _TFC11TwistyPlane18GameViewController11viewDidLoadfT_T_ + 129 12 TwistyPlane 0x0000000108dc7032 _TToFC11TwistyPlane18GameViewController11viewDidLoadfT_T_ + 34 13のUIKit 0x000000010abcf06d - [のUIViewController loadViewIfRequired] + 1258 14のUIKit 0x000000010abcf4a0 - [のUIViewController図】+ 27 15 UIKit 0x000000010b4938d0 - [_ UIFullscreenPresentationController _setPresentedViewController:] + 87 16 UIKit 0x000000010aba9d26 - [UIPresentationController initWithPresentedViewController:presentingViewController:] + 141 17 UIKit 0x000000010abe230b - [UIViewコントローラ_presentViewController:withAnimationController:終了:] + 3956 18のUIKit 0x000000010abe56df - [のUIViewController _performCoordinatedPresentOrDismiss:アニメーション:] + 530 19のUIKit 0x000000010abe51c5 - [のUIViewController presentViewController:アニメーション:終了:] + 179 20のUIKit 0x000000010abea892 - [のUIViewController _showViewController:withAction :送信者:] + 274 21のUIKit 0x000000010b0af1b6 66- [UIStoryboardShowSegueTemplate newDefaultPerformHandlerForSegue:] _ block_invoke + 134 22のUIKit 0x000000010b20840d - [UIStoryboardSegueTemplate _performWithDestinationViewController:送信者:] + 447 23のUIKit 0x000000010b20821d - [UIStoryboardSegueTemplate _perform:] + 82 24のUIKit 0x000000010b2 084df - [UIStoryboardSegueTemplate実行:] + 156 25のUIKit 0x000000010aa2fb88 - [のUIApplication sendAction:に:から:forEvent:] + 83 26のUIKit 0x000000010abb52b2 - [するuicontrol sendAction:全forEvent:] + 67 27のUIKit 0x000000010abb55cb - [するuicontrol _sendActionsForEvents:withEvent:] + 444 28のUIKit 0x000000010abb44c7 - [するuicontrol touchesEnded:withEvent:] + 668 29のUIKit 0x000000010aa9d0d5 - [UIWindow _sendTouchesForEvent:] + 2747 30のUIKit 0x000000010aa9e7c3 - [UIWindowのSendEvent:] + 4011 31のUIKit 0x000000010aa4ba33 - [UIApplication sendEvent:] + 371 32 UIKit 0x000000010b23db6d __dispatchPreprocessedEventFromEventQueue + 3248 33 UIKit 0x000000010b236 817 __handleEventQueue + 4879 34 CoreFoundationの0x0000000109c6f311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 35 CoreFoundationの0x0000000109c5459c __CFRunLoopDoSources0 + 556 36 CoreFoundationの0x0000000109c53a86 __CFRunLoopRun + 918 37 CoreFoundationの0x0000000109c53494 CFRunLoopRunSpecific + 420 38 GSEventRunModal + 161 39のUIKit 0x000000010aa2df34 UIApplicationMain + 159 40 TwistyPlane 0x000000010ff39a6f GraphicsServices 0x0000000108dc956f main + 111 41 libdyld.dylib 0x000000010dceb68d start + 1 ) libC++ abi。dylib:タイプのキャッチされない例外NSException で終了する(lldb)

+1

これをさらに絞り込んで手助けをする必要があります。これは、コードのどこかでanimateWithTexturesを呼び出すと問題になることがあります。ブレークする前に最後の行にコードをデバッグする必要があります。二度と確認してください。後で見られるものには何の問題もないことを確認し、再度ここに投稿してみてください。 – DreamerNo56

+0

コードプレゼンテーションをフォーマットする必要があります。 – Rob

答えて

1

これは、最初の行にあなたのエラー言う「SKActionのanimateWithTexturesを:テクスチャ配列を空にすることはできません」あなたのコードをチェックして、この苦情が満たされることを確認。データを呼び出すために空の配列を使用しているかのように表示されます。そして、何も返ることがないので、プログラムがクラッシュします。それは私が見るものです。

関連する問題