#try/#catch doesn't catch exception - objective-c

After upgrading Xcode from 6.0 to 6.3, I noticed my automated tests started failing.
2015-04-14 18:56:50.625 xctest[48304:517820] *** Terminating app due to uncaught exception 'foo', reason: 'bar'
*** First throw call stack:
(
0 CoreFoundation 0x0084a746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x004d3a97 objc_exception_throw + 44
2 CoreFoundation 0x0084a66d +[NSException raise:format:] + 141
3 TestTests 0x03e6dbdc -[TestTest test] + 810
4 CoreFoundation 0x0072b84d __invoking___ + 29
5 CoreFoundation 0x0072b6f8 -[NSInvocation invoke] + 360
6 XCTest 0x20108975 -[XCTestCase invokeTest] + 320
7 XCTest 0x20108baa -[XCTestCase performTest:] + 175
8 XCTest 0x20114122 -[XCTest run] + 314
9 XCTest 0x20107598 -[XCTestSuite performTest:] + 406
10 XCTest 0x20114122 -[XCTest run] + 314
11 XCTest 0x20107598 -[XCTestSuite performTest:] + 406
12 XCTest 0x20114122 -[XCTest run] + 314
13 XCTest 0x20107598 -[XCTestSuite performTest:] + 406
14 XCTest 0x20114122 -[XCTest run] + 314
15 XCTest 0x20103df2 __25-[XCTestDriver _runSuite]_block_invoke + 61
16 XCTest 0x20110c42 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 184
17 XCTest 0x20103d16 -[XCTestDriver _runSuite] + 285
18 XCTest 0x20104961 -[XCTestDriver _checkForTestManager] + 272
19 XCTest 0x20104c79 -[XCTestDriver runTestSuite:completionHandler:] + 376
20 XCTest 0x2011772c +[XCTestProbe runTests:] + 216
21 libobjc.A.dylib 0x004e967e +[NSObject performSelector:withObject:] + 70
22 xctest 0x0000823a xctest + 4666
23 xctest 0x000084b0 xctest + 5296
24 xctest 0x00008591 xctest + 5521
25 xctest 0x00007e3d xctest + 3645
26 libdyld.dylib 0x019d4ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
After further investigation it appears exceptions are now uncatchable. Both these snippets would cause this error.
XCTAssertThrows([NSException raise:#"foo" format:#"bar"]);
and
#try {
[NSException raise:#"foo" format:#"bar"];
}
#catch (NSException *ex) {
NSLog(#"caught");
}
After a VCS force clean sync and rebuild everything looked fine, but then the same failure started in a couple of builds time. Does anyone have any ideas?

Following the developer forums, this appears to be a bug or oversight in the developer tools that introduced an incompatibility with binaries built with older versions of the tools.
Should be fixed in Xcode 6.4

Related

App crashing from ipa file but run from xcode

My app is crashing from ipa file. This is my console log. I am using firebase in this project? I can not figure out the problem. Is it arising for firebase or other causes?
Version: 3.5 (3.5)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2018-05-07 14:00:50.9291 +0600
Launch Time: 2018-05-07 14:00:50.7374 +0600
OS Version: iPhone OS 11.2.1 (15C153)
Baseband Version: 4.30.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x1823be364 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x181604528 objc_exception_throw + 55
2 CoreFoundation 0x1823be2ac +[NSException raise:format:] + 115
3 Photo 0x1049f62e0 _h`enter code here`idden#57437_ + 171
4 Photo 0x1049f60a4 _hidden#57435_ + 383
5 Photo 0x1049f5e44 _hidden#57433_ + 359
6 CoreFoundation 0x18235033c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 19
7 CoreFoundation 0x18234f8dc _CFXRegistrationPost + 419
8 CoreFoundation 0x18234f640 ___CFXNotificationPost_block_invoke + 59
9 CoreFoundation 0x1823cd024 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1407
10 CoreFoundation 0x182285f60 _CFXNotificationPost + 379
11 Foundation 0x182cb3348 -[NSNotificationCenter postNotificationName:object:userInfo:] + 67
12 Photo 0x104973d30 _hidden#53366_ + 387
13 Photo 0x104972bdc _hidden#53351_ + 287
14 Photo 0x104972a10 _hidden#53349_ + 391
15 Photo 0x1047056e8 _hidden#31344_ + 3348200 (__hidden#31777_:205)
16 UIKit 0x18b90e37c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 383
17 UIKit 0x18baffc58 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3435
18 UIKit 0x18bb04aa8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1711
19 UIKit 0x18bda02d4 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 799
20 UIKit 0x18c07812c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 159
21 UIKit 0x18bd9ff38 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 251
22 UIKit 0x18bda0798 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 731
23 UIKit 0x18c5257d0 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 259
How to solve this problem. Please help.

UICollectionView with CSStickyHeaderFlowLayout crashes on scroll up and down

I created a UICollectionView using CSStickyHeaderFlowLayout, because i wanted to have separate Header for UICollectionView and its sections. It is showing data successfully, but when i scroll up or down and as soon as it touches to top or bottom boundary it crashes, giving following error, I simply want separate Headers for collection view and its sections like we have in UITableView. If someone can help resolve this issue or point some alternative.
2016-12-06 11:50:51.881 TestStickyHeader[899:18365] * Assertion failure in -[UICollectionViewData validateLayoutInRect:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.5.2/UICollectionViewData.m:445
2016-12-06 11:50:51.929 TestStickyHeader[899:18365] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'layout attributes for supplementary item at index path ( {length = 2, path = 9 - 0}) changed from indexPath: {9, 0} zIndex: 1024 valid: YES kind: UICollectionElementKindSectionHeader to indexPath: {9, 0} zIndex: 1024 valid: YES kind: UICollectionElementKindSectionHeader without invalidating the layout'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104cbb34b exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010471c21e objc_exception_throw + 48
2 CoreFoundation 0x0000000104cbf442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00000001042b2e4d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x00000001063f5c3b __45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 1436
5 UIKit 0x00000001063f5093 -[UICollectionViewData validateLayoutInRect:] + 2984
6 UIKit 0x00000001063f835e -[UICollectionViewData layoutAttributesForCellsInRect:validateLayout:] + 170
7 UIKit 0x0000000106392909 -[UICollectionView _computePrefetchCandidatesForVisibleBounds:futureVisibleBounds:prefetchVector:notifyDelegateIfNeeded:] + 134
8 UIKit 0x0000000106392877 -[UICollectionView _computePrefetchCandidatesForVelocity:notifyDelegateIfNeeded:] + 214
9 UIKit 0x000000010639278d -[UICollectionView _prefetchItemsForVelocity:maxItemsToPrefetch:invalidateCandidatesOnDirectionChanges:] + 934
10 UIKit 0x000000010639baa7 -[UICollectionView layoutSubviews] + 717
11 UIKit 0x0000000105b12f50 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
12 QuartzCore 0x00000001058c5cc4 -[CALayer layoutSublayers] + 146
13 QuartzCore 0x00000001058b9788 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x00000001058b9606 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x0000000105847680 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
16 QuartzCore 0x0000000105874767 _ZN2CA11Transaction6commitEv + 475
17 QuartzCore 0x00000001057cfb97 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 611
18 CoreFoundation 0x0000000104c4d964 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
19 CoreFoundation 0x0000000104c4d5f3 __CFRunLoopDoTimer + 1075
20 CoreFoundation 0x0000000104c4d17a __CFRunLoopDoTimers + 250
21 CoreFoundation 0x0000000104c44f01 __CFRunLoopRun + 2065
22 CoreFoundation 0x0000000104c44494 CFRunLoopRunSpecific + 420
23 GraphicsServices 0x0000000109e38a6f GSEventRunModal + 161
24 UIKit 0x0000000105a4e964 UIApplicationMain + 159
25 TestStickyHeader 0x0000000103d9411f main + 111
26 libdyld.dylib 0x000000010b44c68d start + 1
27 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Tracing cause of NSRangeException - exception breakpoint always returns to `int main(int argc, char * argv[])`

I've been stuck on this all day, and struggling to identify the source of a NSRangeException crash.
The app builds fine, but in the process of loading the first scene it throws:
2015-05-01 17:21:48.606 AppName[3707:447852] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 3]'
The full stack trace is:
*** First throw call stack:
(
0 CoreFoundation 0x0000000111d22c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111584bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000111c0c093 -[__NSArrayM objectAtIndex:] + 227
3 UIKit 0x000000010f311881 _UIViewTopDownSubtreeTraversal + 193
4 UIKit 0x000000010f932fa3 -[UIView(UIConstraintBasedLayout_EngineDelegate) _invalidateSystemLayoutSizeFittingSizeAtEngineDelegateLevel] + 141
5 Foundation 0x000000010e931d6f -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 915
6 Foundation 0x000000010eabc1e8 -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 275
7 Foundation 0x000000010e92649a -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 220
8 UIKit 0x000000010f92fa34 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 474
9 Foundation 0x000000010e9341be -[NSISEngine withBehaviors:performModifications:] + 155
10 UIKit 0x000000010f92f83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
11 UIKit 0x000000010f92f64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
12 UIKit 0x000000010f92f933 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 217
13 Foundation 0x000000010e9341be -[NSISEngine withBehaviors:performModifications:] + 155
14 UIKit 0x000000010f92f83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
15 UIKit 0x000000010f92f64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
16 UIKit 0x000000010f92f2de -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 404
17 UIKit 0x000000010f92426e -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 126
18 UIKit 0x000000010f32f561 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 209
19 UIKit 0x000000010f32f74a -[UIView(Internal) _didMoveFromWindow:toWindow:] + 698
20 UIKit 0x000000010f327ecf __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
21 UIKit 0x000000010f327e43 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
22 UIKit 0x000000010f331f48 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
23 UIKit 0x000000010f61884c -[UINavigationTransitionView transition:fromView:toView:] + 479
24 UIKit 0x000000010f4161b0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 2984
25 UIKit 0x000000010f416448 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523
26 UIKit 0x000000010f416f0e -[UINavigationController __viewWillLayoutSubviews] + 43
27 UIKit 0x000000010f561715 -[UILayoutContainerView layoutSubviews] + 202
28 UIKit 0x000000010f334a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
29 QuartzCore 0x000000010eff4ec2 -[CALayer layoutSublayers] + 146
30 QuartzCore 0x000000010efe96d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
31 QuartzCore 0x000000010efe9546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
32 QuartzCore 0x000000010ef55886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
33 QuartzCore 0x000000010ef56a3a _ZN2CA11Transaction6commitEv + 462
34 UIKit 0x000000010f2b2a2d -[UIApplication _reportMainSceneUpdateFinished:] + 44
35 UIKit 0x000000010f2b36f1 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2648
36 UIKit 0x000000010f2b20d5 -[UIApplication workspaceDidEndTransaction:] + 179
37 FrontBoardServices 0x00000001158955e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
38 CoreFoundation 0x0000000111c5641c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
39 CoreFoundation 0x0000000111c4c165 __CFRunLoopDoBlocks + 341
40 CoreFoundation 0x0000000111c4b923 __CFRunLoopRun + 851
41 CoreFoundation 0x0000000111c4b366 CFRunLoopRunSpecific + 470
42 UIKit 0x000000010f2b1b42 -[UIApplication _run] + 413
43 UIKit 0x000000010f2b4900 UIApplicationMain + 1282
44 My360 0x000000010dcf26ff main + 111
45 libdyld.dylib 0x00000001127f5145 start + 1
46 ??? 0x0000000000000001 0x0 + 1
)
It's a large app, and I cannot identify which objectAtIndex is causing the issue.
After looking at similar issues, I added an Exception breakpoint:
However the breakpoint just keeps taking me back to the main.m file:
int main(int argc, char * argv[]) {
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
Can anyone point me towards how I can identify the line that is causing this exception?
Thanks!
Edit:
When I click on the My360 icon at the top of the debugging console, it shows this:

Xcode Error with slideviewcontroller

I am new to Xcode and I keep getting this error and I am not quite sure what it means and how to fix it:
Below is the link to the code error(http://pastebin.com/Y74frJxa) ...
2014-01-26 00:23:16.183 SidebarDemo[677:70b] *** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableView.m:5261
2014-01-26 00:23:16.186 SidebarDemo[677:70b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier map - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(
0 CoreFoundation 0x0222a5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016a48b6 objc_exception_throw + 44
2 CoreFoundation 0x0222a448 +[NSException raise:format:arguments:] + 136
3 Foundation 0x01077fee -[NSAssertionHandler handleFailureInMethodbject:file:lineNumber:description:] + 116
4 UIKit 0x002e9ed3 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 170
5 SidebarDemo 0x0000d6e9 -[SidebarViewController tableView:cellForRowAtIndexPath:] + 233
6 UIKit 0x002f461f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
7 UIKit 0x002f46f3 -[UITableView _createPreparedCellForGlobalRow:] + 69
8 UIKit 0x002d8774 -[UITableView _updateVisibleCellsNow:] + 2378
9 UIKit 0x002ebe95 -[UITableView layoutSubviews] + 213
10 UIKit 0x00270267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
11 libobjc.A.dylib 0x016b681f -[NSObject performSelector:withObject:] + 70
12 QuartzCore 0x029ed2ea -[CALayer layoutSublayers] + 148
13 QuartzCore 0x029e10d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
14 QuartzCore 0x029e0f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
15 QuartzCore 0x02948ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
16 QuartzCore 0x02949e71 _ZN2CA11Transaction6commitEv + 393
17 QuartzCore 0x02a06430 +[CATransaction flush] + 52
18 UIKit 0x00221dc9 _afterCACommitHandler + 131
19 CoreFoundation 0x021f24ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
20 CoreFoundation 0x021f241f __CFRunLoopDoObservers + 399
21 CoreFoundation 0x021d0344 __CFRunLoopRun + 1076
22 CoreFoundation 0x021cfac3 CFRunLoopRunSpecific + 467
23 CoreFoundation 0x021cf8db CFRunLoopRunInMode + 123
24 GraphicsServices 0x027c59e2 GSEventRunModal + 192
25 GraphicsServices 0x027c5809 GSEventRun + 104
26 UIKit 0x00205d3b UIApplicationMain + 1225
27 SidebarDemo 0x0000c76d main + 141
28 libdyld.dylib 0x0386a70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Thank you to all who help in advance!
The error says you are missing reuseIdentifier. For this,
just select tableViewCell in yourTableView in Storyboard and set reuseIdentifier in attributes Inspector.
use that reuse identifier in cellForRowAtIndex method as
[tableView dequeueReusableCellWithIdentifier:#"xxxx"]

App works on iPhone Simulator, but crashes on real iPhone Device

Today i tried running my app on my iPhone device, and it crashed! It worked perfectly fine on the simulator, I don't know what the problem is.
These are the crash logs:
Identifier: Evader
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-09-13 16:41:54.656 -0700
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x377d888f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x354dd259 objc_exception_throw + 33
2 CoreFoundation 0x377d8789 +[NSException raise:format:] + 1
3 Foundation 0x380173a3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91
4 Evader 0x0012ca41 -[CCSprite initWithTexture:] (CCSprite.m:192)
5 Evader 0x0012c1b1 +[CCSprite spriteWithTexture:] (CCSprite.m:83)
6 Evader 0x0011eb3d -[CCProgressTimer initWithTexture:] (CCProgressTimer.m:69)
7 Evader 0x0011ea55 -[CCProgressTimer initWithFile:] (CCProgressTimer.m:59)
8 Evader 0x0011e9e1 +[CCProgressTimer progressWithFile:] (CCProgressTimer.m:55)
9 Evader 0x00173579 -[HelloWorldLayer lives] (HelloWorldLayer.m:256)
10 Evader 0x001723ed -[HelloWorldLayer init] (HelloWorldLayer.m:101)
11 Evader 0x0010f073 +[CCNode node] (CCNode.m:258)
12 Evader 0x0017bd11 -[StartMenu doThis:] (StartMenu.m:75)
13 CoreFoundation 0x377db7e4 __invoking___ + 68
14 CoreFoundation 0x377367b1 -[NSInvocation invoke] + 161
15 Evader 0x0010aa03 -[CCMenuItem activate] (CCMenuItem.m:129)
16 Evader 0x001085ff -[CCMenu ccTouchEnded:withEvent:] (CCMenu.m:198)
17 CoreFoundation 0x377323fd -[NSObject performSelector:withObject:withObject:] + 53
18 Evader 0x0014f4ff -[CCTouchDispatcher touches:withEvent:withTouchType:] (CCTouchDispatcher.m:268)
19 Evader 0x0014fc43 -[CCTouchDispatcher touchesEnded:withEvent:] (CCTouchDispatcher.m:338)
20 Evader 0x001515c3 -[EAGLView touchesEnded:withEvent:] (EAGLView.m:332)
21 UIKit 0x314c692b -[UIWindow _sendTouchesForEvent:] + 319
22 UIKit 0x314c6319 -[UIWindow sendEvent:] + 381
23 UIKit 0x314ac695 -[UIApplication sendEvent:] + 357
24 UIKit 0x314abf3b _UIApplicationHandleEvent + 5827
25 GraphicsServices 0x33eee22b PurpleEventCallback + 883
26 CoreFoundation 0x377ac523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
27 CoreFoundation 0x377ac4c5 __CFRunLoopDoSource1 + 141
28 CoreFoundation 0x377ab313 __CFRunLoopRun + 1371
29 CoreFoundation 0x3772e4a5 CFRunLoopRunSpecific + 301
30 CoreFoundation 0x3772e36d CFRunLoopRunInMode + 105
31 GraphicsServices 0x33eed439 GSEventRunModal + 137
32 UIKit 0x314dacd5 UIApplicationMain + 1081
33 Evader 0x00171029 main (main.m:14)
34 Evader 0x000dec68 start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3198f32c __pthread_kill + 8
1 libsystem_c.dylib 0x3408c208 pthread_kill + 48
2 libsystem_c.dylib 0x34085298 abort + 88
3 libc++abi.dylib 0x36f12f64 abort_message + 40
4 libc++abi.dylib 0x36f10346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x354dd350 _objc_terminate + 140
6 libc++abi.dylib 0x36f103be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x36f1044a std::terminate() + 14
8 libc++abi.dylib 0x36f1181e __cxa_rethrow + 82
9 libobjc.A.dylib 0x354dd2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x3772e506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3772e366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x33eed432 GSEventRunModal + 130
13 UIKit 0x314dacce UIApplicationMain + 1074
14 Evader 0x00171022 main (main.m:14)
15 Evader 0x000dec60 start + 32
I have tried to look for the error, but I do not know what to look for. Can someone help solve this problem?
CCSprite initWithTexture: raises the exception that causes your app to exit. I'm not entirely up on Cocos2d but a quick check in the documentation suggests it raises exceptions on failure to find named files.
That being the case, I'd guess the problem is simply one of filename case. Macs are by default case insensitive. So if you have FunnyImage.png then the simulator will succeed if you attempt to load funnyimage.png.
iOS devices are case sensitive. So it will fail if you attempt to load funnyimage.png.
So probably what you want to do is check that all the filenames you've used in code exactly match the case of the actual files.