iPhone Application Developer – iPhone Developer Labs – iPhone Application Development

iPhone application developer resource – application development, updates & news for iphone developers

Posts Tagged ‘iPhone OS 3.0 issues’

Memory Issues in iPhone OS 3.0 : Sample Code

August 26th, 2009 by Ravi Korukonda 2 comments »

As mentioned in a previous article by Rama Krishna the memory issues in iPhone OS 3.0 relating to UIImageView can be reproduced easily. And here is such a re-production. You can download the iPhone sample application and see for yourself what the problem is. Just open the project, build it for the device (not the simulator) and run it with Instruments (ObjectAlloc) to see a nice little upwards running ramp developing on screen.

Oh!! but remember to run the app on iPhone OS 3.0 and not on iPhone OS 3.1 (the bug has apparently been patched for this version)

Tags: iPhone App Developers, iPhone app Developers help, iPhone Application sample code, iPhone OS 3.0, iPhone OS 3.0 issues, iPhone OS Bugs

Apple at it again!!

August 19th, 2009 by Rama Krishna 3 comments »

Apple’s release of iPhone OS 3.0 was eagerly awaited by the iPhone developer as well as the user community alike. But since it has been released I haven’t been able to get a good night’s sleep, not because of the cool new features it had using which I could create new exiting applications, but because of the bugs it has in it’s new iPhone OS 3.0.

Ever since Apple has released the new iPhone OS, I have been looking around for a fix to the problem I have seen with UIImageViews. Frantically “Google”ing for a fix, searching Apple iPhone Documentation again and again just to see if I have missed anything in the Release Notes and Change Logs of the iPhone SDK for UIImageView have not yielded any result. My self imposed deadlines to update all my apps for iPhone OS 3.0 have been breached and a resolution was not in sight.

The bug in UIImageView was its memory usage. As long as an image on screen is left alone after being created, nothing happens. But if you have any sinister designs on your mind, of moving/resizing the image on screen memory usage starts increasing. And there is no way you could do anything to bring the memory usage down, even releasing the image view object does not work.

And the most important finding in this issue is that “there are no memory leaks”. All the memory allocated is always being used!! That is what I had to believe, but performance of my applications on iPhone was rapidly falling down with the amount of time spent on it. Clearly indicating to me that there was something odd with the new iPhone OS.

A detailed bug report that I sent to Apple received a reply stating

This is due to a bug in the graphics system that mis-reports how it is allocating memory to ObjectAlloc, which causes it to display memory usage as continuously increasing.
If you attach the Memory Monitor instrument to your sample application, you will find that the Real Memory usage stays constant through out the application’s execution, indicating that while ObjectAlloc believes memory usage is increasing, it really is not.

For a couple of days, I was devastated at receiving that reply. So, no way out for me from this situation? Are all my app users going to give me bad ratings for no fault of mine?

Fortunately, I received another e-mail from Apple Support acknowledging that

this is a known issue, which is currently being investigated by engineering

Obviously someone else has already reported the issue, but the above response is only a “consolation prize” for me and nothing in the equation between me and my application purchasers changed. They are still going to complain that my apps are resource hogging and give them bad ratings.

This issue seems to be fixed in iPhone OS 3.1 and beyond, but the damage is already done!! Will all iPhone/iPodTouch users update their devices promptly?

Hope your applications are not plagued with these problems, and/or you have found an alternative to overcome this problem.

Happy programming!!

Tags: iPhone App Development, iPhone OS, iPhone OS 3.0 issues, iPhone OS Bugs
© 2011 iPhone Application Developer – iPhone Developer Labs – iPhone Application Development
iPhone Development Labs, iPhone Development Help, iPhone Development Tips
Back to Top