11

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.

Enrique R.
  • 750
  • 5
  • 16
  • I should add that the original iPhone application was barely touched during this update. The purpose of this update was to add the iPad version and distribute it as a universal app. The way I did this was to start a new Xcode project select universal app and then copy the code from the original iPhone app to the new project. – Enrique R. May 05 '10 at 17:16
  • I took a screenshot of all my build settings here: http://echamussy.posterous.com/build-settings Do you see anything that may be wrong with them? – Enrique R. May 05 '10 at 18:52

6 Answers6

20

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.
  • 750
  • 5
  • 16
  • What did you do to fix the issue? – cvb Jul 28 '10 at 00:42
  • 1
    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. Aug 02 '10 at 14:06
3

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
  • 74,769
  • 26
  • 128
  • 150
  • 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. May 05 '10 at 05:31
  • The *second* crash is not a crash. The first one was caused by an illegal instruction, so it is a crash. – JeremyP May 05 '10 at 09:08
  • 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 May 05 '10 at 14:09
  • @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 May 05 '10 at 14:10
  • 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. May 05 '10 at 17:19
1

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
  • 53,459
  • 16
  • 107
  • 112
  • 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. May 05 '10 at 05:26
  • I had assumed a hosted page from your description. As you say, disabling networking should not have any effect on a local page. – drawnonward May 05 '10 at 19:27
0

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

Community
  • 1
  • 1
Sophtware
  • 1,796
  • 2
  • 21
  • 34
  • How can I do that? is it possible from the simulator or device? – Enrique R. May 05 '10 at 17:11
  • Updated my answer for you with like to another question about simulating memory warnings. – Sophtware May 05 '10 at 18:31
  • 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. May 05 '10 at 18:54
0

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
  • 1,118
  • 1
  • 13
  • 25
  • 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. May 05 '10 at 20:21
-2

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
  • 14,461
  • 15
  • 66
  • 94
  • 8
    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 May 05 '10 at 03:01
  • Sounds like the OP took your advice. – Peter K. Jul 27 '11 at 02:24