Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-07-2012, 08:44 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default App Crashing on iOS 5

Hi All,

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
dreamer11 is offline   Reply With Quote
Old 02-07-2012, 08:55 AM   #2 (permalink)
Registered Member
 
Music Man's Avatar
 
Join Date: Oct 2009
Location: UK
Posts: 81
Music Man is on a distinguished road
Default

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?
Music Man is offline   Reply With Quote
Old 02-07-2012, 12:43 PM   #3 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default

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 View Post
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?
dreamer11 is offline   Reply With Quote
Old 02-07-2012, 01:37 PM   #4 (permalink)
Registered Member
 
Join Date: Dec 2010
Location: Seattle, WA
Posts: 408
RickSDK is on a distinguished road
Default

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.
__________________
Check out my apps

RickSDK is offline   Reply With Quote
Old 02-07-2012, 02:05 PM   #5 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default

Quote:
Originally Posted by RickSDK View Post
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?
dreamer11 is offline   Reply With Quote
Old 02-07-2012, 03:51 PM   #6 (permalink)
Registered Member
 
Music Man's Avatar
 
Join Date: Oct 2009
Location: UK
Posts: 81
Music Man is on a distinguished road
Default

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.

Here's a link which I found, don't know if it's any relevance :
iphone - Using CALayer Delegate - Stack Overflow

I don't have much experience with core animation so I'm just guessing with this issue.
Music Man is offline   Reply With Quote
Old 02-07-2012, 04:22 PM   #7 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

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.
sneaky is offline   Reply With Quote
Old 02-07-2012, 04:44 PM   #8 (permalink)
Registered Member
 
Join Date: Dec 2010
Location: Seattle, WA
Posts: 408
RickSDK is on a distinguished road
Default

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.
__________________
Check out my apps

RickSDK is offline   Reply With Quote
Old 02-07-2012, 06:31 PM   #9 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 173
mistergreen2011 is on a distinguished road
Default

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.
mistergreen2011 is offline   Reply With Quote
Old 02-10-2012, 04:04 AM   #10 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default

Quote:
Originally Posted by Music Man View Post
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.

Here's a link which I found, don't know if it's any relevance :
iphone - Using CALayer Delegate - Stack Overflow

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!!
dreamer11 is offline   Reply With Quote
Old 02-10-2012, 04:12 AM   #11 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default

Quote:
Originally Posted by sneaky View Post
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.
dreamer11 is offline   Reply With Quote
Old 02-10-2012, 04:13 AM   #12 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default

Quote:
Originally Posted by RickSDK View Post
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 Rick!!
dreamer11 is offline   Reply With Quote
Old 02-10-2012, 08:28 AM   #13 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

Quote:
Originally Posted by dreamer11 View Post
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.
You can still support iOS4 with ARC.
sneaky is offline   Reply With Quote
Old 02-14-2012, 04:13 PM   #14 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 9
dreamer11 is on a distinguished road
Default

Quote:
Originally Posted by sneaky View Post
You can still support iOS4 with ARC.
Thank u very much!! u saved me a lot of trouble. Thanks again!
dreamer11 is offline   Reply With Quote
Old 02-16-2012, 03:21 AM   #15 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 1
Jack Martyn is on a distinguished road
Default Royalty Free Music Library for Media

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.
Jack Martyn is offline   Reply With Quote
Reply

Bookmarks

Tags
app, iphone, ipod touch

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 404
14 members and 390 guests
7twenty7, chiataytuday, cristofercolmbos, fiftysixty, gmarro, iOS.Lover, KennyChong, kilobytedump, Matrix23, raymng, ryantcb, stanny, UMAD, xerohuang
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,669
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dedeys78
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0