Skip to content

App crashes when scrolling a ListView #123

@tjvantoll

Description

@tjvantoll

Hey all,

I’ve hit an issue today where my app crashes when I attempt to scroll a <ListView> on both iOS and Android. On Android the app doesn’t actually crash, it just hangs, so I unfortunately don’t get a good stack trace, but the iOS app does go boom with this error:

file:///app/tns_modules/angular2/src/facade/exception_handler.js:79:28: JS ERROR EXCEPTION: Error during evaluation of "itemLoading"
    ORIGINAL EXCEPTION: TypeError: undefined is not an object (evaluating 'prevView.rootNodesOrAppElements')

(I included the full stack trace below so you have all the details.) I’m not sure what’s up, but I’m guessing this is related to the <ListView> changes made in the most recent release, because I didn’t see this error before. You can recreate this error pretty easily in Groceries. Just add a bunch of things to the list and try to scroll.

Thanks.

Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 1   0xe2090 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 2   0x7a9350 ffi_closure_inner
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 3   0x7a9ca2 ffi_closure_i386
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 4   0x16f34e1 -[UITableView _createPreparedCellForGlobalRow:willDisplay:]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 5   0x16c3948 -[UITableView _updateVisibleCellsNow:isRecursive:]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 6   0x16e20d6 __29-[UITableView layoutSubviews]_block_invoke
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 7   0x16fd19e -[UITableView _performWithCachedTraitCollection:]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 8   0x16e1fab -[UITableView layoutSubviews]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 9   0x1638008 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 10  0x2e54059 -[NSObject performSelector:withObject:]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 11  0x550d80a -[CALayer layoutSublayers]
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 12  0x55014ee CA::Layer::layout_if_needed(CA::Transaction*)
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 13  0x5501352 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 14  0x54f3e8b CA::Context::commit_transaction(CA::Transaction*)
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 15  0x5527e03 CA::Transaction::commit()
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 16  0x55286c4 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 17  0x3297ffe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 18  0x3297f5e __CFRunLoopDoObservers
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 19  0x328d8dc __CFRunLoopRun
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 20  0x328d0e6 CFRunLoopRunSpecific
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 21  0x328cefb CFRunLoopRunInMode
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 22  0x4fae664 GSEventRunModal
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 23  0x4fae4a1 GSEventRun
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 24  0x156bbfa UIApplicationMain
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: 25  0x7a9b68 ffi_call_i386
Mar 18 11:15:54 VANTOLLMAC-7 sampleGroceries[9451]: file:///app/tns_modules/angular2/src/facade/exception_handler.js:79:28: JS ERROR EXCEPTION: Error during evaluation of "itemLoading"
    ORIGINAL EXCEPTION: TypeError: undefined is not an object (evaluating 'prevView.rootNodesOrAppElements')
    ORIGINAL STACKTRACE:
    _attachViewToContainer@file:///app/tns_modules/angular2/src/core/linker/view_manager.js:160:31
    createEmbeddedViewInContainer@file:///app/tns_modules/angular2/src/core/linker/view_manager.js:107:36
    onItemLoading@file:///app/tns_modules/nativescript-angular/directives/list-view-comp.js:53:73
    handleEventInternal
    handleEvent@file:///app/tns_modules/angular2/src/core/change_detection/abstract_change_detector.js:57:48

    run@file:///app/tns_modules/zone.js/dist/zone.js:162:29
    file:///app/tns_modules/angular2/src/core/zone/ng_zone.js:344:47
    zoneBoundFn@file:///app/tns_modules/zone.js/dist/zone.js:139:29
    notify@file:///app/tns_modules/data/observable/observable.js:155:31
    notifyForItemAtIndex@file:///app/tns_modules/ui/list-view/list-view.js:41:20
    _prepareCell@file:///app/tns_modules/ui/list-view/list-view.js:273:44
    tableViewCellForRowAtIndexPath@file:///app/tns_modules/ui/list-view/list-view.js:62:31
    UIApplicationMain@[native code]
    start@file:///app/tns_modules/application/application.js:222:26
    nativeScriptBootstrap@file:///app/tns_modules/nativescript-angular/application.js:70:22
    anonymous@file:///app/main.js:7:36
    evaluate@[native code]
    moduleEvaluation@[native code]
    [native code]
    promiseReactionJob@[native code]
    ERROR CONTEXT:
    [object Object]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions