What does CONNECTION INTERRUPTED mean? - iphone

I've developed an app which runs perfectly on iPhone 4, 4s and iPhone 5. I started getting some reports on crashes on iPod Touch 4G so today I started looking into the problem.
At one of the most memory-demanding viewcontrollers i started noticing "low memory warning" and soon after that it would crash. Thats fine, that made me investigate what causes this.
However now when i reach that particular viewcontroller I just get "CONNECTION INTERRUPTED" in the console and it crashes. Every single time. I tried restarting Xcode and the iPod Touch 4G but it still keeps coming.
What does it mean? And why didnt I experience this from the start when testing on my iPod Touch 4G?

Related

App crashes on iPhone but not on simulator

I'm using XCode 7.0b5 and created an Swift app. It runs fine on simulator but crashes on iPhone 4s when running independently (without cable).
How can identify where it crashes? I read about possible memory issues. I'm reading in a large textfile, so it needs nearly 200 MB of ram. How can I check it?
I think this is a memory problem with the iPhone 4S (200 mb for 4S is a lot). You should read the crash logs in Xcode.
In Xcode with the iPhone connected you can go to Window->Devices, select your phone and press 'View Device Logs'. You will see a list with all the last crashes of the apps and with the information of the crash.
Regards
I got the solution. It is the run time.
I reduced the file sizes to 10% of the original and everything runs fine. So I can test it and "improve" it to the speed limit of the iPhone 4S. :-)

How to optimize memory while running app on iPhone simulator?

I am new iPhone development and my app goes crashed when doing navigation of pages for multiple times in simulator.
In Debug Session when it reaches 50MB, my app goes crashed.
What could be the possible solutions to stop crashing ?

App crashes on device and while using instruments only

I am encountering a strange behaviour, my app runs smoothly on simulator but crashes on device.
Also when i try to detect leaks using instruments it just crashes on both simulator and device.
I am totally stuck as i am not even able to generate any error message on console, also NSZombieEnabled is on in the settings.
I can see two possible reasons for the behavior you describe:
device is short on memory; (but you would see some processing in this case)
your app uses a newer SDK than what you have installed on your device (like using the SDK 5 twitter framework and then running your app on an SDK 4 device).
Specifically, in case 2, you would not see any log messages because the app would fail as soon as it tries to load the missing framework in memory.
In any case, inspect the device log in Xcode Organizer window to have more info about the crash. This is the only way you can understand what is happening.

Debugging ok on iPhone4 but EXC_BAD_ACCESS on iPod Touch and iPhone 3G

I'm developing an app on my Macbook debugging it on my iPhone4. The app make use of camera, internet connections, and normal stuffs.
Today I'm trying to debug it on an iPod Touch 2G and on an iPhone 3G......but it always install the app on the device, it says "running" but before the app il really launched I get a "EXC_BAD_ACCESS".....non message...even NSZombieEnabled didn't work!!
Any help?
Thanks
Check the stacktrace when it crashes then look up the last called function.
It might be a new API function and in that case you must first check for it's existence in the installed iOS version.

iPhone 3G + iOS4 debug problems

I recently updated our test iPhone 3G with the latest version of iOS 4 to be able to test our apps on the new OS. I regret that I didn't read the forums because after the update the device's performance suffered a lot. However this is not a problem because the device still works. The problem is that when I try to debug our app the device freezes for minute and reboots or closes the app and returns to the home screen. When it manages to stop at breakpoint it takes few seconds to step over or out and often there's no debug information about the variables. I assume that this is due to some memory issues because the new OS requires more memory space. I must point out that our app worked fine with the iPhoneOS 3.1.3 and the Xcode 3.2.2 with the 3.2 SDK. It is a Universal app and that runs fine on the iPad too.
I have seen this problem as well when one of my applications was consuming a lot of memory. The background application that handles the remote debugging consumes quite a bit of ram (~15M the last time I had this problem). If your app is fine in standalone mode and crashing under debug then you might be close to the limit running in standalone (as I was).
I noticed that making sure that all other applications were quited or if I rebooted the iPhone that I was able to debug my executable (this was until I found the copied object problem that was causing the memory bloat).
If you have a jailbroken iPhone then you will have other services running consuming memory as well.
the iPad has double the ram 256M than the 3G at 128M.
I have also seen a problem when opening an application with a url encoded with data that runs > 500K that it will crash springboard before your debug session is started with a delayed launch.