{ "id": "102979", "key": "TIMOB-11322", "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": "14700", "description": "2012 Sprint 25", "name": "2012 Sprint 25", "archived": true, "released": true, "releaseDate": "2012-12-17" }, { "id": "14784", "description": "2012 Sprint 25 API", "name": "2012 Sprint 25 API", "archived": true, "released": true, "releaseDate": "2012-12-17" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-12-04T01:43:40.000+0000", "created": "2012-10-09T20:36:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "ipad", "qe-ios100112", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:18.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": "Description:\r\nWhile testing Filesystem Module I noticed a different output in console for iPad and iPhone.\r\nIt is not a regression, exists on 2.1.3\r\n\r\nTest steps:\r\n1. Run this code below\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title:'db testing',\r\n});\r\n \r\nvar db = Titanium.Database.open('mydb');\r\n \r\nvar l3 = Titanium.UI.createLabel({\r\n text:'unicode placeholder',\r\n width:300,\r\n height:40,\r\n top:160\r\n});\r\nwin.add(l3);\r\n \r\nvar l = Titanium.UI.createLabel({\r\n text:'See Log for output',\r\n top:10,\r\n left:10,\r\n height:'auto',\r\n width:'auto'\r\n});\r\nwin.add(l);\r\n \r\nvar b1 = Titanium.UI.createButton({\r\n title:'Create the DB',\r\n width:200,\r\n height:40,\r\n top:40\r\n});\r\nwin.add(b1);\r\n \r\nb1.addEventListener('click', function()\r\n{ var l1 = Titanium.UI.createLabel({\r\n text:'2nd context test - see log.',\r\n color:'#fff',\r\n font:{fontSize:14},\r\n width:'auto',\r\n height:'auto'\r\n });\r\n \r\n win.add(l1);\r\nvar db = Titanium.Database.open('mydb');\r\ndb.execute('CREATE TABLE IF NOT EXISTS DATABASETEST (ID INTEGER, NAME TEXT)');\r\ndb.execute('DELETE FROM DATABASETEST');\r\n \r\ndb.execute('INSERT INTO DATABASETEST (ID, NAME ) VALUES(?,?)',1,'Name 1');\r\ndb.execute('INSERT INTO DATABASETEST (ID, NAME ) VALUES(?,?)',2,'Name 2');\r\ndb.execute('INSERT INTO DATABASETEST (ID, NAME ) VALUES(?,?)',3,'Name 3');\r\ndb.execute('INSERT INTO DATABASETEST (ID, NAME ) VALUES(?,?)',4,'Name 4');\r\ndb.execute('INSERT INTO DATABASETEST (ID, NAME ) VALUES(?,?)', 5, '\\u2070 \\u00B9 \\u00B2 \\u00B3 \\u2074 \\u2075 \\u2076 \\u2077 \\u2078 \\u2079');\r\nvar updateName = 'I was updated';\r\nvar updateId = 4;\r\ndb.execute('UPDATE DATABASETEST SET NAME = ? WHERE ID = ?', updateName, updateId);\r\n \r\ndb.execute('UPDATE DATABASETEST SET NAME = \"I was updated too\" WHERE ID = 2');\r\n \r\ndb.execute('DELETE FROM DATABASETEST WHERE ID = ?',1);\r\n \r\nTitanium.API.info('JUST INSERTED, rowsAffected = ' + db.rowsAffected);\r\nTitanium.API.info('JUST INSERTED, lastInsertRowId = ' + db.lastInsertRowId);\r\ndb.close();\r\n});\r\n \r\nvar b2 = Titanium.UI.createButton({\r\n title:'Select on the db',\r\n width:200,\r\n height:40,\r\n top:100\r\n});\r\nwin.add(b2);\r\n \r\nb2.addEventListener('click', function()\r\n{\r\nvar db = Titanium.Database.open('mydb');\r\nvar rows = db.execute('SELECT * FROM DATABASETEST');\r\nTitanium.API.info('ROW COUNT = ' + rows.getRowCount());\r\nTitanium.API.info('ROW COUNT = ' + rows.getRowCount());\r\nTitanium.API.info('ROW COUNT = ' + rows.getRowCount());\r\n \r\nwhile (rows.isValidRow())\r\n{\r\n Titanium.API.info('ID: ' + rows.field(0) + ' NAME: ' + rows.fieldByName('name') + ' COLUMN NAME ' + rows.fieldName(0));\r\n if (rows.field(0)==5)\r\n {\r\n l3.text = rows.fieldByName('name');\r\n }\r\n \r\n rows.next();\r\n}\r\nrows.close();\r\ndb.close(); // close db when you're done to save resources\r\n var l2= Titanium.UI.createLabel({\r\n text:'Check the select - see log.',\r\n color:'#fff',\r\n font:{fontSize:14},\r\n width:'auto',\r\n height:'auto',\r\n top:400,\r\n });\r\n win.add(l2);\r\n});\r\nvar l3 = Titanium.UI.createLabel({\r\n text:'unicode placeholder',\r\n width:300,\r\n height:40,\r\n top:160\r\n});\r\n \r\nwin.open();\r\n{code}\r\n\r\n2. See log for output\r\n\r\nExpected result:\r\n\r\nYou should see the following output: \r\n[INFO] ROW COUNT = 4 \r\n[INFO] ROW COUNT = 4 \r\n[INFO] ROW COUNT = 4 \r\n[INFO] ID: 2 NAME: I was updated too COLUMN NAME ID \r\n[INFO] ID: 3 NAME: Name 3 COLUMN NAME ID \r\n[INFO] ID: 4 NAME: I was updated COLUMN NAME ID \r\n*[INFO] ID: 5 NAME: ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ COLUMN NAME ID*\r\n\r\nActual result, for iPad only:\r\n [INFO] ROW COUNT = 4\r\n [INFO] ROW COUNT = 4\r\n [INFO] ROW COUNT = 4\r\n [INFO] ID: 2 NAME: I was updated too COLUMN NAME ID\r\n [INFO] ID: 3 NAME: Name 3 COLUMN NAME ID\r\n [INFO] ID: 4 NAME: I was updated COLUMN NAME ID\r\n *[INFO] ID: 5 NAME: ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ -C-O-L-U-M-N -N-A-M-E -I-D*", "attachment": [], "flagged": false, "summary": "iOS: Filesystem - Console output returns unexpected characters during DB migration ( iPad only)", "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": "Tested on:\r\nTitanium Studio, build: 3.0.0.201210090117\r\nTitanium SDK, build:3.0.0.v20121009034227\r\nXcode 4.5.1\r\nDevice:\r\niPad3 ios 5.1.1\r\n", "comment": { "comments": [ { "id": "229744", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tried Reproducing with the following devices/sim (TISDK- 3.0.0 build :f65ebe623c4e6522e67ce8fcf8fc30eb96f03ccb as on December 3, 2012)\n ** on iPad 3 running iOS6, iPhone 4S running 5.1 - Cannot Reproduce.\n ** On iPad 5.1 simulator, iPhone 5.1 simulator - Cannot Reproduce. \n ** on iPad 3 running 5.1.1 (device on which the bug was reported)- Can Reproduce.\n\nTried Debugging the bug through Xcode build on the same device - Cannot Reproduce.\n\nThis could be a device problem ", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T00:45:07.000+0000", "updated": "2012-12-04T00:45:07.000+0000" }, { "id": "241166", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Sabil will keep in mind iPad3 iOS 5.1.1\n\nIm closing this issue. Cannot reproduce with:\nTitanium Studio, build: 3.0.2.201302191606\nTitanium SDK, build: 3.1.0.v20130306145654\nDevices:\niPad mini iOS 6.0\niPad3 iOS 6.0.1\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T18:19:38.000+0000", "updated": "2013-03-07T18:19:38.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }