iOS8 Beta 3 SpriteKit exc_bad_acces 在设备上运行时 [英] iOS8 Beta 3 SpriteKit exc_bad_acces when running on device

查看:27
本文介绍了iOS8 Beta 3 SpriteKit exc_bad_acces 在设备上运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 SwiftSpritekit 中开发一个应用程序.该应用程序在设备和模拟器中运行良好,直到我更新到 Xcode 6 Beata 3 和 iOS 8 Beta 3.当我在模拟器中运行该应用程序时,一切仍然完美无缺.但是,当我创建 SKTextureAtlas 时,在设备上运行应用程序会导致 exc_bad_acces.有没有人面临类似的问题,或者任何人都可以帮助我解决这个问题.

I am currently developing an app in Spritekit with Swift. The app worked perfectly on device and in the simulator until I updated to Xcode 6 Beata 3 and iOS 8 Beta 3. When I run the app in the simulator everything still works perfect. But running the app on the device causes a exc_bad_acces when I create a SKTextureAtlas. Is anyone facing a similar problem or can anyone help me how to solve this.

我已经尝试在装有 iOS8 Beta 2 的设备上运行它,但我在这里遇到了同样的错误.我也删除了该应用程序,但这也没有解决我在设备上运行该应用程序时的问题.

I've alredy tried to run it on a device with iOS8 Beta 2 but I run into the same error here. I also deleted the app but that also didn't solve my problem when running the app on a device.

这是它崩溃的地方:

var atlas = SKTextureAtlas(named: "ImageSet")

这是来自设备的日志:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xfffffffc
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswift_stdlib_core.dylib      0x003a737e 0x286000 + 1184638
1   My Game                         0x000f6900 Swift._doesImplicitlyUnwrappedOptionalHaveValue <A>(@inout A!) -> Builtin.Int1 (ComputerPlayer.swift:0)
2   My Game                         0x0011c0a0 @!objc ObjectiveC.SKTextureAtlas.__allocating_init (ObjectiveC.SKTextureAtlas.Type)(named : Swift.String!) -> ObjectiveC.SKTextureAtlas (SpriteKit-1CMA4777KYE20.pcm:1)
3   My Game                         0x0010e010 My_Game.GameScene.didMoveToView (My_Game.GameScene)(ObjectiveC.SKView) -> () (GameScene.swift:132)
4   My Game                         0x00113218 @objc My_Game.GameScene.didMoveToView (My_Game.GameScene)(ObjectiveC.SKView) -> () (GameScene.swift:0)
5   SpriteKit                       0x2e6d6340 SKGenerateNormalMap + 65680
6   SpriteKit                       0x2e6f02de SKGenerateNormalMap + 172078
7   My Game                         0x0011fd38 My_Game.GameViewController.viewWillLayoutSubviews (My_Game.GameViewController)() -> () (GameViewController.swift:71)
8   My Game                         0x00121468 @objc My_Game.GameViewController.viewWillLayoutSubviews (My_Game.GameViewController)() -> () (GameViewController.swift:0)
9   UIKit                           0x2e844266 0x2e837000 + 53862
10  QuartzCore                      0x2e2804c0 CABackingStoreGetTypeID + 892
11  QuartzCore                      0x2e27bea0 CARenderServerGetServerPort + 5364
12  QuartzCore                      0x2e27bd28 CARenderServerGetServerPort + 4988
13  QuartzCore                      0x2e27b70c CARenderServerGetServerPort + 3424
14  QuartzCore                      0x2e27b510 CARenderServerGetServerPort + 2916
15  UIKit                           0x2eaa6cf8 _UIApplicationIsExtension + 4936
16  UIKit                           0x2eaa79e0 _UIApplicationIsExtension + 8240
17  UIKit                           0x2eab1a68 _UIApplicationUsesAlternateUI + 38388
18  UIKit                           0x2eaa5ec8 _UIApplicationIsExtension + 1304
19  FrontBoardServices              0x319bd04e _FBSLog + 2198
20  CoreFoundation                  0x2b1692d2 CFRunLoopTimerSetTolerance + 5878
21  CoreFoundation                  0x2b168594 CFRunLoopTimerSetTolerance + 2488
22  CoreFoundation                  0x2b166d16 _CFRunLoopGet2b + 2174
23  CoreFoundation                  0x2b0b624c CFRunLoopRunSpecific + 472
24  CoreFoundation                  0x2b0b605e CFRunLoopRunInMode + 102
25  UIKit                           0x2e8ab5ba _UISharedImageSetLoadFactor + 3906
26  UIKit                           0x2e8a6844 UIApplicationMain + 1436
27  My Game                         0x0012a940 top_level_code (AppDelegate.swift:0)
28  My Game                         0x0012a97c main (AppDelegate.swift:0)
29  libdyld.dylib                   0x385aaaac _tlv_atexit + 8

谢谢

推荐答案

尝试在项目上运行 Clean,一些人在更新时遇到了访问错误的问题,包括我在内.有些使用干净的方式解决它,有些使用项目的新副本来解决.

Try running Clean on the project, a few people had problems with bad access, me included, when updating. Some resolved it with clean and some withe a fresh copy of the project.

这篇关于iOS8 Beta 3 SpriteKit exc_bad_acces 在设备上运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆