views:

437

answers:

3

Hey,

On all iPhones (we checked) which have been updated to iOS4, our app is behaving differently (buggy) than on previous OS version (3.1.3). First and most biggest problem is that on 3G (but not on 3GS), any UIAlertView freezes the app - actually it looks like that app losses focus to give it to UIAlertView, but UIAlertView doesn't get the focus either. I have to note that my app is using OpenGL ES 1.1.

Other bugs look like some variables get different initial settings. For example, color picker starts with yellow color instead black, multitouch counter gives wrong results, etc...

Even this freezes the app:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Please read help before using Facebook/Twitter/Flickr" 
                                               delegate:self 
                                      cancelButtonTitle:@"OK" 
                                      otherButtonTitles:nil, nil]; 
[alert show]; 
[alert release];

Anyone having any idea?

Thanks in advance.

edit: Just wanted to inform you that we fixed all issues. Some troubles were found while carefully inspecting our code and finding stuff we did wrong. In iOS3 the same bugs waren't noticable because OS itself is more faster, but crippled app to death in iOS4. Also some variables needed to be initalized to default value (example - int x = 0; instead int x;) and then things started to work as expected.

+1  A: 

As trite as it sounds, check your memory management carefully. As the frameworks evolve significantly between major releases, any latent memory management problems in your code might likely be the source of such weirdness.

bbum
Yeah, but the problem is that instruments/leaks still don't report any weirdnesses.
duke4e
@duke4e - Just because Instruments doesn't immediately show a problem doesn't mean one isn't there. Also, don't just look for leaks in the Leaks instrument, check to make sure that overall memory usage isn't steadily increasing in Memory Monitor and look for other odd behavior.
Brad Larson
+1  A: 

I would think that one 'nil' would do the job for 'otherButtonTitles'. Could the second one be causing the crash?

If not, what errors are being reported on your console at the time of crash?

Shannon A.
That's a perfectly valid argument (the second nil is acting as a sentinel for a list), and in fact a certain new compiler throws a warning if you don't do this.
Brad Larson
A: 

We found that iOS 4 is much, much more aggressive on memory management issues when compared to iOS 3. This makes a lot of sense from a design perspective as Apple now has to worry about a large number of applications potentially operating at the same time. We had a large number crash bugs caused by poor memory management that didn't show at all in iOS 3.

Kirk Ewing