{ "id": "102574", "key": "TIMOB-11239", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14157", "description": "Sprint 2012-20 API", "name": "Sprint 2012-20 API", "archived": true, "released": true, "releaseDate": "2012-10-08" }, { "id": "14272", "description": "2012 Sprint 20", "name": "2012 Sprint 20", "archived": true, "released": true, "releaseDate": "2012-10-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-12-19T20:47:10.000+0000", "created": "2012-10-03T09:21:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "qe-port" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-12-19T20:47:10.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": "h1. Problem description\r\nCalling two or more Ti.Analytics.featureEvent in a short period of time causes the app to crash.\r\n\r\nh1. Steps to reproduce\r\nUse the following code to test the problem:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title: \"Crash Events\",\r\n barColor: \"#ff00ff\",\r\n backgroundColor: \"#ffffff\"\r\n}), subcatTable = Ti.UI.createTableView({\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.FILL\r\n});\r\n\r\nvar onItemClick = function (evt, featureName) {\r\n Ti.Analytics.featureEvent(featureName, {\r\n device: Ti.Platform.username,\r\n time: (new Date()).getTime(),\r\n env: \"env name\",\r\n sessionID: \"qwe123\"\r\n });\r\n};\r\n\r\n\r\nsubcatTable.addEventListener('click', function(e) {\r\n // detail click can all be handled in super.\r\n //if (_my && _my.onItemClick) {\r\n // we would like to know it was a doc detail list click, otherwise the detail win handles meta detail track.\r\n //_my.onItemClick.call(null, event, EventManager.VIEW_ALLDOCS_DETAIL_EVENT);\r\n onItemClick(e, \"FEATURE_EVENT_CRASH1\");\r\n //}\r\n Ti.Analytics.featureEvent(\"FEATURE_EVENT_CRASH2\", {\r\n device: Ti.Platform.username,\r\n time: (new Date()).getTime(),\r\n env: \"env name\",\r\n sessionID: \"qwe123\"\r\n });\r\n //Ti.API.info(\"Clicked, wait for crash\");\r\n});\r\n\r\nsubcatTable.data = [\r\n Ti.UI.createTableViewRow({\r\n title: \"a\"\r\n })\r\n];\r\n\r\nwin.add(subcatTable);\r\nwin.open();\r\n{code}\r\n\r\n- Run the app\r\n- Click on the table row: the app crashes\r\n\r\nh1. Note\r\nSometimes, the app does not crash the first time, but clicking 2-3 times on the row will do that. I've tested with SDK 2.1.2.GA and the app crashes without any error in the console. Opening the app with XCode, however, shows this error: EXC_BAD_ACCESS\r\n\r\nI also tried testing with SDK 3.0.0.v20121002161335 and I see the following error in the Titanium console:\r\n\r\n{color:red}\r\n[ERROR] A SQLite database error occurred on database '/Users/dcassenti/Library/Application Support/iPhone Simulator/6.0/Applications/C6577659-96DC-4234-9051-2FE866115B98/Library/Application Support/analytics/analytics.db': Error Domain=com.plausiblelabs.pldatabase Code=3 \"An error occured parsing the provided SQL statement.\" UserInfo=0xb216820 {com.plausiblelabs.pldatabase.error.vendor.code=1, NSLocalizedDescription=An error occured parsing the provided SQL statement., com.plausiblelabs.pldatabase.error.query.string=INSERT INTO pending_events VALUES (?), com.plausiblelabs.pldatabase.error.vendor.string=table pending_events has 1 columns but 2 values were supplied} (SQLite #1: table pending_events has 1 columns but 2 values were supplied) (query: 'INSERT INTO pending_events VALUES (?)')\r\n{color}", "attachment": [], "flagged": false, "summary": "iOS: multiple Ti.Analytics.featureEvent calls in a short time causes the app to crash", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 6\r\nSDK 2.1.2.GA\r\nSDK 3.0.0.v20121002161335", "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "221992", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/3102", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-03T22:44:03.000+0000", "updated": "2012-10-03T22:44:03.000+0000" }, { "id": "222566", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull merged", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-08T19:12:17.000+0000", "updated": "2012-10-08T19:12:17.000+0000" }, { "id": "229884", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 3.0.0.v20121130200208 on iPad 4 6.0.1", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T18:54:19.000+0000", "updated": "2012-12-04T18:54:19.000+0000" }, { "id": "231981", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-19T06:19:22.000+0000", "updated": "2012-12-19T06:19:22.000+0000" }, { "id": "232052", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Was accidentally reopened.\r\n", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-19T20:47:10.000+0000", "updated": "2012-12-19T20:47:10.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }