App built with Xcode 8 beta 6 crashes on iOS 8

When I build my app with Xcode 8 (beta 6) and run it on an iOS 8.x device OR simulator, I get strange EXC_BAD_ACCESS crashes during app startup or a few seconds after the app launched. The crash always happens in a different spot (adding a subview, [UIImage imageNamed:], app delegate's main method etc). I don't get those crashes when I run it on iOS 9 or 10 and I don't get them when I **build** with Xcode 7 and run on iOS 8. I know this is a long shot, but has anyone else experiences something similar? Is this a known issue with Xcode 8?


Thank you very much!


- Johannes

Running into the same scenario.

Exact same issue.


I run an app on Iphone running on ios 9.3, no problem. I try to run it on Ipad running ios 8.3, crashes in the same way. The Xcode log are non-existent, so can't sort it out.
I guess the fact Xcode 8 is in Beta is one of the reason though :/

I ran into the similar problem. Build from XCode 8 works find on iOS 9.3+, but crahsed randomly on iOS 9.2-. Has anybody found the root cause of the issue and solution?

same issue with Xcode 8 GM

Thanks. However, our crash is all over the places, sometime when there isn't any loading of image asset. do you think the loading image asset caused memory corrupt which leads these "random" crashes?

I seem to be running into the same issue as well. My app seems to crash on iOS 9 when built with Xcode 8 GM.

Any updates on this one? We're having it too.

We had the same problem with our project, random crashes when starting the app (usually in a UIImage imageNamed call or when adding views to a tab bar controller).

In our case, it seems to be related to the deployment target of our target (NOT the deployment target of our project!!!)

When I set my targets deployment target to 8.0 we don't have any crashes but when we set it to 8.4 it crashes randomly on startup...

So for now we leave the deployment target set to 8.0 (for both the project and the targets in the project)... I hope is solves it permantly for us...

This worked for me too. Thanks!

Same problem. App is randomly crashing on iOS 8.4 when compiled using XCode 8 GM. Crashing on random places such as UIImage(named:), App delegate methods with EXC_BAD_ACCESS. Only specific log message I found is "incorrect checksum for freed object".


Changing deployment target did not help. Neither changing to different code optimization level in Build settings.


Issue submitted to bugreport.apple.com

This looks working for me also! (Although I should test more)


In my case, random crashes usually occur in UIPageViewController.setViewControllers(_:direction:animated:completion:), which view controllers have UITableView in their view hierarcy.

I have changed the build target down to 8.2 from 8.4, and then the random crashes don't seem to occur 🙂


----

I also tested changing build target up to 8.3 from 8.2, they occured again. So, I'm guessing my phenomenon might be caused by the difference between iOS 8.2 and iOS 8.3.


https://developer.apple.com/library/content/releasenotes/General/iOS83APIDiffs/

https://www.quora.com/What-is-the-basic-difference-between-iOS-8-2-and-iOS-8-3-beta

Running into same issue on running with Xcoed 8(NOT GM) in ios 8 simulators. Random crashes at UIImage imageNamed, fontWithSize, addConstraints,etc


Anyone found the solution?

Same problem here. This will keep us from shipping an update to our app if it doesn't get fixed.


Even this code crashes on simulator and device running iOS 8 when running from Xcode 8 GM:


let testDict = ["blah": "thing"]

print("testDict: \(testDict)")

I'm seeing it too - but not in all apps. I have one app that has a lot of database (FMDatabase) code in it & I can't get it to run on iOS 8.1, 8.2 or 8.3 - it crashes in random places with an EXC_BAD_ACCESS error - however it runs fine on iOS 9.3.


I have another app that is a relatively simple Tic-Tac-Toe game & it runs fine on iOS 8.1 & up.


Both apps were originally written in Swift 2 & have been updated to Swift 3.


- Colin.

I filed a radar on this issue:

rdar://28340074

Xcode 8 Produces Binary That Crashes on iOS 8 and 9 But Not 10


I reduced it to a new sample project that only prints a string literal in AppDelegate's didFinishLaunching, and it crashes on that line. It'll happen if you have also have a class in the target (but never call it at all) that references URLSessionTaskMetrics.

Having the same random crash issue on iOS 8.X with XCode 8 GM 😢, so we still submitted our latest binary that built by XCode 7 and its working fine.

Same here, compiling one of our projects with XCode 8.0 (8A218a) always crashes with EXC_BAD_ACCESS at semi-random places on an iOS 8.3 iPod while XCode 7 produces stable results. No idea how to fix this yet. We're using Swift 2.3 at the moment.

I got it fixed with the comments in the link: http://stackoverflow.com/a/39570973/6858828


One of the asset in my project has an incorrect color space "Adobe (1998)" while all other assets are RGB color space. Changing the asset to RGB color space fixed the issue for me. No more crashes in iOS 8.🙂

Awesome! The Stackoverflow post you linked to with the Bash script worked for us as well!

This solution worked for me too. I didn't use the script, but I found that I had one asset that was using an Adobe (1998) color space, so I manually converted it using GIMP & the app now seems to run fine on my test iPhone 4S running iOS 8.4.

any updates? same issue when building with latest official version of Xcode 8.

EXC_BAD_ACCESS can happen at any line of code, e.g. init a controller from storyboard or init a navigation controller.

Seems it's really related xcode asset catalog, I've fixed the crash issue by removing the P3 assets.

Just released fastlane plugin to workaround this issue.

Hi everybody,


I was under the impression that this bug was fixed in Xcode 8.1, but I still get crash reports that fit my original description. Are you guys still running into this with Xcode 8.1?


Thanks!


Johannes

App built with Xcode 8 beta 6 crashes on iOS 8
 
 
Q