ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

RadListView Broken on NS7 & Angular 10 #1459

Open keerl opened 4 years ago

keerl commented 4 years ago

RadListView crashes my app on launch after I updated to NS7 and Angular 10. I used the following command to generate an Angular 10 project nsc create sampleapp --template @nativescript/template-hello-world-ng and added nativescript-ui-listview@rc. I switched out the ListView in the sample project for a RadListView and now it crashes instantly with no error. When I open adb logcat I can see the following error:

08-24 16:27:11.997 11335 11335 F test.radlistbu: runtime.cc:638] JNI DETECTED ERROR IN APPLICATION: bad arguments passed to void com.telerik.widget.list.SelectionBehavior.addListener(com.telerik.widget.list.SelectionBehavior$SelectionChangedListener) (see above for details)

Attached is the code for the project. rad-list-view.zip

Which platform(s) does your issue occur on?

Android

rmortes commented 4 years ago

👍 Can confirm that in crashes on vue too

csimpi commented 3 years ago

Android:

System.err: An uncaught Exception occurred on "main" thread. System.err: Calling js method onSelectedPositionChange failed System.err: Error: View already has a parent. View: SuggestionView(111) Parent: RadAutoCompleteTextView(109) System.err: System.err: StackTrace: System.err: ZoneAwareError(file: node_modules\@nativescript\zone-js\zone-nativescript.js:1298:0) System.err: at _addView(file: node_modules\@nativescript\core\ui\core\view-base\index.js:415:0) System.err: at adjustSuggestionView(file: node_modules\nativescript-ui-autocomplete\ui-autocomplete.android.js:643:0) System.err: at createNativeView(file: node_modules\nativescript-ui-autocomplete\ui-autocomplete.android.js:414:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:525:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at (file: node_modules\@nativescript\core\ui\core\view-base\index.js:567:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\content-view\index.js:65:0) System.err: at eachChildView(file: node_modules\@nativescript\core\ui\page\page-common.js:99:0) System.err: at eachChild(file: node_modules\@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules\@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at _addViewCore(file: node_modules\@nativescript\core\ui\core\view-base\index.js:429:0) System.err: at _addView(file: node_modules\@nativescript\core\ui\core\view-base\index.js:418:0) System.err: at onCreateView(file: node_modules\@nativescript\core\ui\frame\index.android.js:738:0) System.err: at onCreateView(file: node_modules\@nativescript\core\ui\frame\fragment.android.js:25:0) System.err: at commitCurrentTransaction(file: node_modules\@nativescript\core\ui\bottom-navigation\index.android.js:369:0) System.err: at changeTab(file: node_modules\@nativescript\core\ui\bottom-navigation\index.android.js:387:0) System.err: at BottomNavigationBarImplementation.onSelectedPositionChange(file: node_modules\@nativescript\core\ui\bottom-navigation\index.android.js:122:0) System.err: at com.tns.Runtime.callJSMethodNative(Native Method) System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302) System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1175) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1153) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1149) System.err: at com.tns.gen.org.nativescript.widgets.BottomNavigationBar_vendor_120521_28_BottomNavigationBarImplementation.onSelectedPositionChange(BottomNavigationBar_vendor_120521_28_BottomNavigationBarImplementation.java:39) System.err: at org.nativescript.widgets.BottomNavigationBar.setSelectedPosition(BottomNavigationBar.java:289) System.err: at org.nativescript.widgets.BottomNavigationBar$TabClickListener.onClick(BottomNavigationBar.java:302) System.err: at android.view.View.performClick(View.java:7359) System.err: at android.view.View.performClickInternal(View.java:7325) System.err: at android.view.View.access$3200(View.java:846) System.err: at android.view.View$PerformClick.run(View.java:27807) System.err: at android.os.Handler.handleCallback(Handler.java:873) System.err: at android.os.Handler.dispatchMessage(Handler.java:99) System.err: at android.os.Looper.loop(Looper.java:214) System.err: at android.app.ActivityThread.main(ActivityThread.java:7073) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

ozgursel commented 3 years ago

NS7 - Angular 10

It works on Android and IOS 14 & IOS 13 when using normal array but on IOS 12 it gives this error below and app gives black screen and crash,

both device and emulator

*** Assertion failure in -[TKCollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.140/UICollectionView.m:6165
CONSOLE ERROR: ERROR Error: Invalid update: invalid number of items in section 0.  The number of items contained in an existing section after the update (14) must be equal to the number of items contained in that section before the update (14), plus or minus the number of items inserted or deleted from that section (14 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).
*** Assertion failure in -[TKCollectionView _setCollectionViewLayout:animated:isInteractive:completion:animator:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.140/UICollectionView.m:3693
CONSOLE ERROR: ERROR Error: Cannot set the layout [<TKListViewGridLayout: 0x143d335a0>] for [<TKCollectionView: 0x144a62a00; baseClass = UICollectionView; frame = (0 0; 414 557); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x28109a4f0>; layer = <CALayer: 0x281e46f00>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> collection view layout: <TKListViewLinearLayout: 0x143dc3510>] during an update.
An attempt to prepare a layout while a prepareLayout call was already in progress (i.e. reentrant call) has been ignored. Please file a bug. UICollectionView instance is (<TKCollectionView: 0x144a62a00; baseClass = UICollectionView; frame = (0 0; 414 557); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x28109a4f0>; layer = <CALayer: 0x281e46f00>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> collection view layout: <TKListViewLinearLayout: 0x143dc3510>)
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'itemView' of undefined
at
prepareCell(file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1926:0)
at push.../node_modules/nativescript-ui-listview/ui-listview.js.TKListViewDataSourceImpl.listViewCellForItemAtIndexPathIsInitial(file: node_modules/nativescript-ui-listview/ui-listview.ios.js:599:0)
at _setNativeViewFrame(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:129:0)
at layoutNativeView(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:170:0)
at layout(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:62:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:672:18)
at (file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:111:16)
at eachLayoutChild(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:119:0)
at layoutVertical(file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:109:0)
at onLayout(file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:82:0)
at layout(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:72:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:672:18)
at (file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:111:16)
at eachLayoutChild(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:119:0)
at layoutVertical(fi<\M-b\M^@\M-&>
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'itemView' of undefined
at
prepareCell(file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1926:0)
at push.../node_modules/nativescript-ui-listview/ui-listview.js.TKListViewDataSourceImpl.listViewCellForItemAtIndexPathIsInitial(file: node_modules/nativescript-ui-listview/ui-listview.ios.js:599:0)
at _setNativeViewFrame(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:129:0)
at layoutNativeView(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:170:0)
at layout(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:62:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:672:18)
at (file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:111:16)
at eachLayoutChild(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:119:0)
at layoutVertical(file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:109:0)
at onLayout(file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:82:0)
at layout(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:72:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:672:18)
at (file: node_modules/@nativescript/core/ui/layouts/stack-layout/index.ios.js:111:16)
at eachLayoutChild(file://<\M-b\M^@\M-&>
csimpi commented 3 years ago

Update on my side: It's very strange I have to wrap *ngIf with any condition and it works with Android + Angular + NS7