iOS8 Beta 3 SpriteKit exc_bad_acces when running o

2019-08-10 16:03发布

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.

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.

Here is the place it crashes:

var atlas = SKTextureAtlas(named: "ImageSet")

and that is the log from the device:

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

Thank you

1条回答
可以哭但决不认输i
2楼-- · 2019-08-10 16:37

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.

查看更多
登录 后发表回答