Message from debugger:Terminated due to Memory Error

2.2k Views Asked by At

The app work fine on iPhone 6s(iOS 9),however,quit on iPhone 5(iOS8).And all infomation I can get only this:

enter image description here

When Xcode showed this the Xcode exit immediately so I can see nothing in console.

Hope someone can give me some advice to avoid this.Thanks in advance.

3

There are 3 best solutions below

0
Mahendra On

This is happen when there is a lot of memory pressor while our app is running on device(Generally you will not face this issue in simulator).

This method is called when you receive memory warning.

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

In this method you can release any unused resources, objects, etc. to free up memory.

You can use xcode tool called intrument by pressing command + i. There are lot of options available to check memory leaks, memory allocations, etc.

So use memory allocation tool to check allocation and deallocation of memory when your app is running on device.

This will help you to overcome this issue.

1
Sebastian Paduano On

I was facing the same error. To make it stop I had to disable zombies.

Go to project scheme (near simulators) -> Edit Scheme -> Diagnostics tab -> Uncheck Zombie Objects

0
Owen Hartnett On

The fact that it runs on iOS 9 but not iOS 8 may indicate that you are calling a routine that exists only is iOS 9. Put a breakpoint in the first statement of your AppDelegate routine didFinishLaunchingWithOptions, then step through until your app blows up. That should signal which call is causing you the problems.