[TIMOB-20138] Consecutive calls to ScrollableView.setViews causes the app to become unresponsive
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-06T21:23:09.000+0000 |
Affected Version/s | Release 5.1.0, Release 5.1.1 |
Fix Version/s | Release 5.2.0 |
Components | iOS |
Labels | 5.1., ios, regression, scrollableView |
Reporter | Nikos Poulios |
Assignee | Pedro Enrique |
Created | 2015-12-04T12:18:10.000+0000 |
Updated | 2016-02-18T21:09:51.000+0000 |
Description
Following a typical cycle of having a default view inside a scrollable view and then updating it calling setViews() fails and causes the app to become unresponsive. Tested on iOS > 8.4
Same effect if you try with a very short delay between the two calls.
Code below works fine in 5.0.2.GA but not in 5.1.0/5.1.1
(function() {
var window = Ti.UI.createWindow();
var mainView = Ti.UI.createView({
backgroundColor:'#fff',
width:Ti.UI.FILL,
height:Ti.UI.FILL
});
var scrollableView = Ti.UI.createScrollableView({
borderColor:'green',
views:undefined,
width:Ti.UI.FILL,
height:'60%'
});
var viewA = Ti.UI.createView({
backgroundColor:'black'
});
var colors = ['red', 'green', 'blue'];
var viewsB = [];
for(var i = 0;i<3;i++){
viewsB.push(Ti.UI.createView({
backgroundColor:colors[i]
}));
}
scrollableView.setViews([viewA]);
mainView.add(scrollableView);
window.add(mainView);
window.open();
scrollableView.setViews(viewsB);
})();
Attachments
File | Date | Size |
---|---|---|
Ti502-Passes.png | 2015-12-14T11:29:26.000+0000 | 16129 |
Ti511-Fails.png | 2015-12-14T11:28:43.000+0000 | 16002 |
I'm also having this issue, is this on the radar?
Attached result on Ti 5.1.1 GA with iOS 9.2 Simulator and Ti 5.0.2.GA with same simulator. It's clear indeed that on 5.1.1 it does not work as expected.
Some issue here, we have app that is havy dependent of this component, is give in us lot of issues lately (infinitive swipe). sdk 5.1.x, ios 9.1
Verified a regression from 5.0.2 GA to 5.1.0 GA using iOS 9.2 simulator.
Verified problem still exist in 5.1.2.RC. [~penrique] can you take a look? Initially I thought it's to do with https://github.com/appcelerator/titanium_mobile/pull/7553 but it seems not to be the case.
It seems to me that this is some type of race condition. I'm investigating.
@Pedro Enrique thanks, we are waiting for this fix to release a out app :)
Fixed in this PR https://github.com/appcelerator/titanium_mobile/pull/7617 It will be merged one time today.
Pedro Enrique, count with me to test!
We just merged the pull request. The fix will be available soon in the CI builds. Check here later today http://build.appcelerator.net/
Verified fixed, using: MacOS 10.11.2 (15C50) Studio 4.4.0.201511241829 Ti SDK 5.2.0.v20160114021251 Appc NPM 4.2.2 Appc CLI 5.2.0-224 Xcode 7.2 (7C68) Node v0.12.7 Java 1.7.0_80 App no longer becomes unresponsive after quickly calling setViews() or after multiple calls to setViews(). Tested with provided sample code and tests from related tickets.
Tested with *5.2.0.v20160114021251 *and *5.2.0.v20160111111831* - both still make my app freeze whenever changing the *views* property. I've tried cleaning my project and making a fresh installation of the app: no deal. I'm using 4-5 views inside my scrollableview, i don't know if that means anything, but anyways...
[~rdperottoni] Did you try to reproduce using the sample code? Otherwise can you give us your sample code that cause the freeze?
@Rodolfo Perottoni yeah! Can you see my note and see if fix for you? https://github.com/appcelerator/titanium_mobile/pull/7627/files Fixes for me, may help someone!