{ "id": "97513", "key": "TIMOB-10010", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13574", "description": "Sprint 2012-15 Core", "name": "Sprint 2012-15 Core", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-25T16:15:00.000+0000", "created": "2012-07-17T14:17:03.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_animation", "qe-ios060112", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "19008", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "97673", "key": "TIMOB-10047", "fields": { "summary": "iOS: Animation \"autoreverse\" does not reverse all properties", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-24T11:33:35.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Steps to reproduce:\r\n1. Run the code below\r\n\r\n{Code}\r\nvar _window = Ti.UI.createWindow();\r\n\t\t\t_window.backgroundColor = 'green';\r\n\t\t\t\r\n\t\t\tvar box = Ti.UI.createView({\r\n\t\t\t backgroundColor : 'red',\r\n\t\t\t height : '150dp',\r\n\t\t\t width : '100dp',\r\n\t\t\t top: '50dp'\r\n\t\t\t});\r\n\t\t\t \r\n\t\t\tbox.addEventListener('click', function() {\r\n\t\t\t var matrix = Ti.UI.create2DMatrix().scale(1.5, 1.5);\r\n\t\t\t var a = Ti.UI.createAnimation({\r\n\t\t\t transform : matrix,\r\n\t\t\t duration : 500,\r\n\t\t\t autoreverse : true,\r\n\t\t\t repeat : 2\r\n\t\t\t });\r\n\t\t\t box.animate(a);\r\n\t\t\t});\r\n\t\t\t_window.add(box);\r\n\t\t\t \r\n\t\t\tvar box2 = Ti.UI.createView({\r\n\t\t\t backgroundColor: \"blue\",\r\n\t\t\t top: \"285dp\",\r\n\t\t\t height: \"100dp\",\r\n\t\t\t width: \"100dp\"\r\n\t\t\t});\r\n\t\t\t \r\n\t\t\tbox2.addEventListener(\"click\", function() {\r\n\t\t\t var matrix = Ti.UI.create2DMatrix().rotate(97);\r\n\t\t\t box2.animate({transform: matrix, duration: 500, autoreverse: true, repeat: 2});\r\n\t\t\t});\r\n\t\t\t_window.add(box2);\r\n_window.open();\r\n{Code}\r\n\r\n2. Click on the Red Box \r\n3. Click on the Blue Box \r\n\r\n\r\nResult:\r\n\r\n\r\nExpected results:\r\nAfter Step2: The red box should twice grow in size and shrink back with no animation artifact displayed\r\nAfter Step3: The blue box should rotate twice and remain stationary at the end of the animation\r\nSmooth animations without jitter or flash\r\n", "attachment": [], "flagged": false, "summary": "iOS: Animation: Animations produce jitters/flashes as they end", "creator": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 2.1.0.201206251749\r\nTitanium SDK: 2.1.1.v20120716180600\r\niOS 4.3.5", "comment": { "comments": [ { "id": "208166", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "similar behavior in\r\n\r\nTEST CASE #2\r\n{code}\r\nvar _window = Ti.UI.createWindow();\r\n\t\t\t_window.backgroundColor = 'white';\r\n\t\t\t\r\n\t\t\tvar box = Ti.UI.createView({\r\n\t\t\t\tbackgroundColor : 'red',\r\n\t\t\t\theight : '120',\r\n\t\t\t\twidth : '100',\r\n\t\t\t\ttop: 70\r\n\t\t\t});\r\n\t\t\tvar box2= Ti.UI.createView({\r\n\t\t\t\tbackgroundColor : 'blue',\r\n\t\t\t\theight : '120',\r\n\t\t\t\twidth : '100',\r\n\t\t\t\ttop: 250\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tbox.addEventListener('click', function() {\r\n\t\t\t\tvar matrix = Ti.UI.create2DMatrix()\r\n\t\t\t\tmatrix = matrix.rotate(90);\r\n\t\t\t\tmatrix = matrix.scale(2, 2);\r\n\t\t\t\tvar a = Ti.UI.createAnimation({\r\n\t\t\t\t\ttransform : matrix,\r\n\t\t\t\t\tduration : 500,\r\n\t\t\t\t\tautoreverse : true,\r\n\t\t\t\t\trepeat : 2\r\n\t\t\t\t});\r\n\t\t\t\tbox.animate(a);\r\n\t\t\t});\r\n\t\t\t//Animating the second box by defining the scale before rotation\r\n\t\t\tbox2.addEventListener('click', function() {\r\n\t\t\t\tvar matrix = Ti.UI.create2DMatrix()\r\n\t\t\t\tmatrix = matrix.scale(2,2);\r\n\t\t\t\tmatrix = matrix.rotate(90);\r\n\t\t\t\t \r\n\t\t\t\tvar a = Ti.UI.createAnimation({\r\n\t\t\t\t\ttransform : matrix,\r\n\t\t\t\t\tduration : 500,\r\n\t\t\t\t\tautoreverse : true,\r\n\t\t\t\t\trepeat : 2\r\n\t\t\t\t});\r\n\t\t\t\tbox2.animate(a);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t_window.add(box);\r\n\t\t\t_window.add(box2);\r\n_window.open();\r\n{code}\r\n\r\nTEST CASE #3\r\n{code}\r\nvar _window = Ti.UI.createWindow();\r\n\r\n\t\t_window.backgroundColor = 'black';\r\n\t\tvar fromColor = 'green';\r\n\t\tvar toColor = 'blue';\r\n\r\n\t\tvar v = Ti.UI.createView({\r\n\t\t\twidth : '100',\r\n\t\t\theight : '100',\r\n\t\t\tbackgroundColor : fromColor\r\n\t\t});\r\n\r\n\t\tvar b = Ti.UI.createButton({\r\n\t\t\ttitle : 'Animate',\r\n\t\t\tbottom : '40',\r\n\t\t\tleft : '10'\r\n\t\t});\r\n\r\n\t\tb.addEventListener('click', function() {\r\n\t\t\tv.animate({\r\n\t\t\t\tbackgroundColor : toColor,\r\n\t\t\t\tduration : 500\r\n\t\t\t});\r\n\t\t});\r\n\t\tvar b1 = Ti.UI.createButton({\r\n\t\t\ttitle : 'Reset',\r\n\t\t\tbottom : '40',\r\n\t\t\tright : '10'\r\n\t\t});\r\n\r\n\t\tb1.addEventListener('click', function() {\r\n\t\t\tv.backgroundColor = toColor;\r\n\t\t\tv.backgroundColor = fromColor;\r\n\t\t});\r\n\t\tvar v1 = Ti.UI.createView({\r\n\t\t\twidth : '50',\r\n\t\t\theight : '50',\r\n\t\t\tbackgroundColor : 'white'\r\n\t\t});\r\n\r\n\t\t_window.add(v);\r\n\t\t_window.add(b);\r\n\t\t_window.add(b1);\r\n\t\t_window.add(v1);\r\n_window.open();\r\n{code}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T14:39:43.000+0000", "updated": "2012-07-18T17:10:00.000+0000" }, { "id": "208409", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No \"jitter\" or \"flash\" is seen on iPhone Sim 4.3, 5.0, 5.1. This is likely a device-specific (read: slow devices) issue only. Will test on a small range of physical devices (4.3.5, 5.x) in order to determine whether or not this is an appropriate report with a reasonable fix.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-18T17:05:14.000+0000", "updated": "2012-07-18T17:05:44.000+0000" }, { "id": "208410", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NOTE: One test case above does show a real bug, which is that for views which are repeatedly animated via rotation, they do not render correctly (Labeled as \"Test case #2\" above). Reproduction seems to be:\r\n\r\n* Rapidly click back and forth between the blue and red boxes while both are animating", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-18T17:09:37.000+0000", "updated": "2012-07-18T17:09:37.000+0000" }, { "id": "208411", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Try KitchenSink Base UI>Animation>3D transform on any supported device, any supported os to see the \"flash\" mid-animation.\r\n\r\nApologies for the code, this came out of our test harness. Added the missing \"var \"", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-18T17:20:03.000+0000", "updated": "2012-07-18T17:20:03.000+0000" }, { "id": "208421", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Interestingly, this was a previous problem reported against iOS 3.x only in an earlier release of the SDK and did not appear in 4.x+. There must be a regression at some point.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-18T19:30:26.000+0000", "updated": "2012-07-18T19:30:26.000+0000" }, { "id": "208535", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Actually, it turns out that this is a very serious problem on several levels:\r\n\r\n* {{autoreverse}} (the key to many of these issues) does not properly reverse ALL changes - for example, if I animate background color changes, the background color does not revert to the original value.\r\n* The current animation subsystem is using antiquated methods (begin/commit) instead of more modern block dispatch. This appears to be causing some performance and synchronization problems, part of what leads to 'fuzzing' and bad/mixed-up behavior that this bug is related to.\r\n* Animation interacts *incorrectly with the view drawing subsystem*. This is the most important: calling {{\\-\\[TiViewProxy reposition]}} triggers not just a refresh, but also a queuing of the view (and all of its subviews, AND possibly its parent) into the view layout processing system - meaning that there is both the immediate resize behavior *and* a queued resize which occurs after the animation has been completed (this leads to a lot of the \"laying out while animating\" messages seen in development). Note that this may not be as severe as I initially assumed (unrelated to this bug), but does cause unnecessary layout passes, possible bad interactions, and other nasties.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T15:40:54.000+0000", "updated": "2012-07-19T18:00:54.000+0000" }, { "id": "208545", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created issue TIMOB-10047 regarding {{autoreverse}} errors.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T15:49:06.000+0000", "updated": "2012-07-19T15:49:06.000+0000" }, { "id": "208579", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Believe it or not, this is actually a native issue. I was able to create a simple test app which demonstrates the 'flash' behavior - not sure if this would be classified as a bug or not by Apple (certainly seems like it should be), where at the end of an autoreversed animation, the view does not appear as it did prior to beginning the animation. Going to file a radar about it and institute a native workaround where we manually autoreverse.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T18:00:06.000+0000", "updated": "2012-07-19T18:00:06.000+0000" }, { "id": "209444", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR merged https://github.com/appcelerator/titanium_mobile/pull/2630", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-25T16:15:00.000+0000", "updated": "2012-07-25T16:15:00.000+0000" }, { "id": "216040", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue still occurs on:\r\nTitanium Studio, build: 2.1.2.201208201549\r\nTitanium SDK: 2.1.2.v20120821160113\r\nMac osx Mountain Lion 10.8\r\nDevice: iPhone4s 5.0.1\r\n\r\nNote: Fixed in 2.2.0", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-24T11:33:35.000+0000", "updated": "2012-08-24T11:33:35.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }