CoreGraphics Library Leaking in iOS4 and not iOS3? - iphone

I am using instruments to check for memory leaks in my app.. iOS 3.1.x doesnt show any leaks.
However, when I do the same test on iOS4 iPhone I am getting leaks from CoreGraphics library.
Did anyone had similar problem? is it problem in the OS itself?
Many thanks

With so few details, it's hard to say exactly. I have, however, experienced SDK version-dependent leaks and other misfeatures with iOS code, comparing 3.0 to 3.1 and 3.1 to 4.x. I think the iOS SDKs are relatively buggy compared to what I expected (very polished Apple APIs).

Related

Does build made on xcode 3.2 runs on IOS 5

May be this will be silliest question but users are facing such problems.
Sorry for same.
I have made build on xcode 3.2 which has maximum IOS 4.3 and uploaded on itunes.
Now users which are downloading application having IOS 5.0 says that application is getting crashed or vanished.
So, just want to ask that build made on xcode 3.2 runs on IOS 5.0
Please help.....
Thanks a lot....
The short answer is that you have a bug in your app.
An app compiled for iOS 4.3 should work just fine. However, as with any update to the operating system, ambiguities in API calls are tightened, undocumented behaviours vanish and some APIs become deprecated. Deprecations won't cause problems (yet), though both of the others might.
For this reason you should be testing with new versions as they become available.

Lion + Xcode 4.1 deactivated iOS Simulator 3.x Testing

I searched for days, nothing found, no answer on apple dev forums, I want to be able to test my apps on older versions - on iOS Simulator!
I know - this is not the proper way of testing and not 100% reliable. But I can't afford getting another test-device with older iOS, aaand downgrading my existing devices seems to be a very tough task too - damn sure too tough for me...
Testing on iOS Simulator for 3.x versions will do enough good for those who didn't upgrade to 4.x yet and download my apps.
So please - anyone who was able to reactivate the older iOS Simulator SDKs on Lion / Xcode 4.1? - Don't tell me to set deployment target please :-)
THANKS!
Actually you can install xcode 3.2.x in Lion, and it's will automatic installed in "developer-old" floder. Your xcode 4.1 is still available.
I also want to reactivate the older iOS Simulator SDKs on Lion / Xcode 4.1. ;)
NotMyName posted blow in devforums.apple.com
By reverting back to OS X 10.6.8, and Xcode 4.02, apparently. :-(
Although it is worth noting that the Apple employees posting here have repeated a few times that this is an intended change, and one might guess that either the various simulator versions weren't particularly accurate on their API levels, or that it was just too much work to maintain. I seem to remember there being some bugs in the block implementations at the various levels, for starters.
There's also the often reported mantra, "The simulator is NOT an accurate way of testing your app's behavior."
You can't reactivate the iOS 3.x Simulator, you will need to install an older version of Xcode (one with the iOS 3.x SDK) along side Xcode 4.x (with the iOS 4.x SDK).

UIImagepickercontroller crash in 4.3.3, using older SDK ( 3.2.5)

I'm using UIImagePickercontroller in my app without problems. My SDK version currently is xcode 3.2.5. So far my test devices haven't ran into problems.
One of my testers (at long distance) is experiencing crashes whenever he/she tries to take a picture or choose a picture form the library, after clicking "use" the app crashes. He has IOS 4.3.3 installed. This tester has an 4G iPhone and an iPad, both of them actualized to the latest version, unlike my devices:
iPad 1G with iOS 4.2
iPod 4 with iOS 4.1
iPhone 3G with iOS 4.2.1
The crash doesn't happen on any of my devices.
I realize that i should upgrade my xcode and all my devices soon, but still would like to understand what could be the cause of the crash. I know it's not memory, because my old 3G can choose several pictures without problems, while my tester's iPad and iP4 suffer from consistant crashes every time he tries to select a picture.
Maybe has something to do with HDR ( which i'm not supporting or handling)?, Maybe a deprecated method ?, any important difference that may cause the problem ?.
Any hint or small suggestion to attack the problem is more than welcome. And sorry for my grammar errors.
Thanks !
Updated the devices and the problems are gone.
Really awful and awkward, the problem is solved but i won't ever know what went wrong !

Strange memory leaks when running 'Navigation Based Application' template project

I did a very simple test which was creating a blank project using xCode and execute on device. When executed with Instruments I got memory leaks !
Please note that I am using iPhone 3G device running iOS 4.0.2
Here are the steps to reproduce:
From xCode 3.2.3 Choose File -> New Project -> Navigation-based Application selecting Use Core Data for storage
Choose Device - 4.0 as the build Target
Choose Run -> Run with performance tool -> Leaks
On the iPhone 3G device (running iOS 4.0.2) click the '+' button several times in the launched App.
Here is the Instruments screenshot:
Can anyone confirm this issue?
Thanks,
Joshua
It looks like you're getting leaks related to WebKit (WebCore, JavaScriptCore, etc.). I had the exact same leaks in a few of my projects with iOS 4.0, but the apps still got approved by Apple (because the leaks are not your fault).
The good news? I recently tested these same apps with the 4.1 SDK, and all of my WebKit-related leaks are gone! Since you are using 4.0 I suggest you try the 4.1 SDK to see if they've disappeared.
Cocoa has always had very small leaks in it, and it occasionally has things that look like leaks and aren't really. When looking for leaks, what you are looking for are leaks that grow over time. Seeing a single leak report like this of a few kB is not a cause for concern. If you're running this on the empty template project from Apple, you should open a radar (bugreport.apple.com), since it means that there either is a small but common leak in Cocoa or Instruments is wrong. In either case, it should be fixed, but it's not something to lose sleep over.

iPhone: How to fix a legacy iPhone app which has really bad memory management? unittesting?

I recently inherited an iPhone app. The original developer did not understand memory management and well the app works in simlulator but not in on old iPhone (lots of crashses). Do you have any thoughts on the process by which I can save the app?
Can I utilize or create any unittest to find memory leaks and make the process 'scientific'?
Thanks
Yes! Use Clang! Here is a good tutorial showing the benefits: http://iphonedevelopment.blogspot.com/2009/02/clang-static-analyzer.html
However, it should be installed if you have a newer SDK.
Since the Clang Static Analyzer is now built-in to Xcode on Snow Leopard, it's trivial to use it. Select Build -> Build & Analyze to see any memory problems Clang detects (hint: it will find pretty much all of them).