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

[AutoComplete] - Crashes on iOS on entering any text #1453

Open Whip opened 4 years ago

Whip commented 4 years ago

Tell us about the problem

App crashes immediately as I type a single character in the Autocomplete input

Which platform(s) does your issue occur on?

_iOS 13

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

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

XML

<au:RadAutoCompleteTextView hint="Search Area" displayMode="Plain" completionMode="Contains" textChanged="areaTextChanged" didAutoComplete="areaAutocomplete" />

JS

exports.areaTextChanged = function(args){
    console.log('areaTextChanged'); //this appears in output
    if(args.text.length > 2){
        const field = args.object,
            text = args.text;

        field.loadSuggestionsAsync = function(text){
            const promise = new Promise((resolve, reject) => {
                                   ...
            });

            return promise;
        }
    }
}

Console output

CONSOLE LOG file: app/sales/add-order-page.js:84:0: areaTextChanged
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1   0x103276928 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x1032b102c NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3   0x103e1e7f8 ffi_closure_SYSV_inner
4   0x103e201b4 .Ldo_closure
5   0x1042e5a60 -[TKAutoCompleteTextView textFieldWasUpdated:]
6   0x1042e53a4 -[TKAutoCompleteTextView onTextFieldChanged:]
7   0x1c242172c <redacted>
8   0x1c1e31ed4 <redacted>
9   0x1c1e3222c <redacted>
10  0x1c27064d4 <redacted>
11  0x1c26ebf34 <redacted>
12  0x1c27170fc <redacted>
13  0x1c2719770 <redacted>
14  0x1c271a24c <redacted>
15  0x1c26ef60c <redacted>
16  0x1c270c534 <redacted>
17  0x1c2245614 <redacted>
18  0x1c223f968 <redacted>
19  0x1c223e594 <redacted>
20  0x1c226e4fc <redacted>
21  0x1c226cf30 <redacted>
22  0x1be764f78 <redacted>
23  0x1be2eaad8 <redacted>
24  0x1be2eaa30 <redacted>
25  0x1be2ea1b8 <redacted>
26  0x1be2e51e8 <redacted>
27  0x1be2e4ba8 CFRunLoopRunSpecific
28  0x1c8454344 GSEventRunModal
29  0x1c24203e4 UIApplicationMain
30  0x103e20044 ffi_call_SYSV
31  0x103e1df1c ffi_call_int
JavaScript stack trace:
file: node_modules/nativescript-ui-autocomplete/ui-autocomplete.ios.js:146:0
at file: node_modules/nativescript-ui-autocomplete/ui-autocomplete.ios.js:284:0
at UIApplicationMain([native code])
at run(file: node_modules/@nativescript/core/application/application.ios.js:312:0)
at file: app/app.js:70:0
at ./app.js(file:///app/bundle.js:230:34)
at __webpack_require__(file: app/webpack/bootstrap:750:0)
at checkDeferredModules(file: app/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
JavaScript error:
file: node_modules/nativescript-ui-autocomplete/ui-autocomplete.ios.js:146:0: JS ERROR TypeError: undefined is not an object (evaluating 'suggestions.length')