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
Native Script + Angular - ListView crashes on resume app event and back button on Android #1528
When adding a list view with ng-template that has a component inside it
if you resume back to this page (the list) or if you enter a list item and press Android back button
app crashes (on Android)
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
System.err: An uncaught Exception occurred on "main" thread. System.err: Calling js method getView failed System.err: TypeError: Cannot read property '_effectiveRowHeight' of null System.err: System.err: StackTrace: System.err: ListViewAdapter.getView(file:///data/user/0/files/app/vendor.js:137173:28) 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.android.widget.BaseAdapter_vendor_137101_28_ListViewAdapter.getView(BaseAdapter_vendor_137101_28_ListViewAdapter.java:39) System.err: at android.widget.AbsListView.obtainView(AbsListView.java:2387) System.err: at android.widget.ListView.makeAndAddView(ListView.java:2067) System.err: at android.widget.ListView.fillSpecific(ListView.java:1492) System.err: at android.widget.ListView.layoutChildren(ListView.java:1802) System.err: at android.widget.AbsListView.onLayout(AbsListView.java:2184) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.ContentLayout.onLayout(ContentLayout.java:73) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:270) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) System.err: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) System.err: at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:270) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) System.err: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) System.err: at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:270) System.err: at com.android.internal.policy.DecorView.onLayout(DecorView.java:784) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3470) System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2938) System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952) System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171) System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972) System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:796) System.err: at android.view.Choreographer.doFrame(Choreographer.java:731) System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) System.err: at android.os.Handler.handleCallback(Handler.java:938) System.err: at android.os.Handler.dispatchMessage(Handler.java:99) System.err: at android.os.Looper.loop(Looper.java:223) System.err: at android.app.ActivityThread.main(ActivityThread.java:7656) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Tell us about the problem
When adding a list view with ng-template that has a component inside it if you resume back to this page (the list) or if you enter a list item and press Android back button app crashes (on Android)
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
NS: NativeScript 8 + Angular
NS list view version: ^9.1.0
CLI: 8.0.2
Cross-platform modules: @nativescript/core: 8.0.6
Runtime(s): @nativescript/android: 8.0.0 @nativescript/ios: 8.0.0
Please tell us how to recreate the issue in as much detail as possible.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
The list:
The packages.json:
{ "name": "app", "displayName": "App", "templateType": "App template", "version": "", "description": "App description", "author": "", "license": "", "keywords": ["app"], "scripts": { "lint": "tslint \"src/*/.ts\"" }, "dependencies": { "@angular/animations": "~11.2.6", "@angular/common": "~11.2.6", "@angular/compiler": "~11.2.6", "@angular/core": "~11.2.6", "@angular/forms": "~11.2.6", "@angular/platform-browser": "~11.2.6", "@angular/platform-browser-dynamic": "~11.2.6", "@angular/router": "~11.2.6", "@nativescript-community/ui-image": "^4.0.22", "@nativescript-community/ui-material-bottomsheet": "^5.2.31", "@nativescript-community/ui-material-core": "^5.2.31", "@nativescript-community/ui-material-ripple": "^5.2.31", "@nativescript-community/ui-material-snackbar": "^5.2.31", "@nativescript-community/ui-material-tabs": "^5.2.31", "@nativescript/angular": "^11.2.0", "@nativescript/background-http": "^5.0.2", "@nativescript/core": "^8.0.6", "@nativescript/firebase": "^11.1.3", "@nativescript/local-notifications": "^5.1.0", "@nativescript/theme": "^2.5.0", "@ngrx/data": "^12.0.0", "@ngrx/effects": "^12.0.0", "@ngrx/entity": "^12.0.0", "@ngrx/store": "^12.0.0", "@ngrx/store-devtools": "^12.0.0", "@ngx-translate/core": "^13.0.0", "@nstudio/nativescript-checkbox": "^2.0.4", "@nstudio/nativescript-floatingactionbutton": "^3.0.4", "@nstudio/nativescript-pulltorefresh": "^3.0.1", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.10.2", "codelyzer": "^5.1.1", "cryptiles": "^4.1.2", "guid-typescript": "^1.0.9", "lodash": "^4.17.12", "nativescript": "^8.0.1", "nativescript-appavailability": "^1.3.2", "nativescript-directions": "^1.4.0", "nativescript-email": "^1.6.0", "nativescript-iqkeyboardmanager": "^1.5.1", "nativescript-mediafilepicker": "^4.0.2", "nativescript-open-app": "^0.3.0", "nativescript-permissions": "^1.3.11", "nativescript-phone": "^2.0.0", "nativescript-ui-listview": "^9.1.0", "netmask": "^2.0.0", "ngx-timeago": "^2.0.0", "node-sass": "^4.13.1", "reflect-metadata": "~0.1.12", "rxjs": "^6.6.7", "sass": "^1.32.8", "sass-loader": "^10.1.1", "time-ago-pipe": "^1.3.2", "zone.js": "^0.11.4" }, "devDependencies": { "@angular/cli": "^11.2.6", "@angular/compiler-cli": "~11.2.6", "@nativescript/android": "8.0.0", "@nativescript/ios": "8.0.0", "@nativescript/schematics": "^11.2.0", "@nativescript/types": "8.0.0", "@nativescript/webpack": "^4.1.0", "@ngtools/webpack": "~11.2.12", "@types/node": "^15.6.1", "typescript": "^4.0.7" }, "main": "main.js" }
Crash log
System.err: An uncaught Exception occurred on "main" thread. System.err: Calling js method getView failed System.err: TypeError: Cannot read property '_effectiveRowHeight' of null System.err: System.err: StackTrace: System.err: ListViewAdapter.getView(file:///data/user/0/files/app/vendor.js:137173:28) 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.android.widget.BaseAdapter_vendor_137101_28_ListViewAdapter.getView(BaseAdapter_vendor_137101_28_ListViewAdapter.java:39) System.err: at android.widget.AbsListView.obtainView(AbsListView.java:2387) System.err: at android.widget.ListView.makeAndAddView(ListView.java:2067) System.err: at android.widget.ListView.fillSpecific(ListView.java:1492) System.err: at android.widget.ListView.layoutChildren(ListView.java:1802) System.err: at android.widget.AbsListView.onLayout(AbsListView.java:2184) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.ContentLayout.onLayout(ContentLayout.java:73) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:222) System.err: at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:354) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:270) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) System.err: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) System.err: at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:270) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) System.err: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) System.err: at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:270) System.err: at com.android.internal.policy.DecorView.onLayout(DecorView.java:784) System.err: at android.view.View.layout(View.java:22844) System.err: at android.view.ViewGroup.layout(ViewGroup.java:6389) System.err: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3470) System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2938) System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952) System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171) System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972) System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:796) System.err: at android.view.Choreographer.doFrame(Choreographer.java:731) System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) System.err: at android.os.Handler.handleCallback(Handler.java:938) System.err: at android.os.Handler.dispatchMessage(Handler.java:99) System.err: at android.os.Looper.loop(Looper.java:223) System.err: at android.app.ActivityThread.main(ActivityThread.java:7656) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)