Advertisement
Guest User

Untitled

a guest
Jul 15th, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. cocos2d: CCSpriteFrameCache: Trying to use file 'heroTestSheet.png' as texture
  2. cocos2d: CCTexture2D. Can't create Texture. UIImage is nil
  3. cocos2d: Couldn't add image:heroTestSheet.png in CCTextureCache
  4. cocos2d: CCSpriteFrameCache: Couldn't load texture
  5. cocos2d: CCTexture2D. Can't create Texture. UIImage is nil
  6. cocos2d: Couldn't add image:heroTestSheet.png in CCTextureCache
  7. cocos2d: CCSpriteFrameCache: Frame 'heroFrame1.png' not found
  8. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObject:atIndex:]: attempt to insert nil object at 0'
  9. *** Call stack at first throw:
  10. (
  11. 0 CoreFoundation 0x3759dc7b __exceptionPreprocess + 114
  12. 1 libobjc.A.dylib 0x32d9bee8 objc_exception_throw + 40
  13. 2 CoreFoundation 0x3752a951 -[__NSArrayM insertObject:atIndex:] + 136
  14. 3 CoreFoundation 0x3752a8bf -[__NSArrayM addObject:] + 34
  15. 4 cocosTests 0x0000ce28 -[HeroClass init] + 1544
  16. 5 cocosTests 0x0000304c -[DebugZoneLayer init] + 860
  17. 6 cocosTests 0x00074e04 +[CCNode node] + 76
  18. 7 cocosTests 0x0000c4e4 -[DebugZoneScene init] + 244
  19. 8 cocosTests 0x00074e04 +[CCNode node] + 76
  20. 9 cocosTests 0x0000c390 +[DebugZoneScene scene] + 100
  21. 10 cocosTests 0x00002540 -[cocosTestsAppDelegate applicationDidFinishLaunching:] + 1028
  22. 11 UIKit 0x3592502c -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1200
  23. 12 UIKit 0x3591ea78 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 396
  24. 13 UIKit 0x358d82e4 -[UIApplication handleEvent:withNewEvent:] + 1476
  25. 14 UIKit 0x358d7b1c -[UIApplication sendEvent:] + 68
  26. 15 UIKit 0x358d73b4 _UIApplicationHandleEvent + 6824
  27. 16 GraphicsServices 0x33e77c88 PurpleEventCallback + 1048
  28. 17 CoreFoundation 0x3752f5cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28
  29. 18 CoreFoundation 0x3752f589 __CFRunLoopDoSource1 + 164
  30. 19 CoreFoundation 0x37521835 __CFRunLoopRun + 580
  31. 20 CoreFoundation 0x3752150b CFRunLoopRunSpecific + 226
  32. 21 CoreFoundation 0x37521419 CFRunLoopRunInMode + 60
  33. 22 UIKit 0x3591d554 -[UIApplication _run] + 548
  34. 23 UIKit 0x3591a558 UIApplicationMain + 972
  35. 24 cocosTests 0x000020c4 main + 100
  36. 25 cocosTests 0x0000205c start + 40
  37. )
  38. terminate called after throwing an instance of 'NSException'
  39. Program received signal: “SIGABRT”.
  40. warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
  41.  
  42. -(id) init{
  43. self = [super init];
  44. if (!self) {
  45. return nil;
  46. }
  47.  
  48. _collisWidthFromCtr = 16;
  49. _collisHeightFromCtr = 16;
  50.  
  51. _collisPushPointsNums = 5;
  52.  
  53. _travelRectCenterPoints = [[NSMutableArray alloc] init];
  54.  
  55. _collisPushPoints = [[NSMutableArray alloc] init];
  56.  
  57. [_collisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( _collisWidthFromCtr, _collisHeightFromCtr)] atIndex:0];
  58. [_collisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( _collisWidthFromCtr, 0)] atIndex:1];
  59. [_collisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( _collisWidthFromCtr,-_collisHeightFromCtr)] atIndex:2];
  60. [_collisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake( 0, _collisHeightFromCtr)] atIndex:3];
  61. [_collisPushPoints insertObject:[NSValue valueWithCGPoint:CGPointMake(-_collisWidthFromCtr, _collisHeightFromCtr)] atIndex:4];
  62.  
  63. _rectCheckRes = 32;
  64.  
  65. _speed = 8;
  66.  
  67. [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"heroTestSheet.plist"];
  68.  
  69. _heroSpriteSheet = [CCSpriteBatchNode batchNodeWithFile:@"heroTestSheet.png"];
  70.  
  71. //[self addChild:_heroSpriteSheet];
  72.  
  73. NSMutableArray *heroSpriteFlyAnimFrames = [NSMutableArray array];
  74. for(int i = 1; i <= 2; ++i) {
  75. [heroSpriteFlyAnimFrames addObject:
  76. [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:
  77. [NSString stringWithFormat:@"heroFrame%d.png", i]]];
  78. }
  79.  
  80. CCAnimation *heroSpriteFlyAnim = [CCAnimation animationWithFrames:heroSpriteFlyAnimFrames delay:0.03f];
  81.  
  82. _heroSprite = [CCSprite spriteWithSpriteFrameName:@"heroFrame1.png"];
  83.  
  84. _heroSpriteFlyAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:heroSpriteFlyAnim restoreOriginalFrame:NO]];
  85. [_heroSprite runAction:_heroSpriteFlyAction];
  86.  
  87. [_heroSpriteSheet addChild:_heroSprite];
  88.  
  89. return self;
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement