0

On console, I have this message:

backboardd[51] : BKSendGSEvent ERROR sending event type 23: (ipc/send) timed out (0x10000004)

Then it crashes. The crash report is:

Hardware Model:      iPad2,1
Process:         abc [3243]
Path:            /var/mobile/Applications/...
Identifier:      abc
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-10-...
OS Version:      iOS 6.0 (10A403)
Report Version:  104

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

Application Specific Information:
com.abc failed to launch in time

Elapsed total CPU time (seconds): 20.910 (user 20.910, system 0.000), 52% CPU 
Elapsed application CPU time (seconds): 19.898, 50% CPU

The release version works fine on both iOS 5 and 6.

Display Name
  • 4,502
  • 2
  • 47
  • 63

3 Answers3

2

The most likely reason is that your application initial setup takes too long to complete. Try to modify your application:didFinishLaunching method to do less tasks.

The new iOS6 has a built-in timer that closes the application if it takes too long to start.

Marco Pace
  • 3,820
  • 19
  • 38
2

Just try to divide your application:didFinishLaunchingWithOptions: method code to different function calls and make those calls in background using the threads other then main and make sure that application:didFinishLaunchingWithOptions: method returns as soon as possible

you can use

dispatch_async(dispatch_get_main_queue(), ^{
//put your code
 }
The iOSDev
  • 5,237
  • 7
  • 41
  • 78
  • Thank you, putting this into didFinishLaunchingWithOptions and applicationDidFinishLaunching resolved the crash issue. However, it still doesn't start and I receive timeout errors. (CoreAnimation and BKSendGSEvent.) – Display Name Oct 19 '12 at 10:31
  • When I run it from XCode, it goes fine. But when I make an IPA with the archiving tool, or I simply drag the .app file to Itunes, it freezes. (At least doesn't crash anymore.) – Display Name Oct 19 '12 at 10:32
  • then you can try to make new thread ivar and use that thread instead of the dispatch_get_main_queue() – The iOSDev Oct 19 '12 at 10:35
  • Thanks! Let's continue the discussion in [12972983](http://stackoverflow.com/questions/12972983/program-runs-from-xcode-but-causes-time-out-as-ad-hoc-deployment-ipa) – Display Name Oct 19 '12 at 11:11
1

Your app is taking to long to start and is then killed by iOS.

Check that - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions returns as soon as posible.

There might be something in the didFinishLaunchingWithOptions: which work differntly on iOS 6 and there for taken more time. A good idea is the dispatch that task.

rckoenes
  • 69,092
  • 8
  • 134
  • 166