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] iOS - setLoadOnDemandMode - NativeScript caught signal 11 #1270

Open NathanWalker opened 5 years ago

NathanWalker commented 5 years ago

Tell us about the problem

Occasionally changing loadOnDemandMode will cause app crash.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

Please tell us how to recreate the issue in as much detail as possible.

Seems to either be a race condition or just result of frail setup. Seems to occur at random when changing loadOnDemandMode at various times.

NativeScript caught signal 11.
Native Stack:
1   0x10e641cb1 sig_handler(int)
2   0x7fff51418b1d _sigtramp
3   0x60000258e190
4   0x7fff5144cb85 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
5   0x7fff51450e58 _Unwind_RaiseException
6   0x7fff4f23b8bd __cxa_throw
7   0x7fff503b5c44 _objc_exception_destructor(void*)
8   0x7fff23b98958 +[NSException raise:format:arguments:]
9   0x7fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
10  0x7fff4695afe2 -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:]
11  0x7fff4695f44d -[UICollectionView _updateVisibleCellsNow:]
12  0x7fff46964b37 -[UICollectionView layoutSubviews]
13  0x7fff47636722 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
14  0x7fff2b030ef9 -[CALayer layoutSublayers]
15  0x7fff2b0358ff CA::Layer::layout_if_needed(CA::Transaction*)
16  0x7fff47621a35 -[UIView(Hierarchy) layoutBelowIfNeeded]
17  0x10f756ec6 -[TKListView reloadData]
18  0x10f760010 -[TKListView setLoadOnDemandMode:]
19  0x10efdffbd ffi_call_unix64
20  0x130ced200
JS Stack:
setLoadOnDemandMode([native code])
at synchLoadOnDemandMode(file:///src/Users/nathan/Documents/github/sweet-io/sweet-pub/node_modules/nativescript-ui-listview/ui-listview.js:1235:0)
at setLoadOnDemandModeInternal(file:///src/Users/nathan/Documents/github/sweet-io/sweet-pub/node_modules/nativescript-ui-listview/ui-listview.js:1224:0)
at _disableLoadOnDemand(file:///src/Users/nathan/Documents/github/sweet-io/sweet-pub/node_modules/nativescript-ui-listview/ui-listview.js:1503:0)
at notifyLoadOnDemandFinished(file:///src/Users/nathan/Documents/github/sweet-io/sweet-pub/node_modules/nativescript-ui-listview/ui-listview.js:1494:0)
NathanWalker commented 5 years ago

Worth mentioning that even with "discardUncaughtJsExceptions": true, enabled in src/package.json, this exception still gets through and causes an app crash.

VladimirAmiorkov commented 5 years ago

Can you provide a runnable sample project that and the steps required to reproduce this error. Also what iOS version is this happening on?

NathanWalker commented 5 years ago

iOS 13 and 12 - I’ll have to see about a sample project

inONEL commented 4 years ago

@NathanWalker ever found a solution for this error? Having the same issue...

felixkrautschuk commented 4 years ago

I am having the same issue.

On iOS 12 the app crashes with the exception provided by @NathanWalker .

ios12_rlv_loadondemand_crash

On iOS 13 the app does not crash, but I the following error in the console:

Binding: Binding error while setting property loadOnDemandMode of RadListView@list-page.xml:8:5;: Error: the view returned from -collectionView:viewForSupplementaryElementOfKind:atIndexPath (UICollectionElementKindSectionFooter,<NSIndexPath: 0xa398697cc0178f89> {length = 2, path = 0 - 0}) was not retrieved by calling -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath: or is nil ((null))

The sample app with latest @nativescript/core (6.5.8) and nativescript-ui-listview (8.2.0) can be found here: RlvLoadOnDemandIssueIOS.zip

For me, a "solution" is to remove the footer view from my XML. When commenting the footer view in the sample app and the crash does not occur anymore.

edit: And the header needs to be removed as well, otherwise tha app crashes as well!