Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24977] Windows: Crash when using a SearchBar where the autosuggestions box is oriented above the UI element

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-08-04T18:10:20.000+0000
Affected Version/sRelease 6.1.0, Release 6.0.4, Release 6.1.1, Release 6.2.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeGary Mathews
Created2017-07-18T18:06:29.000+0000
Updated2017-08-15T22:11:32.000+0000

Description

Description

When using a SearchBar if the list of suggestions will be oriented *above* (i.e. the searchbar is in the bottom half of the screen) the searchbar then the app will crash when entering a search term. This occurs when a SearchBar is added to a ListView or TableView Error is thrown on the clear call here https://github.com/appcelerator/titanium_mobile_windows/blob/66ccc0a080360d147dd2b59c748a075b87107233/Source/UI/src/SearchBar.cpp#L62
var _window = Ti.UI.createWindow({ backgroundColor: 'green'});
var searchBar = Ti.UI.createSearchBar();

var data = [];
for (var i = 0; i < 25; i++) {
    data.push({ title: Row ${i} });
}
var tableView = Ti.UI.createTableView({
    search: searchBar,
    data: data,
    top: '80%'
});
_window.add(tableView);
_window.open()

Steps to reproduce

Add the above to an existing app.js and build for a Windows target

Enter some text into the searchbar

Actual

App will throw the below error
[ERROR] :  ----- Titanium Javascript Runtime Error -----
[ERROR] :  In undefined: undefined,undefined
[ERROR] :  Message: Uncaught Error: undefined

Expected

App should not throw an error search should function as normal

Comments

  1. Gary Mathews 2017-07-18

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/1043
  2. Samir Mohammed 2017-08-02

    [~gmathews][~eharris] Master is merged, Waiting for 6_2_X back-port
  3. Kota Iguchi 2017-08-02

    I will push backports for 6_2_X soon.
  4. Kota Iguchi 2017-08-02

    6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1058
  5. Kota Iguchi 2017-08-04

    [~smohammed] Backported to 6_2_X. No tests needed for 6_2_X because currently 6_2_X branch and master are pretty much same. Should be ok to close this ticket.
  6. Samir Mohammed 2017-08-15

    Verified fix in SDK Version 7.0.0.v20170815065413 and SDK Version: 6.2.0.v20170815130745 Test and other information can be found at: Master: https://github.com/appcelerator/titanium_mobile_windows/pull/1043 6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1058

JSON Source