Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18321] Windows: Updating UI property from timer causes crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterIngo Muschenetz
AssigneeUnknown
Created2015-01-06T20:50:03.000+0000
Updated2018-02-28T19:55:18.000+0000

Description

Updating UI property (like Ti.UI.Button.title) from timer function causes crash inside HAL. Likely related to #30 and #47. Note that Ti.API.info works in this case.
javascript
'use strict';

var win = Ti.UI.createWindow();
var view = Ti.UI.createView();
var btn = Ti.UI.createButton();
btn.title = 'Test';
btn.backgroundColor = 'blue';

view.add(btn);
win.add(view);

var count = 0;
var timerId = setInterval(function () {
    Ti.API.info('TIMER ' + timerId + ': ' + count);
    btn.title = 'TIMER ' + timerId + ': ' + count;
    if (++count > 10) {
        clearInterval(timerId);
    }
}, 1000);

win.open();

Comments

No comments

JSON Source