Game Center causing crash in Sprite kit after app entered the background - ios

I have a SpriteKit project in Xcode with Game Center enabled, I have it working where it shows the leaderboards, achievements, and all that stuff works. I found out after submitting it to Apple that it crashes with this error message:
<Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GKLocalPlayerInternal name]: unrecognized selector sent to instance 0x177a4eb0'
*** First throw call stack:
(0x2563cd67 0x32e9bc77 0x2564222d 0x25640109 0x25571938 0x28991bdd 0x26291ed7 0x2c355897 0x2c368d31 0x333fc423 0x333fc40f 0x334071b5 0x25602c41 0x25601361 0x2554e981 0x2554e793 0x2c927051 0x28b40981 0xda63d 0x33437aaf)
It happens when the app enters the background and comes back, sometimes (not always) it crashes.
I have searched my app for GKLocalPlayerInternal with no results, I've seen in my research HERE that this is because of an authentication glitch in iOS 8 with SpriteKit. What am I supposed to do if it really is Apple's fault, as a bug in spriteKit?
If all else fails, is it possible to just tell Game Center to not authenticate at all after it comes back from the background because we know it will crash.
Thanks in advance

Related

libc++abi.dylib: terminating with uncaught exception of type Il2CppExceptionWrapper on restore IAP

I am Usind SDKBOX IAP for my in-app purchases in my app
when I build the app on ipad I am able to successfully purchase an item and everything is fine. When I quit my app and reopen it and then whenever I try to call restore app crashes with the following error.
I am testing on xcode 8.2.1/8.0 and using unity 5.4.2p4/5.5.1p3
free`il2cpp::vm::Exception::Raise:
showing this log when crashed
libc++abi.dylib: terminating with uncaught exception of type Il2CppExceptionWrapper
The type Il2CppExceptionWrapper is used by IL2CPP to throw managed exceptions. So this indicates that your code is causing a managed exception to occur. It is possible to debug the generated C++ code in Xcode to determine why this exception occurs. Check out the following resources we have created:
Blog post discussing how to do this: https://blogs.unity3d.com/2015/05/20/il2cpp-internals-debugging-tips-for-generated-code/
Video of us doing this on stage: https://www.youtube.com/watch?v=s7Ple1G83jc
Slides from the video: https://www.slideshare.net/joncham/il2cpp-debugging-and-profiling

App crashes with BLE under Swift

I am developing a Swift App using Bluetooth LE, that crashes from time to time - not really reproducable.
I get always the same error message but can't find anything to lighten things up.
*** Assertion failure in -[CBUUID initWithData:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreBluetooth/CoreBluetooth-327.1/CBUUID.m:170
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data <> does not
represent a valid UUID'
Does anybody has a idea what the error might be?
Thanks in advance
Reto

ios6 : Crash after launching a video

I'm designing a client-server application that sync and stores files on iOS devices.
Launch of video where OK on iOS<6 but with iOS6 the app crashes and the device returns to the springboard
Debugger says :
2013-05-17 23:01:03.484 MyApp[526:907] Opening a movie : /var/mobile/Applications/1C5ED030-BBC8-4D56-A979-0BD04DCDEF8A/Documents/MyVideo.mp4
2013-05-17 23:01:03.572 MyApp[526:907] * Assertion failure in -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:], /SourceCache/UIKit/UIKit-2380.17/UIWindowController.m:211
2013-05-17 23:01:03.574 MyApp[526:907] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from to while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed'
** First throw call stack:
libc++abi.dylib: terminate called throwing an exception
My app uses dismissModalViewControllerAnimated and presentModalViewControllerAnimated methods (deprecated). I tried to replace theses methods by dismissViewControllerAnimated and presentViewControllerAnimated but the videos are still crashing the app.
Thanks for your help.
PS : VideosViewController.h and .m are here http://github.com/oseres/VideosViewControllerDebug

How to detect reason of "Terminating app due to uncaught exception" error?

I'm working on card game (turn based) and I have one problem. When I'm in the game, I click on home button to exit the game and then I enter the game again and I get this error: Terminating app due to uncaught exception...
How can I detect reason and place of this error? Is there any method or settings in xcode for that?
My Xcode version: 4.5.2
I get this error on my iPhones (4S and 5), bit not when I try on iPhone simulator.
P.S. With PHP errors are simple because for example you get thid: there is an error on line: 45
Update. The error is:
[ViewController interruption:]: unrecognized selector sent to instance 0x1c54d260

iPad app closes after 2 seconds, memory issue?

I made a magazine iPad app so you can scroll through different slides to the left, right, down and up. It's all ready and accepted by the iTunes app store. Problem is, if someone downloads the app it closes directly after 1 seconds of loading.
Weird part is that i installed the app trough xCode and all works without any problems. My guess is that the app takes too much memory. I made a screenshot of the memory instrument:
But how can i release a Srollview if it must be loaded all the time?
Hope someone could push me in the right direction!
I have tested your app on my iPad2 with iOS 5.1.1, and it crash with the following message:
OxygenEvents[97151] <Error>: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x375c388f 0x31638259 0x375c3789 0x375c37ab 0x309de54d 0x309de6bb 0x309de423 0x3096f001 0x308dd3c7 0x307bac59 0x30730c17 0x10d5d5 0x30730c8b 0x109beb 0x30730c8b 0x3072f461 0x30721e87 0x307927d5 0x10960b 0x3072fcab 0x307297dd 0x306f7ac3 0x306f7567 0x306f6f3b 0x3771322b 0x37597523 0x375974c5 0x37596313 0x375194a5 0x3751936d 0x3072886b 0x30725cd5 0x10944f 0xf0050)
It is because you use "Autolayout" in your Interface Builder files (nib / xib files), which is an iOS 6.0 only feature.
To solve this, either disable Autolayout in all your xib files like this:
or simply make your app iOS 6.0 only by setting deployment target as iOS 6.0

Resources