5

We have an app targeting iOS 8.4. It runs fine on iOS 8-10 being built with SDK 9.3. However the builds created by SDK 10.0 running on iOS 8 (Device and Simulator) crash constantly. For example:

malloc: *** error for object 0x79e80c60: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug

This does not happen on iOS 8.4.

We created a new project targeting 8.4 and SDK 10.0 and only added a single failing unit test to the project. Running this project in 8.4 Simulator seems impossible. The test will never be executed and the simulator seems to be in some kind of loop.

Can anyone reproduce this issues with iOS 8 and SDK 10?

Bhadresh Kathiriya
  • 3,147
  • 2
  • 21
  • 41
Christoph
  • 1,965
  • 16
  • 35
  • I am having (what I suspect is) the same issue. Some additional info (in my case anyway): Crash happens on both Simulator/Device. Crash happens sometimes when app starts (still in launch screen), sometimes during a transition (e.g. a VC being pushed in NavigationVC), sometimes when navigating back. I've seen it happen in `initWithCoder` or in `UIImage(named:_)` among other places. Sometimes I get the above-mentioned error, but sometimes I get a `Invalid pointer dequeued from free list` malloc error. – Nikolay Suvandzhiev Sep 23 '16 at 16:21
  • Update (2 points): 1. There are probably multiple causes, but one very likely one has something to do with `UImage(named: )` - I removed all references to that and most crashes stopped. Could it be something to do with the extended-range colour space introduces in iOS 10? 2. Enabling Zombies (in the 'Edit Scheme' menu) prevents all crashes (I'm not familiar enough with memory management to understand what this means). – Nikolay Suvandzhiev Sep 26 '16 at 09:38
  • Thanks for your input, I will try to come up with some project that illustrates these issues in an isolated environment. – Christoph Sep 26 '16 at 13:14

1 Answers1

2

Solved by lowering deployment target to iOS 8.2

Sources: EXC_BAD_ACCESS only on xcode 8 running iOS 8

which links to: https://forums.developer.apple.com/thread/60919

which contains this info:

Update: If your Deployment Target is set to either 8.3 or 8.4 and you have an asset catalog then you will receive this same error message, even if you do not actually have 16-bit or P3 assets. In this case you will either need to lower your Deployment Target to 8.2, or move it up to 9.x.

Also note that someone mentioned that Xcode 8.1 fixes all this. I haven't tested yet myself.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Nikolay Suvandzhiev
  • 8,465
  • 6
  • 41
  • 47
  • Thanks for pointing this out :) First round of testing seems okay! Will accept your answers if we are sure. Thanks again! – Christoph Sep 30 '16 at 07:19
  • Having the same error but lowering target to 8.2 did not solve the problem. Not even on 8.0. It happens mostly on view transactions. Does anyone have an idea? – tmagalhaes Oct 06 '16 at 21:40