Application is crashing because it is taking too long to launch
by Komar "FLy" Sergey · in iTorque 2D · 09/23/2009 (3:40 pm) · 4 replies
I have problem with my game, when I am trying to launch it from device it crashes. I have emailed to apple and what they answered:
"Hi Sergey,
Your application is crashing because it is taking too long to launch. If you look at the crash report, the following lines near the top are what tell you this:
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.tinsgames.JunkMobile failed to launch in time
elapsed total CPU time (seconds): 20.080 (user 17.350, system 2.730), 99% CPU
elapsed application CPU time (seconds): 18.630, 92% CPU
You can learn more about this by reading the document at this link: http://developer.apple.com/iphone/library/qa/qa2009/qa1592.html
To fix the problem you should look at the startup sequence for your application and minimize the amount of work done in applicationDidFinishLaunching: - delay non-essential tasks until later in the application's execution."
I understand what it means, but cant solve it by myself, so I am looking for help from you guys.
"Hi Sergey,
Your application is crashing because it is taking too long to launch. If you look at the crash report, the following lines near the top are what tell you this:
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.tinsgames.JunkMobile failed to launch in time
elapsed total CPU time (seconds): 20.080 (user 17.350, system 2.730), 99% CPU
elapsed application CPU time (seconds): 18.630, 92% CPU
You can learn more about this by reading the document at this link: http://developer.apple.com/iphone/library/qa/qa2009/qa1592.html
To fix the problem you should look at the startup sequence for your application and minimize the amount of work done in applicationDidFinishLaunching: - delay non-essential tasks until later in the application's execution."
I understand what it means, but cant solve it by myself, so I am looking for help from you guys.
#2
Try looking at this post here www.garagegames.com/community/forums/viewthread/94193 and see if that improves your loading times.
09/24/2009 (3:21 pm)
This is a common problem and you can find many resources if you search the forums here. The easiest ways to improve your loading time is to load only the datablocks you need for the starting screen at start up and to disable elements of TGB that your game is not using like networking. Try looking at this post here www.garagegames.com/community/forums/viewthread/94193 and see if that improves your loading times.
#3
I've also put in on-demand GUI loading as well to help reduce load time.
09/24/2009 (5:07 pm)
Agreed with Nate. Don't have a big datablocks CS. In fact, you might want to even make it empty and just explicitly create the datablocks before your level loads.I've also put in on-demand GUI loading as well to help reduce load time.
#4
Also as Chris said, if any of your datablocks.cs files have anything in them, remove it and put the data somewhere else. The engine will try and load up what is in these files when the engine starts - this is actually a very bad thing, because by default TGB puts ALL of the imagemaps in there, which is the #1 cause of on-launch crashing. (This actually should probably be changed in a future update to the engine to not save everything in the datablocks.cs, and instead to save things in categorized files to be loaded when they are needed).
(So, in general, I'm agreeing with Chris and Nate. Good work guys!)
09/28/2009 (2:52 am)
As Chris said, do on-demand GUI loading (and unloading when not needed. Also, don't load up most of your game files until your first primary game load. When you first start the game, do as little as possible - like, just the title screen and the engine - nothing else.Also as Chris said, if any of your datablocks.cs files have anything in them, remove it and put the data somewhere else. The engine will try and load up what is in these files when the engine starts - this is actually a very bad thing, because by default TGB puts ALL of the imagemaps in there, which is the #1 cause of on-launch crashing. (This actually should probably be changed in a future update to the engine to not save everything in the datablocks.cs, and instead to save things in categorized files to be loaded when they are needed).
(So, in general, I'm agreeing with Chris and Nate. Good work guys!)
Torque Owner Komar "FLy" Sergey