So something happened with my Xcode where I continuously keep getting Thread 1 SIGABRT error.
I have literally tried what every message board has suggested, and don't know where to turn to next. I know its not an issue with outlets, because I ensured there was no outlet on the storyboard. I tried opening past projects (which worked perfectly fine in the past) but they too crashed with this error. It seems like there is something wrong with Xcode itself. It will always crash any project that has any elements on the storyboard.
Could anyone help and make sense of this?
2016-08-17 18:58:58.482 wazSUP[2002:41440] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can't set default ACL before Parse is initialized.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e6f1d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000110624deb objc_exception_throw + 48
2 CoreFoundation 0x000000010e6f1cbd +[NSException raise:format:] + 205
3 wazSUP 0x000000010dd40f5a +[PFACL setDefaultACL:withAccessForCurrentUser:] + 175
4 wazSUP 0x000000010dd35bf1 _TFC6wazSUP11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 401
5 wazSUP 0x000000010dd362a4 _TToFC6wazSUP11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 180
6 UIKit 0x000000010f09f9ac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
7 UIKit 0x000000010f0a0c0d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
8 UIKit 0x000000010f0a7568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
9 UIKit 0x000000010f0a4714 -[UIApplication workspaceDidEndTransaction:] + 188
10 FrontBoardServices 0x0000000111c7c8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
11 FrontBoardServices 0x0000000111c7c741 -[FBSSerialQueue _performNext] + 178
12 FrontBoardServices 0x0000000111c7caca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
13 CoreFoundation 0x000000010e617301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 CoreFoundation 0x000000010e60d22c __CFRunLoopDoSources0 + 556
15 CoreFoundation 0x000000010e60c6e3 __CFRunLoopRun + 867
16 CoreFoundation 0x000000010e60c0f8 CFRunLoopRunSpecific + 488
17 UIKit 0x000000010f0a3f21 -[UIApplication _run] + 402
18 UIKit 0x000000010f0a8f09 UIApplicationMain + 171
19 wazSUP 0x000000010dd36f22 main + 114
20 libdyld.dylib 0x000000011112b92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Ok, I have not seen your code so I do not know exactly what to do to fix it but I can explain Thread 1 SIGABRT to you.
The bug can be caused in 2 ways:
If you have the code for an IBOUTLET but deleted the connection from the view controller to the program or Vice Versa it will cause the bug
Also doing self.addChild(nodeName) multiple times to the same node without removing between the 2 occurrences can cause it as well.
Hope this helped.
Related
I have an app which seems to work fine in debug mode, but now it's live in the app store it crashes every time. I have managed to find a crash log, which shows the following:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3238329e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x3a22e97a objc_exception_throw + 26
2 UIKit 0x3451837c +[UIStoryboard storyboardWithName:bundle:] + 436
3 UIKit 0x3435a58e -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 38
4 UIKit 0x341e379c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 524
5 UIKit 0x3418bc34 -[UIApplication handleEvent:withNewEvent:] + 1000
6 UIKit 0x3418b6c8 -[UIApplication sendEvent:] + 68
7 UIKit 0x3418b116 _UIApplicationHandleEvent + 6150
8 GraphicsServices 0x35e9659e _PurpleEventCallback + 586
9 GraphicsServices 0x35e961ce PurpleEventCallback + 30
10 CoreFoundation 0x3235816e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
11 CoreFoundation 0x32358112 __CFRunLoopDoSource1 + 134
12 CoreFoundation 0x32356f94 __CFRunLoopRun + 1380
13 CoreFoundation 0x322c9eb8 CFRunLoopRunSpecific + 352
14 CoreFoundation 0x322c9d44 CFRunLoopRunInMode + 100
15 UIKit 0x341e2480 -[UIApplication _run] + 664
16 UIKit 0x341df2fc UIApplicationMain + 1116
Does anyone know what this means? I really need to submit an update for this app quickly so I need to fix it.
One great place to start is this link:
http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
It will show you how to read your crash log.
For instance EXC_CRASH (SIGABRT) means:
The exception code is a SIGABRT. Usually, a SIGABRT exception is raised when an object receives an unimplemented message. Or to put it in simpler terms, there’s a call for a nonexistent method on an object.
This should give you a hint as to what the problem is. It's not in your code as you can see that your classes are not called in the list to the right.
I would also say that if it doesn't work in the app store you might make sure that it works for all languages on Ad-Hoc. Maybe something is missing from your storyboard?
Check the storyboard names. Make sure you have a main storyboard selected for ipad and that the name matches.
I am developing an iPad application with SDK4.2. I have a very strange error when touching any textField in my application. The first time I touch, the keyboard is shown, but when a second touch is done in the object I obtain following trace.
And it occurs also in any TextField shown in a HTML page with a UIWebView object.
Any ideas?
I am really confused with this.. Thanks in advance!
2010-12-17 11:53:11.697 BancoPopular[48914:207] *** Assertion failure in -[UIButtonLabel setTextColor:], /SourceCache/UIKit_Sim/UIKit-1447.6.4/UILabel.m:314
2010-12-17 11:53:11.699 BancoPopular[48914:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: color'
*** Call stack at first throw:
(
0 CoreFoundation 0x01730be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x018855c2 objc_exception_throw + 47
2 CoreFoundation 0x016e9628 +[NSException raise:format:arguments:] + 136
3 Foundation 0x0013947b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 UIKit 0x0045d1dc -[UILabel setTextColor:] + 164
5 UIKit 0x0052177b -[UIButton layoutSubviews] + 1337
6 UIKit 0x005f3420 -[UICalloutBarButton layoutSubviews] + 54
7 QuartzCore 0x011a4451 -[CALayer layoutSublayers] + 181
8 QuartzCore 0x011a417c CALayerLayoutIfNeeded + 220
9 QuartzCore 0x011a4088 -[CALayer layoutIfNeeded] + 111
10 UIKit 0x0051f2ff -[UIButton titleLabel] + 81
11 UIKit 0x005f81d1 -[UICalloutBarButton setContentScale:] + 141
12 UIKit 0x005f6c5d -[UICalloutBar _updateVisibleItems] + 2240
13 UIKit 0x005f2970 -[UICalloutBar appear] + 211
14 UIKit 0x005eaaa9 -[UITextSelectionView showCommandsWithReplacements:] + 291
15 Foundation 0x000bd7f6 __NSFireDelayedPerform + 441
16 CoreFoundation 0x01711fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
17 CoreFoundation 0x01713594 __CFRunLoopDoTimer + 1220
18 CoreFoundation 0x0166fcc9 __CFRunLoopRun + 1817
19 CoreFoundation 0x0166f240 CFRunLoopRunSpecific + 208
20 CoreFoundation 0x0166f161 CFRunLoopRunInMode + 97
21 GraphicsServices 0x01e25268 GSEventRunModal + 217
22 GraphicsServices 0x01e2532d GSEventRun + 115
23 UIKit 0x0034d42e UIApplicationMain + 1160
24 BancoPopular 0x0000292e main + 84
25 BancoPopular 0x000028d1 start + 53
26 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Look carefully what exception was about. It said "reason: 'Invalid parameter not satisfying: color'", somewhere in your code, you provide wrong parameter that is supposed to be valid colors. Apparently, it seems like you use UIButton with label and set its color but not valid.
My guess is that you have some object going away somewhere, and that object contains the "color" value.
Most likely you received an autoreleased value from some call and did not retain it, so it went "poof" when the UI came up for air.
I had two apps in xcode, which i wanted to combine, so i started a new project and attempted to put the two apps together in this new one. Was this a really stupid thing to do?
The app now crashes on start up and i have no idea why, i'm 99% the outlets are all connected. It uses xcdatamodel for storage and i've imported the right framework.
Can anyone think of any other things that could be going wrong?
I can attach a zip file with the project in if someone wouldn't mind having a look
Any help is massively appreciated!
Thanks
This is the stack trace:
2010-11-02 08:18:59.903 iStalker[34745:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x5b10e20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key textField.'
*** Call stack at first throw:
(
0 CoreFoundation 0x0256f919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x026bd5de objc_exception_throw + 47
2 CoreFoundation 0x0256f851 -[NSException raise] + 17
3 Foundation 0x0003bc2b _NSSetUsingKeyValueSetter + 135
4 Foundation 0x0003bb99 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x004b5d0a -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x024e5b6f -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x004b4721 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x004b64b5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x002c59bb -[UIApplication _loadMainNibFile] + 172
10 UIKit 0x002c690d -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 198
11 UIKit 0x002d0452 -[UIApplication handleEvent:withNewEvent:] + 1958
12 UIKit 0x002c9074 -[UIApplication sendEvent:] + 71
13 UIKit 0x002cdac4 _UIApplicationHandleEvent + 7495
14 GraphicsServices 0x02dd5afa PurpleEventCallback + 1578
15 CoreFoundation 0x02550dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x024b1737 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x024ae9c3 __CFRunLoopRun + 979
18 CoreFoundation 0x024ae280 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x024ae1a1 CFRunLoopRunInMode + 97
20 UIKit 0x002c6226 -[UIApplication _run] + 625
21 UIKit 0x002d1b58 UIApplicationMain + 1160
22 iStalker 0x00001b50 main + 102
23 iStalker 0x00001ae1 start + 53
)
terminate called after throwing an instance of 'NSException'
Looks like you have a text field connected to the application delegate in your main XIB. There is no such field defined on the real application delegate, which is why you’re getting the error.
Thats because you set main xib for app in info plist and set File Owner to appDelegate, while main xib file's owner is always UIApplication. Possible solution - add Object to .xib, set its class for appDelegate class and connect all unnecessary outlets. This worked for me.
I am using ShareKit to allow the user to share their score on Twitter and Facebook in my iPhone app. However, it seems to crash shortly after sharing on either service. I get an console message which says:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString rangeOfString:options:range:locale:]: nil argument'
*** Call stack at first throw:
(
0 CoreFoundation 0x026d6919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x028245de objc_exception_throw + 47
2 CoreFoundation 0x0268f078 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x0268efea +[NSException raise:format:] + 58
4 Foundation 0x0008f97b -[NSString rangeOfString:options:range:locale:] + 424
5 Foundation 0x0009de16 -[NSString rangeOfString:] + 104
6 iPhone Typer 0x00030220 -[SHKOAuthView webView:shouldStartLoadWithRequest:navigationType:] + 151
7 UIKit 0x004bb456 -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 458
8 CoreFoundation 0x0264742d __invoking___ + 29
9 CoreFoundation 0x02647301 -[NSInvocation invoke] + 145
10 WebCore 0x030940f0 _ZL20HandleDelegateSourcePv + 64
11 CoreFoundation 0x026b7d7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
12 CoreFoundation 0x026162cb __CFRunLoopDoSources0 + 571
13 CoreFoundation 0x026157c6 __CFRunLoopRun + 470
14 CoreFoundation 0x02615280 CFRunLoopRunSpecific + 208
15 CoreFoundation 0x026151a1 CFRunLoopRunInMode + 97
16 GraphicsServices 0x02e5e2c8 GSEventRunModal + 217
17 GraphicsServices 0x02e5e38d GSEventRun + 115
18 UIKit 0x00339b58 UIApplicationMain + 1160
19 iPhone Typer 0x00002894 main + 102
20 iPhone Typer 0x00002825 start + 53
)
terminate called after throwing an instance of 'NSException'
How would I fix this? Thanks.
Set a breakpoint on objc_exception_throw, then build the app for debug, run the app with breakpoints on and cause the crash again, then go up the stack to the relevant code.
Something inside SHKOAuthView webView:shouldStartLoadWithRequest:navigationType: is passing a nil argument to NSString rangeOfString. When you know what is passing the nil, it may be obvious what the problem is - failing that update your question with the relevant code and any extra information you've determined.
My iPhone app is a Tab Bar Application, which has 5 tabs. In each tab, there is a table view, embedded with navigation controller. When these table views appear, data will be loaded from database.
When I switch the tabs very fast by tapping the tab bar randomly, the app crashes sometimes.
The error is:
+[UIWindow length]: unrecognized selector sent to class 0x3e055bd4
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIWindow length]: unrecognized selector sent to class 0x3e055bd4'
terminate called after throwing an instance of 'NSException'
Does anyone have advices or hints about find out the reason of the problem?
P.S. I created another similar but simpler app, which cannot be crashed by this way.
More info about calling stack:
> *** Call stack at first throw:
(
0 CoreFoundation 0x31785fd3 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x320118a5 objc_exception_throw + 24
2 CoreFoundation 0x31789af3 +[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x31788f15 ___forwarding___ + 508
4 CoreFoundation 0x3171b680 _CF_forwarding_prep_0 + 48
5 UIKit 0x3019a3ff -[UITableHeaderFooterView setText:] + 30
6 UIKit 0x3028239d -[UITableView(UITableViewInternal) _sectionHeaderView:withFrame:forSection:opaque:reuseViewIfPossible:] + 488
7 UIKit 0x30199e41 -[UITableView(UITableViewInternal) _sectionHeaderViewWithFrame:forSection:opaque:reuseViewIfPossible:] + 60
8 UIKit 0x3016bcb1 -[UITableView(_UITableViewPrivate) _updateVisibleHeadersAndFootersNow:] + 852
9 UIKit 0x3016b1a1 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1408
10 UIKit 0x301693c1 -[UITableView layoutSubviews] + 140
11 UIKit 0x301276ab -[UIView(CALayerDelegate) _layoutSublayersOfLayer:] + 26
12 CoreFoundation 0x317117ff -[NSObject(NSObject) performSelector:withObject:] + 22
13 QuartzCore 0x321e2585 -[CALayer layoutSublayers] + 120
14 QuartzCore 0x321e233d CALayerLayoutIfNeeded + 184
15 QuartzCore 0x321e1e0f _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 210
16 QuartzCore 0x321e1b69 _ZN2CA11Transaction6commitEv + 192
17 QuartzCore 0x321e740d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 52
18 CoreFoundation 0x3175ba49 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
19 CoreFoundation 0x3175d475 __CFRunLoopDoObservers + 412
20 CoreFoundation 0x3175e77b __CFRunLoopRun + 854
21 CoreFoundation 0x317078eb CFRunLoopRunSpecific + 230
22 CoreFoundation 0x317077f3 CFRunLoopRunInMode + 58
23 GraphicsServices 0x33ac26ef GSEventRunModal + 114
24 GraphicsServices 0x33ac279b GSEventRun + 62
25 UIKit 0x3011e2a7 -[UIApplication _run] + 402
26 UIKit 0x3011ce17 UIApplicationMain + 670
27 MyAPP 0x00002193 main + 70
28 MyAPP 0x00002114 start + 52
)
Most likely a dangling pointer to a former NSString now occupied by a UIWindow object. You'll have to find the lost object and probably retain it.
In XCode, select "Edit Active Executable..." under the Project menu. Select the "Arguments" tab and add an entry named "NSZombieEnabled" set to "YES" to the "Variables to be set in the environment" section.
NSZombieEnabled marks deleted objects as "Zombies" rather than reclaiming their space. When enabled, an exception is thrown any time a message is sent to a Zombie object. That should help you narrow down which object is not being retained properly.
Happy Zombie Hunting!
I can only guess that you try to call +[UIWindow length] somewhere in your code. And the method length does not exist in Apple API
Eventually, I found the problem.
I init a subview in viewWillApear: and use it in tableView:viewForHeaderInSection: and release the subview in viewDidDisappear:.
I changed the init/release into viewDidLoad: and viewDidUnload:. Then the problem is gone.
Thank both answerers and hope this answer will help others.