views:

1325

answers:

7

Hello everyone, I'm very frustrated with this problem. After one week of waiting my universal iPad app has been rejected because "is crashing on launch on iPad running iPhone OS 3.2 and iPhone 3GS running iPhone OS 3.1.3 and Mac OS X 10.6.2."

Unfortunately I can't replicate the problem, I've tested in debug and release modes and the app works just fine. I even created an ad-hoc configuration and test it in other devices and everything works fine.

I should clarify that this is an update to a current iPhone application and I'm using the same distribution profile as the original iPhone app. Also, I checked everything before building the universal app following this entry:

http://iphonedevelopment.blogspot.com/2010/04/converting-iphone-apps-to-universal.html

Here are the crash logs that Apple sent me:

Incident Identifier: 3E0D4A3B-2896-444D-BCBE-6C0CA1A66A90
CrashReporter Key:   18b5124ea5f657227c5f202a27ed707379b3e2e7
Process:         Transfer [982]
Path:            /var/mobile/Applications/E9062465-7EA6-424C-9C61-D9DBCC7C915A/Transfer.app/Transfer
Identifier:      Transfer
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2010-05-04 15:35:57.399 -0700
OS Version:      iPhone OS 3.1.3 (7E18)
Report Version:  104

Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x00000001, 0x3eaa2188
Highlighted Thread:  0

Backtrace not available

Unknown thread crashed with ARM Thread State:
    r0: 0x00002f90    r1: 0x00000000      r2: 0x385242d8      r3: 0x0000010d
    r4: 0x00000000    r5: 0x00000000      r6: 0x00000000      r7: 0x00000000
    r8: 0x2ffffba0    r9: 0x2fffef90     r10: 0x00000000     r11: 0x00000000
    ip: 0x0000000c    sp: 0x2ffffba4      lr: 0x2fe08727      pc: 0x00002f94
  cpsr: 0x40000010

Binary Images:
    0x1000 -    0x25fff +Transfer armv7   /var/mobile/Applications/E9062465-7EA6-424C-9C61-D9DBCC7C915A/Transfer.app/Transfer
0x2fe00000 - 0x2fe24fff  dyld armv7   /usr/lib/dyld
....

And the one for the iPad:


Incident Identifier: 3B170A28-C8E2-4018-8166-E69432A65070
CrashReporter Key:   4a0194e3f60559127faef2b014df605e4c47b981
Hardware Model:      iPad1,1
Process:         Transfer [533]
Path:            /var/mobile/Applications/400EE394-7BEE-45CA-942D-DBDC106360FF/Transfer.app/Transfer
Identifier:      Transfer
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2010-05-04 15:37:17.505 -0700
OS Version:      iPhone OS 3.2 (7B367)
Report Version:  104

Exception Type:  00000020
Exception Codes: 0x8badf00d
Highlighted Thread:  0

Application Specific Information:
com.erclab.iphone.photodownload failed to launch in time 
elapsed total CPU time (seconds): 1.150 (user 0.560, system 0.590), 6% CPU 
elapsed application CPU time (seconds): 0.150, 1% CPU

Thread 0:
0   libobjc.A.dylib                0x33561996 0x33560000 + 6550
1   libobjc.A.dylib                0x33564986 0x33560000 + 18822
2   libobjc.A.dylib                0x33564cb2 0x33560000 + 19634

...

The app does not do anything other than loading a local HTML into a web view after the app it's launched so I don't understand why it says "failed to launch in time"

Any help will be very much appreciated.

A: 

Just submit the same app again to Apple without any changes. Someone else will review it and They will approve it. Trust me, I've done it before. Apple approval team is downright crazy. On devices, apps crash due to memory issues. This is something that can't be reproduced. From your crashdump it looks like that.

Mugunth Kumar
The crash dump totally does not look like that. It's failing to launch in time, and that will probably happen every time - also fundamentally the advice to resubmit to "work around" the system is really bad advice, because if one tester saw your crash a MILLION people will find it too, and they will be ANGRY.
Kendall Helmstetter Gelner
+3  A: 

Are you trying to load the web view from applicationDidFinishLaunching? Are you sure the tester can connect to your server?

The crash is not a crash at all, it is the system forcing your app to quit because it took too long to start. Move everything you can out of applicationDidFinishLaunching so it can finish, well, launching.

Kendall Helmstetter Gelner
The web page that I'm loading is a local resource, no web server involved. On applicationDidFinishLaunching I'm checking for some users preferences and adding some Notification observers, that's it. I would be really surprised if the app it is actually hanging there only when I build it for distribution because it actually launches instantly when I test in Debug and ad-hoc modes. Any other suggestions? I really appreciate your help!
Enrique R.
The *second* crash is not a crash. The first one was caused by an illegal instruction, so it is a crash.
JeremyP
Since the first one has no back trace though, I'm guessing it's the same sort of crash (early app termination), even though the logging of it appears to be different.
Kendall Helmstetter Gelner
@Enrique: perhaps you have nibs loading with very large images? I think the nib loading phase may also count against startup time...
Kendall Helmstetter Gelner
The nibs are pretty simple, they have a UIWebView that is used to display a local web page. The thing that is really weird is that the iPhone part of the application was barely touched, this update was to add the iPad version of the app but the iPhone app delegate is the same, so I would understand if the iPad app was having problems but why is the iPhone app also crashing when it didn't before as standalone app. Thanks again for your input.
Enrique R.
+1  A: 

If you are loading a web page, what happens when you disable all networking (airplane mode) and launch? That is one of the standard tests they run, so you should too.

drawnonward
I tried disabling all networking by going to airplane mode and the app works fine in both iPad and iPhone. The weird thing is that I'm loading a local web page (the html file and all the images are stored within the app) so it shouldn't take long to read those files. When I run the app in debug or release mode the app launches instantly - no delay whatsover :(
Enrique R.
I had assumed a hosted page from your description. As you say, disabling networking should not have any effect on a local page.
drawnonward
+1  A: 

Exactly the same issue happened with our app approval yesterday. 4 crash logs, 2 iPad , 2 iPhone. The iPad versions have the error message that the app took too long and a stack trace. The iPhone version have the EXC_BAD_INSTRUCTION and no stack trace.

The app works fine on our 2 iPhones and 1 iPad that we use for testing. App also works if disconnected from network.

Please post if you solved, will do the same.

Andreas
@Andreas It makes me feel a little better that there is someone else looking at the same problem. This problem is very frustrating, I've spend many hours already trying to figure out what is happening but still no clues on how to reproduce it. I actually submitted a request for support to Apple but haven't heard from them.Yes, I will def. post if I find something useful. You can email me if you want to compare notes: echamussy at yahoo. Thanks!
Enrique R.
Even the stack trace addresses are identical.Any possibility that the way we are building is incorrect? I'm using a 3.1.3 base SDK with a Deployment Target of 3.1.3. Xcode has a warning that ipad requires 3.2, but that would not be accepted for a universal app.
Andreas
I took a screenshot of all my build settings on this URL. You can take a look and compare to your build settings:http://echamussy.posterous.com/build-settings
Enrique R.
A: 

I would try simulating a low memory condition and see how our app handles it.

EDIT: Check out this Answer iPhone Development Simulate Memory Warning

Sophtware
How can I do that? is it possible from the simulator or device?
Enrique R.
Updated my answer for you with like to another question about simulating memory warnings.
Sophtware
Thanks. The problem is that according to Apple the app does not even launch so simulating a memory warning after the app launched in the simulator is probably not going to tell me much since the problem they reported happens when the app is launching.
Enrique R.
A: 

You said you copied your code over. Did you also copy over your local resources? ie your html file? And you're sure it isn't just linked in? Is it being included in the build? If the file is just linked in to the bundle it may explain why it launches for you but not for them.

In the future (and maybe you want to try this to see if it works out any better for you) the proper way to upgrade your app to a universal app is to use the Xcode file option Upgrade for iPad (or something like that) it will do all the necessary work for you to make it iPad compatible. Step by step is on apple's site, just do a google search how to create universal app.

casey
Yes. I copied over all my all local resources and made sure that I checked the 'Copy' checkbox when doing this. Also, I'm able build and run the app for ad-hoc distribution and I've tested it with 2 different iPhones with no problems, the app launches almost instantly.
Enrique R.
+7  A: 

WOW !!!! Now, this is extremely, extremely frustrating. After lots of hours and even days of debugging, looking at my code, testing in different scenarios, asking questions and 2 rejections, Apple wrote me an email today (18 days after my first submission):

"... This is an issue with the submission process and not with your code. iPhone OS Engineering is investigating the problem...."

You can imagine how I feel right now. Thanks to everyone who help me trying to figure out this "crash".

Enrique R.
What did you do to fix the issue?
Chris Van Buskirk
Hi Chris, I didn't have to do anything on my code. After my app got rejected couple of times because of the crash I contacted the Apple Developer Technical support and one week later they told me my app was all ok and that it was a problem with the App Store review process.Then, I forwarded the email I got from technical support to the app review email and couple of days later I got my app approved. The whole thing took like 3 weeks but at the end I got the app approved without having to change my code at all.
Enrique R.
+1 to help restore your karmic balance
Shaggy Frog