*Crash Bug* XCode iOS GameCenter EXC_BAD_ACCESS

I’m running into a crash bug when attempting to play my game on an iPhone. This one has me totally stumped. Any help would be really appreciated!
Here is what I know:

  • Details: iOS 9, XCode 7, Unity 5.2.0f3
  • The crash does not happen when running the game in Unity.
  • The crash only happens when I instantiate GameCenter
    Social.localUser.Authenticate (ProcessAuthentication);
  • When I comment out this line of code the game runs fine.
  • This is a new version of an already released iOS game.

Screenshot of error message:

Screenshot of Libraries used:

Having the same problem. Have you made any progress?

Running into the same issue. Will update if I find a fix.

Having the exact same problem :confused:

My problem is slightly different, I get the exact same error, but I call “Social.Active.Authenticate”

We have an existing bug and a fix for this issue. It is a bad interaction between Unity Ads and iOS GameCenter. The easiest work around is to disable Unity Ads in the editor and instead use the asset store package. We’re planning to have the fix for this in the next 5.2 patch release.

2 Likes

We also have this problem, even after updating to 5.2.1p2.

@Bruno_Vaz

Unfortunately we did not get this fix in for the 5.2.1p2 release. It is however in the 5.2.1p3 release, which should be out within the next day or two, I think.

Version 5.2.1p3 fixed this issue for me.

I am getting this same error (under the same scenario) in Unity 5.2.1f1 Personal edition.

I finally decided to type randomly into google “unity xcode crash after game center sign on” and I found this post. I’m a little jealous it’s working for cavila and not me. It’s very suspicious because I submitted and then developer removed my project last night, and after, 0 changes to anything related to game center and unity ads, this issue springs up and destroys (easily) 10 hours of my day (from building in xcode and unity, and transferring the project from my pc and so on) with surely more to come.

I checked the unity website for the latest downloads, and it looks like what I have is indeed the latest. (f1).

Seriously, this is cruel.

**edit
Just discovered that P doesn’t stand professional (as F I woulda assumed stood for free), but rather “patch” ? Regardless, I’ve discovered Unity releases patches, yet still allows people to download a dated version with known issues. Isn’t there something just a little bit fundamentally hysterical about that? I mean, especially since the download for this “patch” is the same size as the actual program with the known problems? I can’t for the life of me discover the mindset behind this. It might be because my brain is embarrassingly fried because of the issues this has caused me for, count em, over 12 hours straight. And if I’m wrong, then 2.34GB of data is large for a patch.

@alti

I’m glad you discovered the patch releases. We’ve worked on a few different ways in the past to better ship patch releases in smaller sizes, but we’ve not found anything reliable. So the release is a patch in the sense that it is a small change from the previous patch or feature release, but the download is the entire thing.

I got the patch. It fixed the problem. When first opening xcode I was shown: unexpected code bundle “unity4xc.xcplugin”
I loaded it (going against the default option btw), and everything works fine again. Gotta love spending a day solving unknown issues that are not your fault. Not frustrating at all. It surely never instigates passive aggressive comments either.

@alti

The unexpected code bundle “unity4xc.xcplugin” error is one I’ve seen before as well. I think it has something to do with the a version mismatch in the Xcode project. I’ve been told by our iOS team that choose to load the bundle is correct, and the error is benign.