Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11038] iOS: Animation - Animation crashes if the object is clicked 3-4 times quickly

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.3, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-ios090112
ReporterAnshu Mittal
AssigneeUnknown
Created2012-09-21T03:09:36.000+0000
Updated2018-02-28T20:03:53.000+0000

Description

Animation crashes if the object is clicked 3-4 times quickly. This is not regression since the issue occurs as far as 2.1.0 GA. Steps to reproduce: 1. create an app using the code below. 2. Click on the red box 3-4 times quickly. 3. click on blue box 3-4 times quickly. Actual: 2. Red box does not stop in its original state and then does not respond on click. 3. The box does not stop in original position and then does not respond on click. Expected: 2. Object should animate to retain its original state and then respond on click again.

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'green'
});
			
			var box = Ti.UI.createView({
			    backgroundColor : 'red',
			    height : '150dp',
			    width : '100dp',
			    top: '50dp'
			});
			 
			box.addEventListener('click', function() {
			    var matrix = Ti.UI.create2DMatrix().scale(1.5, 1.5);
			    var a = Ti.UI.createAnimation({
			        transform : matrix,
			        duration : 500,
			        autoreverse : true,
			        repeat : 2
			    });
			    box.animate(a);
			});
			win1.add(box);
			 
			var box2 = Ti.UI.createView({
			    backgroundColor: "blue",
			    top: "285dp",
			    height: "100dp",
			    width: "100dp"
			});
			 
			box2.addEventListener("click", function() {
			    var matrix = Ti.UI.create2DMatrix().rotate(97);
			    box2.animate({transform: matrix, duration: 500, autoreverse: true, repeat: 2});
			});
			win1.add(box2);
	
			win1.open();

Comments

  1. Shameer Jan 2013-03-26

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0 but it works fine on SDK version: 3.0.2

JSON Source