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. :-)
Related
I am still figuring out why my iPAD with iOS 5 runs out of memory and forces my app to quit.
The same app when i tried to run on iPAD with iOS 4 it runs for more than 1 hour though it crashed later on.
but when i tried to run the same app on iPAD with iOS 5 it crashes in 10-12 minutes.
When i checked the crash logs, I found all the crash were due to low memory.
I wanted to know that does iOS 5 uses more memory, due to which my iPAD 1 runs out of it.?
I have search the same problem on Apple community and found that this same problem persist with other developer also
It would be nice if the problem can be resolved with a patch provided by apple, however I think it has more to do with the memory spec's of the iPad1 vs. iPad2. Clearly IOS 5 isn't optimized for the 256MB of DDR ram that the iPad1 has.
I released an iPhone/iPad app some weeks ago. From 15 reviews (worldwide) I got a dozen 1 star reviews from users saying the app does not work, they only get a blank screen. The other three are happy and it works for them.
I tested the app on an iPad 1, an iPad 2, an iPhone 3GS and several iPhone 4s - it worked on every device flawlessly. And it passed the app store submission process, so it must have worked at Apple...
The crash report in iTunes Connect is empty - the app obviously does not crash, it just hangs somewhere.
Unfortunately there is no way to contact the users where it doesn't work :-(
I know its really hard to help with that less information, but I don't know what to do when I can't replicate the problem on my side...
So does anybody has any idea?
If its a memory problem - shouldn't the app crash then?
I use AVFoundation to play a movie and I know of some flaws since its a relatively new library - does somebody know of this problem (a blank screen) in relation with AVFoundation?
It would be helpful as well if you could download the app (the name is "Hyperactive") and test if you get a blank screen. If so I would be glad to learn the exact device and the iOS version. I hope this is not missunderstood as spam, thats not what I intend...
Thanks in advance,
best regards,
Walchy
This is a longshot, but maybe the user had the application running for a long time, receiving a viewDidUnload, and something you unload is not getting reloaded on the viewDidLoad.
Try running a "Simulate Memory Warning" on the iphone simulator options.
Both iPhone and iPad versions work fine on iPad 1.
Application won't install on iPhone 3G with iOS 4.2.1.
Have you tested your application on a jailbroken device?
It turned out that the black screen only happens on an iPod Touch and the solution is very easy:
You need an additional entry in the .plist file for the iPod Touch:
Main nib file base name ...
iPod Touch 4G thinks it's an iPad
I'm testing my app on an iPhone 4 and iPhone 3GS. It works perfectly on the simulator and the iphone 4 but crashes after several mins of use on the jailbroken 3gs.
On the iphone 3gs, the only apps i've installed are TetherMe and SBSettings.
Can i just assume that the app crashes due to the phone being jailbroken?
No. You cannot assume that an app tested on one device will run on all others.
Your app will have very different amounts of memory available on different devices (and under different OS versions, and with different amounts of background processes running).
The application developed for one version of iOS might not work in another. This is true not only for iOS and iPhone, but for any other application and operating system and/or its version. The difference might me in memory consumption, different API behavior, ABI incompatibility or something else. However, you cannot just assume it is due to jailbreaking. To get the answer as for the crash, you have to run application under the debugger, if possible. Otherwise try to debug it using print statements, for example.
Hope it helps.
the app I've installed on an iPhone 3G device periodically crashes. I'm wondering if it's the device or the code. the code works fine on the simulator.
I have other apps from the app store that do the same thing. e.g. the stackoverflow app - whenever I do a search the app crashes. I've even had the iPod app crash too.
I've restored the phone a few times and still the same thing. I'm getting ready to upload the app to the app store and was wondering if anyone had any tips to make sure that my code is not the problem. it's difficult to tell because there are no errors in the simulator or memory leaks in Instruments
thanks in advance.
You can be guaranteed that it is your code. Run it in the debugger on the device and see where it is crashing. If you are getting EXC_BAD_ACCESS use the following to help track it down
http://www.cocoadev.com/index.pl?NSZombieEnabled
It most certainly is your code that crashes.
Run in debug mode and watch the console (real debug mode, not only the debug target).
Also, you can (and should) grab the crash report from the organizer. You can also watch the device's console there.
Are you sure you are not running out of memory?
the easiest way to see if this is your problem is to implement didReceiveMemoryWarning method of your controllers and check if they are called.
In the simulator you can simulate a memory warning but I am not sure if even in simulator app will crash if memory is not released. (I believe not)
Also run your app with instruments, using allocations: Run > Run with performance tools > Allocations.
And use your app for a while and you will see. ;)
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.