I'm trying to change the picker rows after the window was loaded. The picker was created in the xml file but when a row was attempted to be added to it an error is thrown (see below).
How do i add the picker rows once the picker is already added?
view.xml
<!-- other parent views above -->
<Picker id="languagePicker" selectionIndicator="true" useSpinner="true"
width="Ti.Platform.displayCaps.platformWidth" right="0">
</Picker>
view.js
var languages = db.execute("SELECT * FROM language");
while(languages.isValidRow()){
$.languagePicker.add(Ti.UI.createPickerRow({title:languages.fieldByName('language')}));
languages.next();
}
Error Log:
[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
Reason:
-[NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instance 0x109f28af0
Stack trace:
0 CoreFoundation 0x0000000109d03e4d exceptionPreprocess + 141
1 libobjc.A.dylib 0x00000001096d5deb objc_exception_throw + 48
2 CoreFoundation 0x0000000109d0c48d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000109c5990a ___forwarding_ + 970
4 CoreFoundation 0x0000000109c594b8 _CF_forwarding_prep_0 + 120
5 UIKit 0x0000000106466d9c -[UILabel _contentInsetsFromFonts] + 137
6 UIKit 0x0000000106782a84 -[_UILabelLayer updateContentInsets] + 127
7 UIKit 0x0000000106782b73 -[_UILabelLayer updateContentLayerSize] + 50
8 UIKit 0x0000000106782ce1 -[_UILabelLayer layoutSublayers] + 25
9 QuartzCore 0x000000010875fe70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
10 QuartzCore 0x000000010875fcee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
11 QuartzCore 0x0000000108754475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
12 QuartzCore 0x0000000108781c0a _ZN2CA11Transaction6commitEv + 486
13 QuartzCore 0x000000010878237c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
14 CoreFoundation 0x0000000109c2f367 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
15 CoreFoundation 0x0000000109c2f2d7 __CFRunLoopDoObservers + 391
16 CoreFoundation 0x0000000109c24f2b __CFRunLoopRun + 1147
17 CoreFoundation 0x0000000109c24828 CFRunLoopRunSpecific + 488
18 GraphicsServices 0x000000010b04bad2 GSEventRunModal + 161
19 UIKit 0x00000001061f9610 UIApplicationMain + 171
20 ISTQB 0x0000000104320de6 main + 310
21 libdyld.dylib 0x000000010a95192d start + 1
The picker.add() method expects an array of PickerRow objects. This works in my app:
var data = [],
picker = Ti.UI.createPicker();
data.push(
Ti.UI.createPickerRow({
title: 'Row 1'
}));
data.push(
Ti.UI.createPickerRow({
title: 'Row2'
}));
picker.add(data);
See http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Picker-method-add
Related
I am new for IOS application development I am trying to run react native application on MAC (Virtual box) but stuck after launch screen.
Getting error at this line of code.
showing below message on report navigator.
2018-09-26 05:03:23.637243+0530 Leaderboard[56620:700325] - [I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2018-09-26 05:03:24.334073+0530 Leaderboard[56620:699937] +[CATransaction synchronize] called within transaction
2018-09-26 05:03:25.352 [info][tid:main][RCTCxxBridge.mm:216] Initializing (parent: , executor: (null))
2018-09-26 05:03:25.385767+0530 Leaderboard[56620:699937] Initializing (parent: , executor: (null))
2018-09-26 05:03:25.749 [info][tid:main][RCTRootView.m:293] Running application Leaderboard ({
initialProps = {
};
rootTag = 1;
})
2018-09-26 05:03:25.831679+0530 Leaderboard[56620:699937] Running application Leaderboard ({
initialProps = {
};
rootTag = 1;
})
2018-09-26 05:03:26.353502+0530 Leaderboard[56620:699937] * Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
* First throw call stack:
(
0 CoreFoundation 0x00000001052a91e6 exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010371e031 objc_exception_throw + 48
2 CoreFoundation 0x000000010531e975 +[NSException raise:format:] + 197
3 Leaderboard 0x0000000101e80451 +[FIRApp configure] + 481
4 Leaderboard 0x0000000101e7fb07 -[AppDelegate application:didFinishLaunchingWithOptions:] + 871
5 UIKit 0x0000000107ee96fb -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278
6 UIKit 0x0000000107eeb172 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123
7 UIKit 0x0000000107ef05cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
8 UIKit 0x00000001082b2f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
9 UIKit 0x0000000108685a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
10 UIKit 0x00000001082b2bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
11 UIKit 0x00000001082b33db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
12 UIKit 0x0000000108c24614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
13 UIKit 0x0000000108c244ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
14 UIKit 0x000000010890875d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
15 UIKit 0x0000000108b034b7 _performActionsWithDelayForTransitionContext + 100
16 UIKit 0x0000000108908627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
17 UIKit 0x00000001086850e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
18 UIKit 0x0000000107eeeeac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
19 UIKit 0x00000001084c1bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
20 FrontBoardServices 0x000000010e05a2f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
21 FrontBoardServices 0x000000010e062cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
22 libdispatch.dylib 0x000000010695a7ec _dispatch_client_callout + 8
23 libdispatch.dylib 0x000000010695fdb8 _dispatch_block_invoke_direct + 592
24 FrontBoardServices 0x000000010e08e470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
25 FrontBoardServices 0x000000010e08e12e -[FBSSerialQueue _performNext] + 439
26 FrontBoardServices 0x000000010e08e68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
27 CoreFoundation 0x000000010524bbb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
28 CoreFoundation 0x00000001052304af __CFRunLoopDoSources0 + 271
29 CoreFoundation 0x000000010522fa6f __CFRunLoopRun + 1263
30 CoreFoundation 0x000000010522f30b CFRunLoopRunSpecific + 635
31 GraphicsServices 0x000000010d42ea73 GSEventRunModal + 62
32 UIKit 0x0000000107ef2057 UIApplicationMain + 159
33 Leaderboard 0x0000000101e7fc90 main + 112
34 libdyld.dylib 0x000000010a98c955 start + 1
35 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
If you want to use Firebase in your project, you should create an app from Firebase console and configure it. Then you should download GoogleService-Info.plist and copy to your project. You can clearly see this on your error logs.
Please follow this tutorial: https://firebase.google.com/docs/ios/setup
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
I'm trying to add UITableViewController to Today Widget, but every time I drag UITableViewController to Storyboard and run the Widget it crashes with the following error.
I've tried multiple times. I've tried it by using Table View object, but problem persists.
Note: It crashes even before loading viewDidLoad() method.
2015-06-06 01:19:20.569 iOSHackerToday[3202:283287] * Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '* -[NSArrayM
insertObject:atIndex:]: object cannot be nil'
*** First throw call stack: ( 0 CoreFoundation 0x0000000107842c65 __exceptionPreprocess + 165 1 libobjc.A.dylib
0x00000001074dbbb7 objc_exception_throw + 45 2 CoreFoundation
0x000000010770f8ca -[__NSArrayM insertObject:atIndex:] + 954 3
UIKit 0x0000000107d6f0b9
-[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 338 4 UIKit 0x0000000108241a0c
-[_UIViewServiceViewControllerOperator __createViewController:withContextToken:fbsDisplays:appearanceSerializedRepresentations:legacyAppearance:traitCollection:initialInterfaceOrientation:hostAccessibilityServerPort:canShowTextServices:replyHandler:]
+ 2216 5 CoreFoundation 0x0000000107738dec __invoking_ + 140 6 CoreFoundation 0x0000000107738c42 -[NSInvocation invoke] + 290 7 CoreFoundation
0x00000001077c9016 -[NSInvocation invokeWithTarget:] + 54 8 UIKit
0x00000001082fd01b -[_UIViewServiceImplicitAnimationDecodingProxy
forwardInvocation:] + 222 9 CoreFoundation
0x000000010779ff4f forwarding + 495 10 CoreFoundation
0x000000010779fcd8 _CF_forwarding_prep_0 + 120 11 CoreFoundation
0x0000000107738dec invoking_ + 140 12 CoreFoundation
0x0000000107738c42 -[NSInvocation invoke] + 290 13 CoreFoundation
0x00000001077c9016 -[NSInvocation invokeWithTarget:] + 54 14 UIKit
0x00000001082889f4 -[_UIQueueingProxy forwardInvocation:] + 319 15
CoreFoundation 0x000000010779ff4f
forwarding + 495 16 CoreFoundation 0x000000010779fcd8 _CF_forwarding_prep_0 + 120 17 CoreFoundation
0x0000000107738dec invoking_ + 140 18 CoreFoundation
0x0000000107738c42 -[NSInvocation invoke] + 290 19 CoreFoundation
0x00000001077c9016 -[NSInvocation invokeWithTarget:] + 54 20
CoreFoundation 0x000000010779ff4f
forwarding + 495 21 CoreFoundation 0x000000010779fcd8 _CF_forwarding_prep_0 + 120 22 CoreFoundation
0x0000000107738dec invoking_ + 140 23 CoreFoundation
0x0000000107738c42 -[NSInvocation invoke] + 290 24 libdispatch.dylib
0x0000000109da6f16 _dispatch_call_block_and_release + 12 25
libdispatch.dylib 0x0000000109dc1964
_dispatch_client_callout + 8 26 libdispatch.dylib 0x0000000109daca59 _dispatch_main_queue_callback_4CF + 704 27
CoreFoundation 0x00000001077aa1f9
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 28 CoreFoundation 0x000000010776bdcb __CFRunLoopRun
+ 2043 29 CoreFoundation 0x000000010776b366 CFRunLoopRunSpecific + 470 30 GraphicsServices
0x000000010b01ca3e GSEventRunModal + 161 31 UIKit
0x0000000107c3b900 UIApplicationMain + 1282 32 libxpc.dylib
0x000000010a0a7aec _xpc_objc_main + 453 33 libxpc.dylib
0x000000010a0a9e91 xpc_main + 185 34 Foundation
0x0000000107209ee1 service_connection_handler + 0 35 PlugInKit
0x0000000106ff3a82 -[PKService run] + 521 36 PlugInKit
0x0000000106ff3747 +[PKService main] + 55 37 PlugInKit
0x0000000106ff3aa6 +[PKService _defaultRun:arguments:] + 17 38
libextension.dylib 0x000000010978399d NSExtensionMain
+ 51 39 libdyld.dylib 0x0000000109df1145 start + 1 40 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type
NSException (lldb)
When you delete the default layout and drag a new table view controller, you need to mark the new view controller as 'Intial View Controller'
Here's the Apple's document which explains how to do it. https://developer.apple.com/library/ios/recipes/xcode_help-IB_storyboard/chapters/SetInitialController.html
In the storyboard, if you are using a custom view controller class made in swift, make sure you check the box 'Inherit Module From Target':
Anyone knows Why this error?Occur when i select the row of a table,navigate to a view,then if i go back and select it again it just crash
-[CALayerArray name]: unrecognized selector sent to instance 0x5a4f8a0
2011-08-24 01:01:10.983 Prototipo[8277:207]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[CALayerArray name]: unrecognized selector sent to instance 0x5a4f8a0'
*** Call stack at first throw:
(
0 CoreFoundation 0x010715a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x011c5313 objc_exception_throw + 44
2 CoreFoundation 0x010730bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00fe2966 ___forwarding___ + 966
4 CoreFoundation 0x00fe2522 _CF_forwarding_prep_0 + 50
5 Prototipo 0x00003989 -[BaladaDetailsController setAllElements] + 129
6 Prototipo 0x00003cba -[BaladaDetailsController viewDidLoad] + 36
7 UIKit 0x00371089 -[UIViewController view] + 179
8 UIKit 0x0036f482 -[UIViewController contentScrollView] + 42
9 UIKit 0x0037ff25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
10 UIKit 0x0037e555 -[UINavigationController _layoutViewController:] + 43
11 UIKit 0x0037f7aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
12 UIKit 0x0037a32a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
13 UIKit 0x00381562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
14 UIKit 0x0037a1c4 -[UINavigationController pushViewController:animated:] + 62
15 Prototipo 0x00004bea -[TableViewBaladasController tableView:didSelectRowAtIndexPath:] + 280
16 UIKit 0x00338b68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
17 UIKit 0x0032eb05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
18 Foundation 0x0004079e __NSFireDelayedPerform + 441
19 CoreFoundation 0x010528c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
20 CoreFoundation 0x01053e74 __CFRunLoopDoTimer + 1220
21 CoreFoundation 0x00fb02c9 __CFRunLoopRun + 1817
22 CoreFoundation 0x00faf840 CFRunLoopRunSpecific + 208
23 CoreFoundation 0x00faf761 CFRunLoopRunInMode + 97
24 GraphicsServices 0x0192e1c4 GSEventRunModal + 217
25 GraphicsServices 0x0192e289 GSEventRun + 115
26 UIKit 0x002cfc93 UIApplicationMain + 1160
27 Prototipo 0x0000261c main + 102
28 Prototipo 0x000025ad start + 53
)
terminate called after throwing an instance of 'NSException'
You've probably have a memory management error and have over-released an object. Read the Memory Management Programming Guide. If you show some of your code we can provide more help.
When i am moving the data from tableview cell by one its crashing ..
When my view did loaded my array count is 64
I assign this to number of row return [categorieArray count];
and cell configuration
cell.textLabel.text=[categorieArray objectAtIndex:indexPath.row];
return cell;
*** Call stack at first throw:
(
0 CoreFoundation 0x00f8fbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010e45c2 objc_exception_throw + 47
2 CoreFoundation 0x00f916fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00f01366 ___forwarding___ + 966
4 CoreFoundation 0x00f00f22 _CF_forwarding_prep_0 + 50
5 Sigma-Aldrich 0x0000468d -[RootViewController tableView:cellForRowAtIndexPath:] + 237
6 UIKit 0x000977fa -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
7 UIKit 0x0008d77f -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
8 UIKit 0x000a2450 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
9 UIKit 0x0009a538 -[UITableView layoutSubviews] + 242
10 QuartzCore 0x017f5451 -[CALayer layoutSublayers] + 181
11 QuartzCore 0x017f517c CALayerLayoutIfNeeded + 220
12 QuartzCore 0x017ee37c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
13 QuartzCore 0x017ee0d0 _ZN2CA11Transaction6commitEv + 292
14 QuartzCore 0x0181e7d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
15 CoreFoundation 0x00f70fbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
16 CoreFoundation 0x00f060e7 __CFRunLoopDoObservers + 295
17 CoreFoundation 0x00ecebd7 __CFRunLoopRun + 1575
18 CoreFoundation 0x00ece240 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00ece161 CFRunLoopRunInMode + 97
20 GraphicsServices 0x01203268 GSEventRunModal + 217
21 GraphicsServices 0x0120332d GSEventRun + 115
22 UIKit 0x0003242e UIApplicationMain + 1160
23 Sigma-Aldrich 0x00001d49 main + 121
24 Sigma-Aldrich 0x00001cc5 start + 53
25 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
It seems you have an incomplete implementation of your UITableViewDataSource, specifically (it seems) you forgot to implement tableView:cellForRowAtIndexPath, so that when the framework tries and calls it, it fails.
Have a look here for more info.