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

Replies

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.