RadListView - back from details view cause app crash

4 posts, 1 answers
  1. Clarence
    Clarence avatar
    20 posts
    Member since:
    Nov 2016

    Posted 20 Dec 2016 Link to this post

    A problem found on using RadListView (on iOS) which cause the app crash as follows:

    • Create a page with RadListView with hardcoded items
    • When click on an item, will navigate to a details page
    • When click back on top action bar, the following error shown on console and app crashed
    1   0x110353a6b NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
    2   0x110ad390e ffi_closure_unix64_inner
    3   0x110ad42c2 ffi_closure_unix64
    4   0x11186207f -[UIViewController __viewWillAppear:]
    5   0x11188d1d3 -[UINavigationController _startCustomTransition:]
    6   0x11189de48 -[UINavigationController _startDeferredTransitionIfNeeded:]
    7   0x11189efdb -[UINavigationController __viewWillLayoutSubviews]
    8   0x111a95dd7 -[UILayoutContainerView layoutSubviews]
    9   0x11177eab8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
    10  0x1169a6bf8 -[CALayer layoutSublayers]
    11  0x11699a440 CA::Layer::layout_if_needed(CA::Transaction*)
    12  0x11699a2be CA::Layer::layout_and_display_if_needed(CA::Transaction*)
    13  0x116928318 CA::Context::commit_transaction(CA::Transaction*)
    14  0x1169553ff CA::Transaction::commit()
    15  0x116955d6f CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
    16  0x11426b267 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
    17  0x11426b1d7 __CFRunLoopDoObservers
    18  0x11424ff8e __CFRunLoopRun
    19  0x11424f884 CFRunLoopRunSpecific
    20  0x1161b3a6f GSEventRunModal
    21  0x1116b9c68 UIApplicationMain
    22  0x110ad411d ffi_call_unix64
    23  0x1306b98e0
    file:///app/tns_modules/ui/core/view-common.js:748:22: JS ERROR TypeError: undefined is not an object (evaluating 'child.onLoaded')
    Dec 20 14:01:25 ClarencedeiMac com.apple.CoreSimulator.SimDevice.A901FB04-C006-47F4-8876-118EB24771B0.launchd_sim[7813] (UIKitApplication:org.nativescript.nstest4[0xa673][23275]): Service exited due to Segmentation fault: 11

     

    Environment:

    • Nativescript: 2.4.2
    • nativescript-angular: 1.2.0
    • nativescript-telerik-ui-pro: 1.5.1_184

    If required, I can send you my project for investigation.

    Thanks

    Clarence

     

  2. Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    317 posts

    Posted 20 Dec 2016 Link to this post

    Hi Clarence Ho,

    I have recreated the master-details scenario in this application using nativescript-angular 1.2.0, NativeScript 2.4.2 and telerik-ui 1.5.1 but was not able to reproduce the described issue. Perhaps, you can download the provided application and test it on your side and compare the code with the one you are using to catch the reason for your crash.

    p.s After some additional tests, I've noticed that the RadListView component should be wrapped in a parent container e.g. GridLayout. (as mentioned here)

    For example:
    <GridLayout rows="*" columns="*">
        <RadListView row="0" [items]="items">
            <template tkListItemTemplate let-item="item">
               <Label [nsRouterLink]="['/item', item.id]" [text]="item.name" >                         </Label>
            </template>
        </RadListView>
    </GridLayout>

    However, if you are not able to resolve this issue please send us your sample project in order to investigate the problem locally.

    Regards,
    Nikolay Iliev
    Telerik by Progress
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
  3. Clarence
    Clarence avatar
    20 posts
    Member since:
    Nov 2016

    Posted 20 Dec 2016 in reply to Nikolay Iliev Link to this post

    Hi Nikolay,

    I am still encountering the issue. I am using NS's RouterExtensions instead of the nsRouterLink directive.

    You can clone my project below and see if you hit the same problem as me:

    https://github.com/clarenceh/nstest4.git

     

    Thanks a lot

    Clarence

  4. Answer
    Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    317 posts

    Posted 20 Dec 2016 Link to this post

    Hey Clarence,

    Thank you for your project - it really helped us to investigate the issue.
    After some tests and research, I found out that this issue was reported by a community user
    that stumbled upon a similar problem when navigating back to a listview with header and footer.
    The bug was originally reported here.

    The good news is that the bug was already addressed by our developers and the fix is already applied in our next release (1.6.0) of nativescript-telerik-ui-pro plugin. If you want to apply the fix you can install our next release and test your application with it.

    To install and test your application with the next (unofficial) release do the following:
    rm -rf node_modules
    rm -rf platforms
    rm -rf lib
    rm -rf hooks
    tns plugin remove nativescript-telerik-ui-pro
    tns plugin add nativescript-telerik-ui-pro@next
    tns run ios

    After applying the next version your application is working as expected and the navigation back is not throwing anymore.

    Regards,
    Nikolay Iliev
    Telerik by Progress
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top