In line with the others who've made an app using the template I've also got the following crash log after installing the device on a jailbroken 3rd gen touch
Wed Jun 16 20:44:58 unknown com.apple.debugserver-43[10041] <Warning>: 3 [2739/0903]: RNBRunLoopLaunchInferior DNBProcessLaunch() returned error: 'DRHT'
Wed Jun 16 20:44:58 unknown com.apple.debugserver-43[10041] <Warning>: error: failed to launch process (null): failed to get the task for process 10042
Wed Jun 16 20:44:58 unknown com.apple.debugserver-43[10041] <Warning>: 4 [2739/1603]: error: ::read ( 7, 0x28091c, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Wed Jun 16 20:44:59 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.yourcompany.iCupid[0x72cb]) Bug: launchd_core_logic.c:2649 (23909):10
Wed Jun 16 20:44:59 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.yourcompany.iCupid[0x72cb]) Working around 5020256. Assuming the job crashed.
Wed Jun 16 20:44:59 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.yourcompany.iCupid[0x72cb]) Job appears to have crashed: Segmentation fault
Wed Jun 16 20:44:59 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.yourcompany.iCupid[0x72cb]) Throttling respawn: Will start in 2147483646 seconds
Wed Jun 16 20:44:59 unknown SpringBoard[4391] <Warning>: Application 'iCupid' exited abnormally with signal 11: Segmentation fault
Wed Jun 16 20:45:10 unknown kernel[0] <Debug>: launchd[10044] Builtin profile: container (seatbelt)
Wed Jun 16 20:45:10 unknown kernel[0] <Debug>: launchd[10044] Container: /private/var/mobile/Applications/19712C4D-23D3-43EE-98AD-EA56C73F1122 (seatbelt)
Wed Jun 16 20:45:10 unknown iCupid[10044] <Warning>: JON... found 39 textures.
Wed Jun 16 20:45:10 unknown iCupid[10044] <Warning>: JON... 002
Wed Jun 16 20:45:10 unknown iCupid[10044] <Error>: *** -[SPImage setParent:]: unrecognized selector sent to instance 0x123a70
Wed Jun 16 20:45:10 unknown iCupid[10044] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[SPImage setParent:]: unrecognized selector sent to instance 0x123a70'
Wed Jun 16 20:45:10 unknown iCupid[10044] <Error>: Stack: (
840590129,
819549933,
840593943,
840096405,
840059584,
47896,
47452,
13684,
12000,
847746263,
847745499,
847986269,
847984721,
847983527,
847231865,
840342573,
840340317,
847742799,
847737971,
11748,
11604
)
Wed Jun 16 20:45:10 unknown UIKitApplication:com.yourcompany.iCupid[0xef51][10044] <Notice>: terminate called after throwing an instance of '
Wed Jun 16 20:45:10 unknown UIKitApplication:com.yourcompany.iCupid[0xef51][10044] <Notice>: NSException
Wed Jun 16 20:45:10 unknown UIKitApplication:com.yourcompany.iCupid[0xef51][10044] <Notice>: '
Wed Jun 16 20:45:10 unknown ReportCrash[10045] <Notice>: Formulating crash report for process iCupid[10044]
Wed Jun 16 20:45:10 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.yourcompany.iCupid[0xef51]) Job appears to have crashed: Abort trap
Wed Jun 16 20:45:10 unknown SpringBoard[4391] <Warning>: Application 'iCupid' exited abnormally with signal 6: Abort trap
Wed Jun 16 20:45:10 unknown ReportCrash[10045] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/iCupid_2010-06-16-204510_Jons-iPod.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
If you look at the above trace log you'll see I managed to put a NSLog entry just before the crash.
Here is the code around that NSLog entry.
@implementation Game
- (id)initWithWidth:(float)width height:(float)height
{
if (self = [super initWithWidth:width height:height])
{
// this is where the code of your game will start.
SPTextureAtlas *atlas = [SPTextureAtlas atlasWithContentsOfFile:@"atlas1.xml"];
NSLog(@"JON... found %d textures.", atlas.count);
SPImage *image1 = [SPImage imageWithTexture:[atlas textureByName:@"background"]];
NSLog(@"JON... 002");
image1.x = 0;
image1.y = 0;
[self addChild:image1];
NSLog(@"JON... 003");
// in this sample, we add just a simple quad to see if it works.
SPQuad *quad = [SPQuad quadWithWidth:140 height:160];
NSLog(@"JON... 004");
quad.color = 0xff00ff;
quad.alpha = 0.6;
quad.x = 50;
quad.y = 50;
[self addChild:quad];
NSLog(@"JON... 005");
}
NSLog(@"JON... Done");
return self;
}
@end
It looks like it's the line
[self addChild:image1];
that caused the issue - I'm going to try compiling and uploading the demo project and then making a new project just using the scaffold to see if that still causes issues.
Hope this helps.
Jon...
EDIT : Update...
Just as a sanity check - I've compiled and run the demo project in my setup and it worked fine on my 3rd gen touch.
(now for the scaffold project).
EDIT: Update 2...
I've copied the scaffold project and added the exact same code as above (basically load the atlas and add a single image behind the quad) and it worked perfectly!
Does anyone know how to change the name of the project (what's shown on the springboard) without on Xcode 3.1.4 - The Project-> rename option doesn't exist.
Jon...