{ "id": "130915", "key": "TIMOB-17031", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-16T21:14:23.000+0000", "created": "2014-05-27T20:18:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "progressbar", "qe-3.3.0", "qe-testadded" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-16T21:14:23.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "When testing progress bar functionality, using the below code\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout:'vertical'\r\n});\r\n\tvar value = 0;\r\n\tvar ind, button, interval,lbl1,lbl2;\r\n\t\r\n\t\r\n\t button = Titanium.UI.createButton({\r\n\t\t\ttitle : 'Start Progress',\r\n\t\t\theight : Ti.UI.SIZE,\r\n\t\t\twidth : 200,\r\n\t\t\ttop : 20\r\n\t\t});\r\n\t\tind = Titanium.UI.createProgressBar({\r\n\t\t\twidth : Ti.UI.SIZE,\r\n\t\t\tmin : 0,\r\n\t\t\tmax : 10,\r\n\t\t\ttop: 50,\r\n\t\t\tvalue : 0,\r\n\t\t\theight : Ti.UI.SIZE,\r\n\t\t\tcolor : '#888',\r\n\t\t\t//message : 'Downloading 0 of 10',\r\n\t\t\t//font : {fontSize : 14}\r\n\t\t\t//fontWeight : 'bold'\r\n\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//\r\n\t\t// BUTTON LISTENER TO KICK OFF PROGRESS BARS\r\n\t\t//\r\n\t\tbutton.addEventListener('click', function() {\r\n\t\t\tind.show();\r\n\t\t\tval = 0;\r\n\t\t\tif (interval) {\r\n\t\t\t\tclearInterval(interval);\r\n\t\t\t}\r\n\t\t\tinterval = setInterval(function() {\r\n\t\t\t\t\r\n\t\t\t\tlbl2 = Ti.UI.createLabel({\r\n\t\t text:'INTERVAL FIRED value ' + val,\r\n\t\t color:'red',\r\n\t\t top: 5,\r\n\t\t width:Ti.UI.SIZE,\r\n\t\t Height:Ti.UI.SIZE,\r\n\t\t textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\t\t font:{fontSize:8}\r\n\t\t\t });\r\n\t\t\t \r\n\t\t\t win.add(lbl2);\r\n\t\t\t \r\n\t\t\t\tTi.API.info('INTERVAL FIRED value ' + val);\r\n\t\t\t\tif (val >= 10) {\r\n\t\t\t\t\tclearInterval(interval);\r\n\t\t\t\t\r\n\t\t\t\tlbl1 = Ti.UI.createLabel({\r\n\t\t text:'Progress Complete',\r\n\t\t color:'red',\r\n\t\t top: 20,\r\n\t\t width:Ti.UI.SIZE,\r\n\t\t Height:Ti.UI.SIZE,\r\n\t\t textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\t\t font:{fontSize:12}\r\n\t\t\t });\r\n\t\t\t \r\n\t\t\t win.add(lbl1);\r\n\t\t\t \r\n\t\t\t\t};\r\n\t\t\t\tind.value = val;\r\n\t\t\t\t//ind.message = 'Downloading ' + val + ' of 10';\r\n\t\t\t\tval++;\r\n\r\n\t\t\t}, 1000);\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t\r\nwin.add(button);\r\nwin.add(ind);\r\n\t\t\r\nwin.open();\r\n\t\r\n{code}\r\n\r\nthe app crashes after click event\r\n{code}\r\n[INFO] INTERVAL FIRED value 0\r\n{code}\r\n\r\nh5. Steps\r\n1. In Studio create the app and replace app.js with above code\r\n2. Build for BB device\r\n3. Start progress bar\r\nh5. Expected\r\n{code}\r\n[INFO] : INTERVAL FIRED value 0\r\n[INFO] : INTERVAL FIRED value 1\r\n[INFO] : INTERVAL FIRED value 2\r\n[INFO] : INTERVAL FIRED value 3\r\n[INFO] : INTERVAL FIRED value 4\r\n[INFO] : INTERVAL FIRED value 5\r\n[INFO] : INTERVAL FIRED value 6\r\n[INFO] : INTERVAL FIRED value 7\r\n[INFO] : INTERVAL FIRED value 8\r\n[INFO] : INTERVAL FIRED value 9\r\n[INFO] : INTERVAL FIRED value 10\r\n{code}", "attachment": [ { "id": "48382", "filename": "expected.png", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-27T20:30:09.000+0000", "size": 50479, "mimeType": "image/png" }, { "id": "48381", "filename": "log.txt", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-27T20:18:48.000+0000", "size": 13141, "mimeType": "text/plain" } ], "flagged": false, "summary": "BlackBerry: ProgressBar causes crash on start", "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": " Appcelerator Studio, build: 3.3.0.201405161313 \r\nTitanium SDK, build: 3.3.0.v20140524224144 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-alpha4 \r\nnpm@1.3.2 \r\ntitanium@3.3.0-alpha5 \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)", "closedSprints": [ { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "306796", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving as invalid. The JavaScript test is wrong and the code is bad, bad in syntax, structure, and API usage.\r\n\r\nUse this code instead:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout:'vertical'\r\n});\r\nvar value = 0;\r\nvar ind, button, interval,lbl1,lbl2;\r\n\r\n\r\nbutton = Titanium.UI.createButton({\r\n\ttitle : 'Start Progress',\r\n\theight : Ti.UI.SIZE,\r\n\twidth : 200,\r\n\ttop : 20\r\n});\r\nind = Titanium.UI.createProgressBar({\r\n\tleft : 20, right: 20,\r\n\tmin : 0,\r\n\tmax : 10,\r\n\ttop: 50,\r\n\tvalue : 0,\r\n\theight : Ti.UI.SIZE,\r\n\tcolor : '#888',\r\n\t//message : 'Downloading 0 of 10',\r\n\t//font : {fontSize : 14}\r\n\t//fontWeight : 'bold'\r\n\r\n});\r\n\r\n//\r\n// BUTTON LISTENER TO KICK OFF PROGRESS BARS\r\n//\r\nlbl2 = Ti.UI.createLabel({\r\n color:'red',\r\n top: 5,\r\n width:Ti.UI.SIZE,\r\n Height:Ti.UI.SIZE,\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n font:{fontSize:8}\r\n});\r\nwin.add(lbl2);\r\n\r\nlbl1 = Ti.UI.createLabel({\r\n text:'Progress Complete',\r\n color:'red',\r\n top: 20,\r\n width:Ti.UI.SIZE,\r\n Height:Ti.UI.SIZE,\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n font:{fontSize:12}\r\n});\r\n\t\t \r\nwin.add(lbl1);\r\n\t \r\n\r\nbutton.addEventListener('click', function() {\r\n\tind.show();\r\n\tval = 0;\r\n\tif (interval) {\r\n\t\tclearInterval(interval);\r\n\t}\r\n\tinterval = setInterval(function() {\r\n\t\t\r\n\t\tlbl2.text = 'INTERVAL FIRED value ' + val;\r\n\t \r\n\t\tTi.API.info('INTERVAL FIRED value ' + val);\r\n\t\tif (val >= 10) {\r\n\t\t\tclearInterval(interval);\r\n\t\t\tlbl1.text = 'Progress Complete';\r\n\t\t};\r\n\t\tind.value = val;\r\n\t\t//ind.message = 'Downloading ' + val + ' of 10';\r\n\t\tval++;\r\n\r\n\t}, 1000);\r\n});\t\t\r\n\t\t\r\nwin.add(button);\r\nwin.add(ind);\r\n\t\t\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-29T07:25:10.000+0000", "updated": "2014-05-29T07:25:10.000+0000" }, { "id": "309195", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201406111952\r\nTitanium SDK, build: 3.3.0.v20140613161751\r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-rc \r\nnpm@1.3.2 \r\ntitanium@3.3.0-rc \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)\r\nVerified as fixed.", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-16T21:01:46.000+0000", "updated": "2014-06-16T21:01:46.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }