i'm developing a hangman game for iPhone and iPad but sometimes it crashes.
here's the crash log of Xcode:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x353e788f `__exceptionPreprocess`+ 163
1 libobjc.A.dylib 0x3778e259 objc_exception_throw + 33
2 CoreFoundation 0x353e7789 +[NSException raise:format:] + 1
3 CoreFoundation 0x353e77ab +[NSException raise:format:] + 35
4 CoreFoundation 0x35354fed`-[__NSCFString characterAtIndex:]`+ 89
5 Poke Hangman 0x000e41f5 -[ViewController setStringWithDatabase::](ViewController.m:194)
6 Poke Hangman 0x000e388b -[ViewController preparaStringhe:] (ViewController.m:39)
7 Poke Hangman 0x000e4685 -[ViewController cambia] (ViewController.m:248)
8 Poke Hangman 0x000e3bc5 -[ViewController checkChar:] (ViewController.m:81)
9 Poke Hangman 0x000e6155 -[ViewController ButtonG:] (ViewController.m:579)
10 CoreFoundation 0x353413fd -[NSObject performSelector:withObject:withObject:] + 53
11 UIKit 0x32e36e07 -[UIApplication sendAction:to:from:forEvent:] + 63
12 UIKit 0x32e36dc3 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 31
13 UIKit 0x32e36da1 -[UIControl sendAction:to:forEvent:] + 45
14 UIKit 0x32e36b11 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 493
15 UIKit 0x32e37449 -[UIControl touchesEnded:withEvent:] + 477
16 UIKit 0x32e3592b -[UIWindow _sendTouchesForEvent:] + 319
17 UIKit 0x32e35319 -[UIWindow sendEvent:] + 381
18 UIKit 0x32e1b695 -[UIApplication sendEvent:] + 357
19 UIKit 0x32e1af3b _UIApplicationHandleEvent + 5827
20 GraphicsServices 0x36fda22b PurpleEventCallback + 883
21 CoreFoundation 0x353bb523 <br>`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__`+ 39
22 CoreFoundation 0x353bb4c5 __CFRunLoopDoSource1 + 141
23 CoreFoundation 0x353ba313 __CFRunLoopRun + 1371
24 CoreFoundation 0x3533d4a5 CFRunLoopRunSpecific + 301
25 CoreFoundation 0x3533d36d CFRunLoopRunInMode + 105
26 GraphicsServices 0x36fd9439 GSEventRunModal + 137
27 UIKit 0x32e49cd5 UIApplicationMain + 1081
28 Poke Hangman 0x000e3263 main (main.m:16)
29 Poke Hangman 0x000e3208 start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x35c9d32c __pthread_kill + 8
1 libsystem_c.dylib 0x327e9208 pthread_kill + 48
2 libsystem_c.dylib 0x327e2298 abort + 88
3 libc++abi.dylib 0x3579ff64 abort_message + 40
4 libc++abi.dylib 0x3579d346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x3778e350 _objc_terminate + 140
6 libc++abi.dylib 0x3579d3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x3579d44a std::terminate() + 14
8 libc++abi.dylib 0x3579e81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x3778e2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x3533d506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3533d366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x36fd9432 GSEventRunModal + 130
13 UIKit 0x32e49cce UIApplicationMain + 1074
14 Poke Hangman 0x000e325c main (main.m:16)
15 Poke Hangman 0x000e3200 start + 32
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x35c8d3a8 kevent + 24
1 libdispatch.dylib 0x34277f04 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x34277c22 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x35c8d004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35c8d1fa mach_msg + 50
2 CoreFoundation 0x353bb3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x353ba124 __CFRunLoopRun + 876
4 CoreFoundation 0x3533d49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3533d366 CFRunLoopRunInMode + 98
6 WebCore 0x3123cc9c _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x327aa72e _pthread_start + 314
8 libsystem_c.dylib 0x327aa5e8 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3e9f4d98 r6: 0x00000002 r7: 0x2fee09f0
r8: 0x002ad500 r9: 0x00000000 r10: 0x3ee51bc0 r11: 0x00000001
ip: 0x00000148 sp: 0x2fee09e4 lr: 0x327e920f pc: 0x35c9d32c
cpsr: 0x00000010
solved this issue but having a new one:
here's the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x39ee717b`__exceptionPreprocess +`163
1 libobjc.A.dylib 0x34ea095b objc_exception_throw + 31
2 CoreFoundation 0x39ee709d -[NSException initWithCoder:] + 1
3 CoreFoundation 0x39e4bd5b -[__NSCFString characterAtIndex:] + 87
4 Poke Hangman 0x00077493 0x74000 + 13459
5 Poke Hangman 0x0007644b 0x74000 + 9291
6 Poke Hangman 0x00077a35 0x74000 + 14901
7 Poke Hangman 0x00076839 0x74000 + 10297
8 Poke Hangman 0x0007aa7b 0x74000 + 27259
9 UIKit 0x32e4dd09 -[UIApplication sendAction:to:from:forEvent:] + 73
10 UIKit 0x32e4dcbb -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 31
11 UIKit 0x32e4dc95 -[UIControl sendAction:to:forEvent:] + 45
12 UIKit 0x32e4d9eb -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503
13 UIKit 0x32e4e369 -[UIControl touchesEnded:withEvent:] + 489
14 UIKit 0x32e4c791 -[UIWindow _sendTouchesForEvent:] + 525
15 UIKit 0x32e3a72d -[UIApplication sendEvent:] + 381
16 UIKit 0x32e3a009 _UIApplicationHandleEvent + 6057
17 GraphicsServices 0x33f04603 _PurpleEventCallback + 591
18 GraphicsServices 0x33f04233 PurpleEventCallback + 35
19 CoreFoundation 0x39eb7873 `__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__`+ 35
20 CoreFoundation 0x39eb7817 __CFRunLoopDoSource1 + 139
21 CoreFoundation 0x39eb6611 __CFRunLoopRun + 1385
22 CoreFoundation 0x39e33be5 CFRunLoopRunSpecific + 357
23 CoreFoundation 0x39e33a71 CFRunLoopRunInMode + 105
24 GraphicsServices 0x33f0334b GSEventRunModal + 75
25 UIKit 0x32e607f5 UIApplicationMain + 1121
26 Poke Hangman 0x00075f65 0x74000 + 8037
27 Poke Hangman 0x00075f00 0x74000 + 7936
please help me finding the issue..
here's the section where i think it crashes:
isPresent tells if the user char is present in the word or not
if the user char exists in the correct word, in the critted one it get swapped at the position i. if there isn't the char the score get lower by 20.
sorry for my bad english and hope u will help me ;)
bool isPresent = NO;
for (int i = 0; i < correctWord.length; i++)
if (userCharFromButton == [correctWord characterAtIndex:i])
{
criptedWord = [criptedWord stringByReplacingCharactersInRange:NSMakeRange(i, 1.0) withString:[NSString stringWithFormat:#"%c", userCharFromButton]];
isPresent = YES;
}
word.text = criptedWord;
if (isPresent == NO)
currentlyScore -= 20;
//check if the word is complete
bool complete = YES;
for (int i = 1; i < criptedWord.length; i++)
if ([criptedWord characterAtIndex:i] == '-')
complete = NO;
The crash log shows a backtrace which has been symbolised. From there, you can see on the 5th item of your Last Exception Backtrace
5 Poke Hangman 0x000e41f5 -[ViewController setStringWithDatabase::](ViewController.m:194)
It is in your setStringWithDatabase:: in the ViewController class on line 194 which is causing the exception.
On the line above, you can see
4 CoreFoundation 0x35354fed`-[__NSCFString characterAtIndex:]`+ 89
So your setStringWithDatabase:: must be calling a CoreFoundation characterAtIndex: method which you directly call yourself or something you call invokes it around line 194 in your ViewController class. Common cause would be that your string is nil/empty or you are trying to get a character beyond the range.
The problem doesn't seem to be related to using ARC.
[below is the solution to the second bit]
As mentioned in my answer, your second problem also seems to be similar to the first. You need to make sure your string criptedWord is not nil and there isn't something else related to that variable which is crashing it. In order to diagnose further, you need to symbolise your crash logs first.
Related
My app crashes only when I try to run it on my Iphone but doesn't on the simulator, I don't understand how to read a crash log could somebody give me a hint? In Xcode the app crashes at class AppDelegate: UIResponder, UIApplicationDelegate { with the signal SIGABRT
Incident Identifier: 8FF053DB-175C-40E8-9D9C-BD7B357BE6D4
CrashReporter Key: dc449591e2b211cdba4d3655b320f72f9d475cc7
Hardware Model: iPhone3,1
Process: com.zeghetusa.hungrybird [17612]
Path: /var/mobile/Applications/72EBA21E-94CB-4840-9A82-9B5B161C06ED/com.zeghetusa.hungrybird.app/com.zeghetusa.hungrybird
Identifier: com.zeghetusa.hungrybird
Version: 1 (1.0)
Code Type: ARM (Native)
Parent Process: debugserver [17611]
Date/Time: 2015-04-08 17:49:07.247 -0400
OS Version: iOS 7.1 (11D169)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x30a37fce __exceptionPreprocess + 126
1 libobjc.A.dylib 0x3b1e4cca objc_exception_throw + 34
2 CoreFoundation 0x30a3b86e +[NSObject(NSObject) doesNotRecognizeSelector:] + 198
3 CoreFoundation 0x30a3a24e ___forwarding___ + 702
4 CoreFoundation 0x309897f4 _CF_forwarding_prep_0 + 20
5 com.zeghetusa.hungrybird 0x000f8d48 0xb7000 + 269640
6 com.zeghetusa.hungrybird 0x000ebfe0 0xb7000 + 217056
7 com.zeghetusa.hungrybird 0x000efea8 0xb7000 + 233128
8 com.zeghetusa.hungrybird 0x000fb404 0xb7000 + 279556
9 com.zeghetusa.hungrybird 0x000fb94c 0xb7000 + 280908
10 UIKit 0x332584c6 -[UIViewController loadViewIfRequired] + 514
11 UIKit 0x33258284 -[UIViewController view] + 20
12 UIKit 0x33377b1e -[UIWindow handleStatusBarChangeFromHeight:toHeight:] + 698
13 UIKit 0x332ded2a +[UIWindow _noteStatusBarHeightChanged:oldHeight:forAutolayoutRootViewsOnly:] + 234
14 UIKit 0x333df2ca __79-[UIApplication _setStatusBarHidden:animationParameters:changeApplicationFlag:]_block_invoke + 126
15 UIKit 0x332893c0 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 492
16 UIKit 0x333c1ab2 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:completion:] + 66
17 UIKit 0x333046bc -[UIApplication _setStatusBarHidden:animationParameters:changeApplicationFlag:] + 460
18 UIKit 0x3325f348 -[UIApplication _updateCurrentStatusBarViewControllerAppearance] + 244
19 UIKit 0x3325c7fc -[UIWindow _setHidden:forced:] + 228
20 UIKit 0x332c6358 -[UIWindow makeKeyAndVisible] + 56
21 UIKit 0x332c2fc8 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1816
22 UIKit 0x332bd586 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 710
23 UIKit 0x33259704 -[UIApplication handleEvent:withNewEvent:] + 3536
24 UIKit 0x3325886c -[UIApplication sendEvent:] + 68
25 UIKit 0x332bccc4 _UIApplicationHandleEvent + 612
26 GraphicsServices 0x35871ae8 _PurpleEventCallback + 604
27 GraphicsServices 0x358716d2 PurpleEventCallback + 30
28 CoreFoundation 0x30a02ab2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
29 CoreFoundation 0x30a02a4e __CFRunLoopDoSource1 + 342
30 CoreFoundation 0x30a01222 __CFRunLoopRun + 1394
31 CoreFoundation 0x3096bf4a CFRunLoopRunSpecific + 518
32 CoreFoundation 0x3096bd2e CFRunLoopRunInMode + 102
33 UIKit 0x332bbeec -[UIApplication _run] + 756
34 UIKit 0x332b7168 UIApplicationMain + 1132
35 com.zeghetusa.hungrybird 0x000fd164 0xb7000 + 287076
36 com.zeghetusa.hungrybird 0x000fd1a0 0xb7000 + 287136
37 libdyld.dylib 0x3b6f1ab2 tlv_initializer + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3b7a71f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x3b811792 pthread_kill + 54
2 libsystem_c.dylib 0x3b757fd8 abort + 72
3 libc++abi.dylib 0x3aa86cd2 abort_message + 70
4 libc++abi.dylib 0x3aa9f6e0 default_terminate_handler() + 248
5 libobjc.A.dylib 0x3b1e4f62 _objc_terminate() + 190
6 libc++abi.dylib 0x3aa9d1c4 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x3aa9cd28 __cxa_rethrow + 96
8 libobjc.A.dylib 0x3b1e4e12 objc_exception_rethrow + 38
9 CoreFoundation 0x3096bfc0 CFRunLoopRunSpecific + 636
10 CoreFoundation 0x3096bd2e CFRunLoopRunInMode + 102
11 UIKit 0x332bbeec -[UIApplication _run] + 756
12 UIKit 0x332b7168 UIApplicationMain + 1132
13 com.zeghetusa.hungrybird 0x000fd164 0xb7000 + 287076
14 com.zeghetusa.hungrybird 0x000fd1a0 0xb7000 + 287136
15 libdyld.dylib 0x3b6f1ab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x3b7a7c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b80ebda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b80ea94 start_wqthread + 4
Thread 2:
0 libsystem_kernel.dylib 0x3b7a7c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b80ebda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b80ea94 start_wqthread + 4
Thread 3 name: gputools.smt_poll.0x14d341b0
Thread 3:
0 libsystem_kernel.dylib 0x3b7a7544 __semwait_signal + 24
1 libsystem_c.dylib 0x3b718988 nanosleep + 168
2 libsystem_c.dylib 0x3b7188d6 usleep + 46
3 GPUToolsCore 0x0077af34 0x777000 + 16180
4 libsystem_pthread.dylib 0x3b810916 _pthread_body + 138
5 libsystem_pthread.dylib 0x3b810886 _pthread_start + 98
6 libsystem_pthread.dylib 0x3b80eaa0 thread_start + 4
Thread 4:
0 libsystem_kernel.dylib 0x3b7a7c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b80ebda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b80ea94 start_wqthread + 4
Thread 5:
0 libsystem_kernel.dylib 0x3b794808 kevent64 + 24
1 libdispatch.dylib 0x3b6e0de8 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3b6cff6e _dispatch_mgr_thread$VARIANT$up + 34
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x3d51018c r6: 0x00000000 r7: 0x27d4c474
r8: 0x14d93610 r9: 0x00000001 r10: 0x00101dd3 r11: 0x00000000
ip: 0x00000148 sp: 0x27d4c468 lr: 0x3b811797 pc: 0x3b7a71f0
cpsr: 0x00000010
Binary Images:
turns out my error was "Specifically init(fileNamed:) its only Available in iOS 8.0 and later."
I am currently working on an iOS app which crashes and generates the crash report provided below.We think that the app is crashing due to mutation while Fast Enumeration but the error is occurring in NSISEngine.
We also think that the issue is related to constraints of a Table View. This Table View shows info fetched from Rest Services and we are programmatically updating the DataSource in viewWillAppear().
Some of the constraints we are adding programmatically which are as follows:
Method:
1.cellForRowAtIndexPath()
Constraints:
a. Updated UILabel with attributed String to set line height:
[attributedString addAttribute:NSFontAttributeName value:self.font range:NSMakeRange(0, text.length)];
self.attributedText = attributedString;
b. Updated UIImage:
myCell.myLogo.layer.masksToBounds =YES;
myCell.myLogo.layer.opaque = NO;
[[myCell.myLogo layer] setCornerRadius:4.];
c. Border for Table View cell
mySecondCell.secondCellContainerView.layer.masksToBounds = YES;
[mySecondCell.secondCellContainerView.layer setCornerRadius:3.7];
[mySecondCell.secondCellContainerView addBorderWithColorRed:#214 Green:#214 Blue:#214];
[myCell.myLogo addBorderWithColorRed:#214 Green:#214 Blue:#214];
heightForRowAtIndexPath()
Constraints:
We are calculating height on the basis of the content which is dynamic.
We are using StoryBoard and some of the constraints are set there using Auto Layout.
I searched a lot however was unable to find a crash report similar to the one my app generated. I am new to iOS programming. Can somebody help me with debugging this crash report? If there is a constraint causing this issue, can somebody help me figure out the same? Thanks in advance.
Incident Identifier: F155875B-9FD3-425F-85B9-7595617AF52A
CrashReporter Key: aaa79870161ff1e371394b881a26e97f0066f464
Hardware Model: iPhone5,2
Process: myapp [611]
Path: /var/mobile/Applications/40D6D77C-1DBB-4F6B-BEE1-73A67C789C49/myapp.app/myapp
Identifier: com.myapp
Version: 1.0 (0.9)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-10-17 11:16:45.559 +0530
OS Version: iOS 7.0.2 (11A501)
Report Version: 104
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2fc9fe86 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x39f9a6c2 objc_exception_throw + 34
2 CoreFoundation 0x2fc9f974 __NSFastEnumerationMutationHandler + 124
3 Foundation 0x30604f32 -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 438
4 Foundation 0x30607ba2 -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 334
5 Foundation 0x3060594c -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 232
6 Foundation 0x3060546e -[NSISEngine optimize] + 170
7 Foundation 0x306011a8 -[NSISEngine withBehaviors:performModifications:] + 312
8 UIKit 0x32424490 -[UIView(Hierarchy) _postMovedFromSuperview:] + 292
9 UIKit 0x3243114e -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1398
10 UIKit 0x32447a9c -[UIView(Hierarchy) insertSubview:atIndex:] + 32
11 UIKit 0x325fb888 -[UINavigationBar _wrapView:inClippingViewWithLeftBoundary:rightBoundary:leftMaskImage:leftMaskIsChevron:rightMaskImage:] + 240
12 UIKit 0x325b505e -[UINavigationBar _startPopAnimationFromItems:fromBarStyle:toItems:toBarStyle:] + 1982
13 UIKit 0x324f1b88 -[UINavigationBar popNavigationItem] + 1316
14 UIKit 0x324f14a0 -[UINavigationBar _popNavigationItemWithTransition:] + 556
15 UIKit 0x326f02ac ___popViewControllerNormal_block_invoke + 152
16 UIKit 0x324d43a0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 868
17 UIKit 0x324d3fe4 -[UINavigationController __viewWillLayoutSubviews] + 40
18 UIKit 0x324d3f78 -[UILayoutContainerView layoutSubviews] + 180
19 UIKit 0x3242552e -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 342
20 QuartzCore 0x320acf3e -[CALayer layoutSublayers] + 138
21 QuartzCore 0x320a8762 CA::Layer::layout_if_needed(CA::Transaction*) + 346
22 QuartzCore 0x320a85f4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
23 QuartzCore 0x320a8008 CA::Context::commit_transaction(CA::Transaction*) + 224
24 QuartzCore 0x320a7e1a CA::Transaction::commit() + 310
25 QuartzCore 0x320d5436 CA::Transaction::release_thread(void*) + 158
26 libsystem_pthread.dylib 0x3a5af9b0 _pthread_tsd_cleanup + 160
27 libsystem_pthread.dylib 0x3a5af732 _pthread_exit + 82
28 libsystem_pthread.dylib 0x3a5b04b8 pthread_exit + 24
29 Foundation 0x305d7ac6 +[NSThread exit] + 6
30 Foundation 0x30683de0 __NSThread__main__ + 1088
31 libsystem_pthread.dylib 0x3a5b0c58 _pthread_body + 136
32 libsystem_pthread.dylib 0x3a5b0bca _pthread_start + 98
33 libsystem_pthread.dylib 0x3a5aeccc thread_start + 4
Thread 0 Crashed:
0 libsystem_malloc.dylib 0x3a572596 szone_free_definite_size + 1510
1 UIFoundation 0x3754aab4 -[NSAttributeDictionaryEnumerator dealloc] + 68
2 libobjc.A.dylib 0x39fa5b06 objc_object::sidetable_release(bool) + 170
3 libobjc.A.dylib 0x39f9701e (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 354
4 QuartzCore 0x320a1b54 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 64
5 CoreFoundation 0x2fc6af6e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
6 CoreFoundation 0x2fc688fa __CFRunLoopDoObservers + 282
7 CoreFoundation 0x2fc68c46 __CFRunLoopRun + 734
8 CoreFoundation 0x2fbd353c CFRunLoopRunSpecific + 520
9 CoreFoundation 0x2fbd331e CFRunLoopRunInMode + 102
10 GraphicsServices 0x3490a2e6 GSEventRunModal + 134
11 UIKit 0x3248a1e0 UIApplicationMain + 1132
12 myapp 0x000aac16 main (main.mm:16)
13 libdyld.dylib 0x3a493ab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x3a537838 kevent64 + 24
1 libdispatch.dylib 0x3a4860d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3a48063e _dispatch_mgr_thread + 34
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x3a537a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a53787c mach_msg + 36
2 CoreFoundation 0x2fc6a55c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2fc68c7c __CFRunLoopRun + 788
4 CoreFoundation 0x2fbd353c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2fbd331e CFRunLoopRunInMode + 102
6 Foundation 0x3060e64c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x30683dc2 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x3a5b0c5a _pthread_body + 138
9 libsystem_pthread.dylib 0x3a5b0bca _pthread_start + 98
10 libsystem_pthread.dylib 0x3a5aeccc thread_start + 4
Thread 3 name: com.apple.CFSocket.private
Thread 3:
0 libsystem_kernel.dylib 0x3a54a440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x2fc6e45e __CFSocketManager + 482
2 libsystem_pthread.dylib 0x3a5b0c5a _pthread_body + 138
3 libsystem_pthread.dylib 0x3a5b0bca _pthread_start + 98
4 libsystem_pthread.dylib 0x3a5aeccc thread_start + 4
[12:37:06 PM] Devika Deshmukh: Thread 4:
0 libsystem_kernel.dylib 0x3a537a84 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3a53787c mach_msg + 36
2 CoreFoundation 0x2fc6a55c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2fc68c7c __CFRunLoopRun + 788
4 CoreFoundation 0x2fbd353c CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2fbd331e CFRunLoopRunInMode + 102
6 Foundation 0x305c1822 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x30612664 -[NSRunLoop(NSRunLoop) run] + 76
8 myapp 0x00197bdc +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:160)
9 Foundation 0x30683dc2 __NSThread__main__ + 1058
10 libsystem_pthread.dylib 0x3a5b0c5a _pthread_body + 138
11 libsystem_pthread.dylib 0x3a5b0bca _pthread_start + 98
12 libsystem_pthread.dylib 0x3a5aeccc thread_start + 4
Thread 5:
0 libsystem_c.dylib 0x3a4fb09e __abort + 102
1 libsystem_c.dylib 0x3a4fb034 abort + 84
2 myapp 0x001bd8ea ___lldb_unnamed_function5196$$myapp + 22
3 CoreFoundation 0x2fca018a __handleUncaughtException + 578
4 libobjc.A.dylib 0x39f9a924 _objc_terminate() + 172
5 libc++abi.dylib 0x399601b0 std::__terminate(void (*)()) + 76
6 libc++abi.dylib 0x3995fa04 __cxa_throw + 112
7 libobjc.A.dylib 0x39f9a796 objc_exception_throw + 246
8 CoreFoundation 0x2fc9f974 __NSFastEnumerationMutationHandler + 124
9 Foundation 0x30604f32 -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 438
10 Foundation 0x30607ba2 -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 334
11 Foundation 0x3060594c -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 232
12 Foundation 0x3060546e -[NSISEngine optimize] + 170
13 Foundation 0x306011a8 -[NSISEngine withBehaviors:performModifications:] + 312
14 UIKit 0x32424490 -[UIView(Hierarchy) _postMovedFromSuperview:] + 292
15 UIKit 0x3243114e -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1398
16 UIKit 0x32447a9c -[UIView(Hierarchy) insertSubview:atIndex:] + 32
17 UIKit 0x325fb888 -[UINavigationBar _wrapView:inClippingViewWithLeftBoundary:rightBoundary:leftMaskImage:leftMaskIsChevron:rightMaskImage:] + 240
18 UIKit 0x325b505e -[UINavigationBar _startPopAnimationFromItems:fromBarStyle:toItems:toBarStyle:] + 1982
19 UIKit 0x324f1b88 -[UINavigationBar popNavigationItem] + 1316
20 UIKit 0x324f14a0 -[UINavigationBar _popNavigationItemWithTransition:] + 556
21 UIKit 0x326f02ac ___popViewControllerNormal_block_invoke + 152
22 UIKit 0x324d43a2 -[UINavigationController _startDeferredTransitionIfNeeded:] + 870
23 UIKit 0x324d3fe4 -[UINavigationController __viewWillLayoutSubviews] + 40
24 UIKit 0x324d3f78 -[UILayoutContainerView layoutSubviews] + 180
25 UIKit 0x3242552e -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 342
26 QuartzCore 0x320acf3e -[CALayer layoutSublayers] + 138
27 QuartzCore 0x320a8762 CA::Layer::layout_if_needed(CA::Transaction*) + 346
28 QuartzCore 0x320a85f4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
29 QuartzCore 0x320a8008 CA::Context::commit_transaction(CA::Transaction*) + 224
30 QuartzCore 0x320a7e1a CA::Transaction::commit() + 310
31 QuartzCore 0x320d5436 CA::Transaction::release_thread(void*) + 158
32 libsystem_pthread.dylib 0x3a5af9b2 _pthread_tsd_cleanup + 162
33 libsystem_pthread.dylib 0x3a5af732 _pthread_exit + 82
34 libsystem_pthread.dylib 0x3a5b04b8 pthread_exit + 24
35 Foundation 0x305d7ac6 +[NSThread exit] + 6
36 Foundation 0x30683de0 __NSThread__main__ + 1088
37 libsystem_pthread.dylib 0x3a5b0c5a _pthread_body + 138
38 libsystem_pthread.dylib 0x3a5b0bca _pthread_start + 98
39 libsystem_pthread.dylib 0x3a5aeccc thread_start + 4
Thread 6:
0 libsystem_kernel.dylib 0x3a54ac7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a5aee06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3a5aecc0 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00280a00 r1: 0xfffff000 r2: 0x17f9a000 r3: 0x0000000c
r4: 0x17f99650 r5: 0x3c32fe08 r6: 0x3c32fe00 r7: 0x27d5cb50
r8: 0x00000001 r9: 0x00000fff r10: 0x17f99650 r11: 0x0000008a
ip: 0x17f99db0 sp: 0x27d5cb4c lr: 0x39f96e39 pc: 0x3a572596
cpsr: 0x20000030
Update:
Following is the code by which we are populating our datasource:
(void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
viewWillAppearFlag = true;
if(dataFetched) {
[self setupDatasourceDetails:self.myData];
}
}
(void) setupDatasourceDetails:(NSArray *)data {
self.datasource = [MyDatasource new];
self.datasource.data=data;
[self.myTable setDataSource:self.datasource];
[self.myTable setDelegate:self.datasource];
[self.myTable reloadData];
}
//Callback from REST services
(void) onDataFetched:(NSArray *)data{
dataFetched=true;
self.myData=data;
if(viewWillAppearFlag){
[self setupDatasourceDetails:self.myData]; //the event which will occur later(either viewWillAppear or dataFetched) calls setupDatasourceDetails
}
}
Update:
The error is occurring while transition back from one view controller to another (in navigation controller).
We are using [self.navigationController popViewControllerAnimated:YES]; to transition back to the previous view controller. The transition is happening on the Main thread.
Let us know if any more information is required.
Update
It seems that our problem has been resolved. We moved the functionality from viewWillAppear to viewDidAppear. This fix seems to have resolved the issue. Does anyone know the reason why this fix worked? Please let us know. Thanks.
Two suggestions:
Check that self.datasource is defined as strong property (not
weak) (and the data property on MyDatasource)
Make sure
onDataFetched:is called on the main queue. If unsure, use this
dispatching mechanism instead:
dispatch_async(dispatch_get_main_queue(), ^{
// all update code here
});
I don't think the error is directly in the code you posted, but:
NSFastEnumerationMutationHandler
is raised when you are editing an array or dictionary while enumerating it.
For example this is wrong:
for ( id obj in anArray ) {
if ( [obj shouldRemove == YES ) {
[anArray removeObject:obj];
}
}
If you need to do that you should work with a copy of an array or use filteredArrayUsingPredicate.
Can't see all of your code, but I am thinking you need to call layoutIfNeeded before setting the constraints as the views are not calculated before ViewWillAppear. The fact that it succeeds in ViewDidAppear is because the elements have been calculated. Alternately, you could try your code in DidLayoutSubviews.
I've a question within my App and I don't know how to fix this, because it's the first time of developing IOS Apps for me. The App works fine on Simulator and my Iphone 3gs. But on my Ipod touch it won't work.
So my crash log shows me something like this:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x312f488f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x37632259 objc_exception_throw + 33
2 CoreFoundation 0x312f7a9b -[NSObject doesNotRecognizeSelector:] + 175
3 CoreFoundation 0x312f6915 ___forwarding___ + 301
4 CoreFoundation 0x31251650 _CF_forwarding_prep_0 + 48
5 CoreFoundation 0x3124e3fd -[NSObject performSelector:withObject:withObject:] + 53
6 UIKit 0x3099ae07 -[UIApplication sendAction:to:from:forEvent:] + 63
7 UIKit 0x3099adc3 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 31
8 UIKit 0x3099ada1 -[UIControl sendAction:to:forEvent:] + 45
9 UIKit 0x3099ab11 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 493
10 UIKit 0x3099b449 -[UIControl touchesEnded:withEvent:] + 477
11 UIKit 0x3099992b -[UIWindow _sendTouchesForEvent:] + 319
12 UIKit 0x30999319 -[UIWindow sendEvent:] + 381
13 UIKit 0x3097f695 -[UIApplication sendEvent:] + 357
14 UIKit 0x3097ef3b _UIApplicationHandleEvent + 5827
15 GraphicsServices 0x332c522b PurpleEventCallback + 883
16 CoreFoundation 0x312c8523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
17 CoreFoundation 0x312c84c5 __CFRunLoopDoSource1 + 141
18 CoreFoundation 0x312c7313 __CFRunLoopRun + 1371
19 CoreFoundation 0x3124a4a5 CFRunLoopRunSpecific + 301
20 CoreFoundation 0x3124a36d CFRunLoopRunInMode + 105
21 GraphicsServices 0x332c4439 GSEventRunModal + 137
22 UIKit 0x309adcd5 UIApplicationMain + 1081
23 My App 0x00097045 0x95000 + 8261
24 My App 0x00096078 0x95000 + 4216
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x37f0e32c __pthread_kill + 8
1 libsystem_c.dylib 0x353d9208 pthread_kill + 48
2 libsystem_c.dylib 0x353d2298 abort + 88
3 libc++abi.dylib 0x373a1f64 abort_message + 40
4 libc++abi.dylib 0x3739f346 default_terminate() + 18
5 libobjc.A.dylib 0x37632350 _objc_terminate + 140
6 libc++abi.dylib 0x3739f3be safe_handler_caller(void (*)()) + 70
7 libc++abi.dylib 0x3739f44a std::terminate() + 14
8 libc++abi.dylib 0x373a081e __cxa_rethrow + 82
9 libobjc.A.dylib 0x376322a2 objc_exception_rethrow + 6
10 CoreFoundation 0x3124a506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3124a366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x332c4432 GSEventRunModal + 130
13 UIKit 0x309adcce UIApplicationMain + 1074
14 My App 0x0009703e 0x95000 + 8254
15 My App 0x00096070 0x95000 + 4208
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x37efe3a8 kevent + 24
1 libdispatch.dylib 0x35b18ea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x35b18bc2 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x37efe004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x37efe1fa mach_msg + 50
2 CoreFoundation 0x312c83ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x312c7124 __CFRunLoopRun + 876
4 CoreFoundation 0x3124a49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3124a366 CFRunLoopRunInMode + 98
6 WebCore 0x363eec9c RunWebThread(void*) + 396
7 libsystem_c.dylib 0x3539a72e _pthread_start + 314
8 libsystem_c.dylib 0x3539a5e8 thread_start + 0
Thread 3:
0 libsystem_kernel.dylib 0x37f0ecd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x35394f36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x35394cc8 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x37f0ecd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x35394f36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x35394cc8 start_wqthread + 0
Thread 5:
0 libsystem_kernel.dylib 0x37f0ecd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x35394f36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x35394cc8 start_wqthread + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3f22bd98 r6: 0x00000002 r7: 0x2fe93a08
r8: 0x0012eac0 r9: 0x373a2a4a r10: 0x00000000 r11: 0x0e031d60
ip: 0x00000148 sp: 0x2fe939fc lr: 0x353d920f pc: 0x37f0e32c
cpsr: 0x000f0010
And another thing is that some views are loading slowly and it mostly crashes on my Ipod touch 4g (on 3gs it works fine, 4 I don't know, 4s I don't know, 5 I don't know).
Sometimes it shows me on my crash logs the name of my app like this ^, and sometimes it shows me Process:Unknown Type:Unknown. Any suggestions what to do?
And in the Unknown one there's not a crash log it doesnt look like.
Your errors seems to have to deal with device compatibility and some people are facing the same errors like you. Take a look at this https://discussions.apple.com/thread/4317775?start=0&tstart=0
I'm starting to get desperate and I need advice. Here's the situation:
My recently updated App has started to crash directly on startup on some devices.
It did not before the update.
I cannot replicate this, although I have exactly the same device and software version.
It does not matter if it is a fresh uninstall/install or update, it crashes anyways.
The crash logs do not tell me anything useful. Here is one, perhaps someone smarter than me knows what happened:
Incident Identifier: 52C11BF9-A202-4ECC-B227-4A57899CB2E1
CrashReporter Key: 3129de7e18ddccceb41bf4d0ad0465bc2e66df29
Hardware Model: iPhone3,1
Process: GT-BetApp [3364]
Path: /var/mobile/Applications/5E9BA5D7-4337-44CD-BDAB-CE653680EEB3/GT-BetApp.app/GT-BetApp
Identifier: GT-BetApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-01-24 18:59:34.573 +0100
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x344258bf __exceptionPreprocess + 163
1 libobjc.A.dylib 0x346751e5 objc_exception_throw + 33
2 CoreFoundation 0x344257b9 +[NSException raise:format:] + 1
3 CoreFoundation 0x344257db +[NSException raise:format:] + 35
4 UIKit 0x37a42747 -[UINib instantiateWithOwner:options:] + 1567
5 UIKit 0x37a43bb9 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 137
6 UIKit 0x3797ca45 -[UIApplication _loadMainNibFileNamed:bundle:] + 37
7 UIKit 0x37806227 -[UIApplication _loadMainInterfaceFile] + 223
8 UIKit 0x37800313 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 227
9 UIKit 0x377ce921 -[UIApplication handleEvent:withNewEvent:] + 1017
10 UIKit 0x377ce3bf -[UIApplication sendEvent:] + 55
11 UIKit 0x377cdd2d _UIApplicationHandleEvent + 5809
12 GraphicsServices 0x30c00df3 PurpleEventCallback + 883
13 CoreFoundation 0x343f9553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
14 CoreFoundation 0x343f94f5 __CFRunLoopDoSource1 + 141
15 CoreFoundation 0x343f8343 __CFRunLoopRun + 1371
16 CoreFoundation 0x3437b4dd CFRunLoopRunSpecific + 301
17 CoreFoundation 0x3437b3a5 CFRunLoopRunInMode + 105
18 UIKit 0x377ff457 -[UIApplication _run] + 551
19 UIKit 0x377fc743 UIApplicationMain + 1091
20 GT-BetApp 0x00002c79 main (main.m:15)
21 GT-BetApp 0x00002c44 0x1000 + 7236
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3634032c __pthread_kill + 8
1 libsystem_c.dylib 0x33209f54 pthread_kill + 48
2 libsystem_c.dylib 0x33202fe4 abort + 88
3 libc++abi.dylib 0x3384cf64 abort_message + 40
4 libc++abi.dylib 0x3384a346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x346752dc _objc_terminate + 140
6 libc++abi.dylib 0x3384a3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x3384a44a std::terminate() + 14
8 libc++abi.dylib 0x3384b81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x3467522e objc_exception_rethrow + 6
10 CoreFoundation 0x3437b53e CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3437b39e CFRunLoopRunInMode + 98
12 UIKit 0x377ff450 -[UIApplication _run] + 544
13 UIKit 0x377fc73c UIApplicationMain + 1084
14 GT-BetApp 0x00002c72 main (main.m:14)
15 GT-BetApp 0x00002c3c 0x1000 + 7228
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x363303b4 kevent + 24
1 libdispatch.dylib 0x3705ae78 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x3705ab96 _dispatch_mgr_thread + 30
Thread 2:
0 libsystem_kernel.dylib 0x36340cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x331c630a _pthread_wqthread + 610
2 libsystem_c.dylib 0x331c609c start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x36340cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x331c630a _pthread_wqthread + 610
2 libsystem_c.dylib 0x331c609c start_wqthread + 0
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x36330010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36330206 mach_msg + 50
2 CoreFoundation 0x343f941c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x343f8154 __CFRunLoopRun + 876
4 CoreFoundation 0x3437b4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3437b39e CFRunLoopRunInMode + 98
6 WebCore 0x3684f128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x331cbc16 _pthread_start + 314
8 libsystem_c.dylib 0x331cbad0 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3eaf3ce8 r6: 0x00000002 r7: 0x2fdffa60
r8: 0x3fd97dec r9: 0x3384da4a r10: 0x0015d9e0 r11: 0x00156150
ip: 0x00000148 sp: 0x2fdffa54 lr: 0x33209f5b pc: 0x3634032c
cpsr: 0x00000010
As the only reference to my code in the report is to main.m, here it is:
#import <UIKit/UIKit.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
So here is my question: How can I determine the cause? What can I do to get more information on this crash (I can send versions to someone who experiences this crash)? What can I do to prevent it?
Any advice is much appreciated and thank you in advance!
UPDATE:
I found the solution and it was a silly mistake on my part.
The MainWindow.xib could not load when there was no localization for the device's language. I always thought, it would fall back English, but it did not (anymore).
In previous versions, this was never an issue. I don't know why this behavior changed.
Thanks for all the replies, you helped me search in the right direction!
The application is trying to read the main nib file, as specified in your app's Info.plist file.
In the plist file there is an entry like
NSMainNibFile -> MyMainWindow
which UIApplicationMain uses to load your initial view controller from. This file seems to be damaged. A common error is to use a custom class for a contained object and then change/remove that class later without changing the nib file.
To further understand the error it would be very helpful to know the description of the exception that's being raised. You'll find that in the console log.
I have developed and iPhone app and it seems to work fine on the simulator 5.0. However, when I tried to test it on the real device, an iphone w/ ios 5, it's not working.
The app launched but all I see was a black screen.
Here's the crash log I found in the Device Log
Sorry I am pretty new to this.. I am not sure if these are symbolicated. (seems like they are?)
Incident Identifier: B2601015-4CBF-478D-B9C3-2D2B4BEED892
CrashReporter Key: 9c71d7c2ed64b2862a0a6d90e3d4ce839868a03c
Hardware Model: iPhone4,1
Process: memoryChallenger [21037]
Path: /var/mobile/Applications/C0981716-8CDF-4816-8E94- 261CD8F164FD/memoryChallenger.app/memoryChallenger
Identifier: memoryChallenger
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-01-30 21:54:18.753 -0800
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x37ecb8bf __exceptionPreprocess + 163
1 libobjc.A.dylib 0x319b11e5 objc_exception_throw + 33
2 CoreFoundation 0x37ecb7b9 +[NSException raise:format:] + 1
3 CoreFoundation 0x37ecb7db +[NSException raise:format:] + 35
4 UIKit 0x354f7747 -[UINib instantiateWithOwner:options:] + 1567
5 UIKit 0x354f8bb9 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 137
6 UIKit 0x35431a45 -[UIApplication _loadMainNibFileNamed:bundle:] + 37
7 UIKit 0x352bb227 -[UIApplication _loadMainInterfaceFile] + 223
8 UIKit 0x352b5313 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 227
9 UIKit 0x35283921 -[UIApplication handleEvent:withNewEvent:] + 1017
10 UIKit 0x352833bf -[UIApplication sendEvent:] + 55
11 UIKit 0x35282d2d _UIApplicationHandleEvent + 5809
12 GraphicsServices 0x379a0df3 PurpleEventCallback + 883
13 CoreFoundation 0x37e9f553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
14 CoreFoundation 0x37e9f4f5 __CFRunLoopDoSource1 + 141
15 CoreFoundation 0x37e9e343 __CFRunLoopRun + 1371
16 CoreFoundation 0x37e214dd CFRunLoopRunSpecific + 301
17 CoreFoundation 0x37e213a5 CFRunLoopRunInMode + 105
18 UIKit 0x352b4457 -[UIApplication _run] + 551
19 UIKit 0x352b1743 UIApplicationMain + 1091
20 memoryChallenger 0x000050d9 main (main.m:14)
21 memoryChallenger 0x000027ec start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3376532c __pthread_kill + 8
1 libsystem_c.dylib 0x36331f54 pthread_kill + 48
2 libsystem_c.dylib 0x3632afe4 abort + 88
3 libc++abi.dylib 0x37e10f64 abort_message + 40
4 libc++abi.dylib 0x37e0e346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x319b12dc _objc_terminate + 140
6 libc++abi.dylib 0x37e0e3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x37e0e44a std::terminate() + 14
8 libc++abi.dylib 0x37e0f81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x319b122e objc_exception_rethrow + 6
10 CoreFoundation 0x37e2153e CFRunLoopRunSpecific + 398
11 CoreFoundation 0x37e2139e CFRunLoopRunInMode + 98
12 UIKit 0x352b4450 -[UIApplication _run] + 544
13 UIKit 0x352b173c UIApplicationMain + 1084
14 memoryChallenger 0x000050d2 main (main.m:14)
15 memoryChallenger 0x000027e4 start + 32
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x337553b4 kevent + 24
1 libdispatch.dylib 0x37b89f74 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x37b89c92 _dispatch_mgr_thread + 30
Thread 2:
0 libsystem_kernel.dylib 0x33765cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x362ee30a _pthread_wqthread + 610
2 libsystem_c.dylib 0x362ee09c start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x33765cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x362ee30a _pthread_wqthread + 610
2 libsystem_c.dylib 0x362ee09c start_wqthread + 0
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x33755010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x33755206 mach_msg + 50
2 CoreFoundation 0x37e9f41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x37e9e154 __CFRunLoopRun + 876
4 CoreFoundation 0x37e214d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x37e2139e CFRunLoopRunInMode + 98
6 WebCore 0x326f2128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x362f3c16 _pthread_start + 314
8 libsystem_c.dylib 0x362f3ad0 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3f31dce8 r6: 0x00000002 r7: 0x2fdff864
r8: 0x3f14edec r9: 0x00000000 r10: 0x00188cc0 r11: 0x00185b40
ip: 0x00000148 sp: 0x2fdff858 lr: 0x36331f5b pc: 0x3376532c
cpsr: 0x00000010
it seems like this line here is what I am looking for..
20 memoryChallenger 0x000050d9 main (main.m:14)
and it's this line in main:
int retVal = UIApplicationMain(argc, argv, nil, nil);
But it's not getting me anywhere..
Can someone please guide me to the right direction?
Thanks!
From this line,
-[UINib instantiateWithOwner:options:] + 1567
it looks like your application's XIB file wasn't copied over properly to device.
Do a clean install.
For my case, it is due to the XIB file not found for iOS 5 (even though it's copied into the app bundle).
It is due to using Base Internationalization, which is only supported in iOS 6.
Strangely, running on Simulator with iOS 5 will work. That got to be a bug.
I have detailed my experience after releasing my app with this dumb startup crash: http://samwize.com/2012/11/22/warning-do-not-use-base-internationalization-in-ios-5/
In IB, xib's Target Membership -> current target is not checked
Just another scenario when this occurs.