This is a migrated thread and some comments may be shown as answers.

RadListView - back from details view cause app crash

3 Answers 101 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Clarence
Top achievements
Rank 2
Clarence asked on 20 Dec 2016, 09:17 AM

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

 

3 Answers, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 20 Dec 2016, 11:31 AM
Hi Clarence Ho,

I have recreated the master-details scenario in this application using -angular 1.2.0, NativeScript 2.4.2 and - 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.
0
Clarence
Top achievements
Rank 2
answered on 20 Dec 2016, 12:47 PM

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

0
Accepted
Nick Iliev
Telerik team
answered on 20 Dec 2016, 02:31 PM
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 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.
Tags
ListView
Asked by
Clarence
Top achievements
Rank 2
Answers by
Nick Iliev
Telerik team
Clarence
Top achievements
Rank 2
Share this question
or