I've a live application which I've upgraded for iOS 5. I've tested it on my iPod Touch 4G and iPad 2. It works fine without any hiccups.
But, I'm getting report from my users of frequent crash on iPhone 4/4S. I'm not sure what is the problem as its working fine on my devices(iPod Touch 4G-single core+iPad 2-dual core as iPhone 4S).
This is the screen shot of the crash report I pulled form apple:
It would be very helpful if you could explain the cause or advice me how to go about solving it.
Thanks in advance!!
Last edited by dreamer11; 02-07-2012 at 12:34 PM.
Reason: adding something to the title
Thanks for the reply. Unfortunately, it didn't happen on my devices when i'm testing in xcode. and from the apple no reports are there for download(even for option where there's download button). I'll check the dealloc once again from the start.
Can u tell what can be possible reasons for the first crash reason?
Quote:
Originally Posted by Music Man
There is a few messages about dealloc so it may be due to you implementing bad memory management such as releasing objects too early etc.
Can you provide one of the reports as it's quite difficult to understand what's happening by just looking at a little bit of information?
I had the same problem with one of my apps. Worked perfectly on simulator and iphone ios 4 device but was crashing on ios 5.
I finally had to upgrade my iphone test device in order to debug.
In my app it was related to a UIBarButtonItem that I was creating and releasing in viewDidLoad and then releasing it again in dealloc. Or something like that. But yeah, it was a serious pain to figure out.
I had the same problem with one of my apps. Worked perfectly on simulator and iphone ios 4 device but was crashing on ios 5.
I finally had to upgrade my iphone test device in order to debug.
In my app it was related to a UIBarButtonItem that I was creating and releasing in viewDidLoad and then releasing it again in dealloc. Or something like that. But yeah, it was a serious pain to figure out.
Thanks Rick! So to which device u upgraded iPhone 4 or iPhone 4S? Is there any other way without upgrading the device?
The first crash is obviously due to a bad implementation of the CALayer class.
There isn't a CALayerDelegate in the documentation, only a delegate property of the CALayer class - and in your error message it has something to do with CALayerDelegate.
Make sure you are doing everything correctly in using the delegate property of the CALayer.
Looks like these things happen as you are changing views & dealloc. Try again in simulator, load a view, issue a low memory notification and navigate away. Repeat for all views.
It really looks like pure memor management though. Make sure the fundamentals are up to scratch.
It will be easier troubleshooting this on ios4 than ios5 I think. You will probable get better debugger feedback.
One option you have is to convert to ARC. That should help set everything straight.
I would recommend upgrading to ios 5 or finding a device with ios5. For some reason the simulator will not produce a crash in these types of situations.
There's a good chance its related to one of your release statements. If you are able to replicate the crash, I would start by commenting out all your release statements and see if it fixes the crash, and then work back from there.
How do you get to this crash report? I didn't know it was there.
Yeah, when you develop test them out on actual devices with actual OS versions. I recently upgraded my app to ios 5 only to take advantage of the new features. I had to delete my old app off the app store first.
The first crash is obviously due to a bad implementation of the CALayer class.
There isn't a CALayerDelegate in the documentation, only a delegate property of the CALayer class - and in your error message it has something to do with CALayerDelegate.
Make sure you are doing everything correctly in using the delegate property of the CALayer.
I don't have much experience with core animation so I'm just guessing with this issue.
I'm only doing the animation with [UIView begingAnimation]...[UIView commitAnimation] way only. There's no call to CALayer Delegate methods. I'm trying to look more in the memory management. Thanks!!
Looks like these things happen as you are changing views & dealloc. Try again in simulator, load a view, issue a low memory notification and navigate away. Repeat for all views.
It really looks like pure memor management though. Make sure the fundamentals are up to scratch.
It will be easier troubleshooting this on ios4 than ios5 I think. You will probable get better debugger feedback.
One option you have is to convert to ARC. That should help set everything straight.
Thanks! I'm looking into the memory management and considering ARC also. But the problem with ARC is that I've to discontinue supporting iOS 4 platform. Not sure whether I want to do that.
I would recommend upgrading to ios 5 or finding a device with ios5. For some reason the simulator will not produce a crash in these types of situations.
There's a good chance its related to one of your release statements. If you are able to replicate the crash, I would start by commenting out all your release statements and see if it fixes the crash, and then work back from there.
Thanks! I'm looking into the memory management and considering ARC also. But the problem with ARC is that I've to discontinue supporting iOS 4 platform. Not sure whether I want to do that.
For a royalty-free stock music library try The Music Bed, Royalty Free Music Library for Media. Where user can buy /Download Quality Stock Music for Films, Websites, Ads, Documentaries, Multimedia and also for Wedding, Photographers, Ministries & Churches and Production Companies. The Music Bed music library has nearly 10,000 tracks of affordable, high-quality royalty-free production music for Films, Websites, Ads, Documentaries, Multimedia and also for Wedding. New music is being added every day. The Music Bed offers four purchase options—Single Use wedding & Portrait, Single Use non-Profit, 1 Year Wedding & Portrait, 1 Year non-Profit.