{ "id": "109912", "key": "TIMOB-12806", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": null, "resolutiondate": null, "created": "2013-02-20T16:13:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "SupportTeam" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:54.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "h6.Rationale\r\nHaving an app that extensively uses dynamic data, coupled with location-specific events, it is very hard to exactly reproduce errors that occur in the application. It is absolutely necessary for there to be a global onerror event that can be accessed in a production environment, that can grab the error that occurred and report it back along with the stack.\r\n\r\nh6.Problem\r\nCrash reports did get through with no JS nor Ti references. _Non native developers_ wouldn't be able to catch up such errors in a timely fashion.\r\n\r\nh6.Use case\r\nA *NSRangeException* from a Crittercism crash report, is being thrown multiple times on production environment:\r\n{code}\r\nCrashed Thread\r\n0\t\r\nCoreFoundation 0x333842a3 __exceptionPreprocess + 163\r\n1\t\r\nlibobjc.A.dylib 0x3b0a197f objc_exception_throw + 31\r\n2\t\r\nCoreFoundation 0x332cfb75 -[__NSArrayM objectAtIndex:] + 165\r\n3\t\r\nINSPI 0x00062bf5 -[TiUITableViewSectionProxy rowAtIndex:] (TiUITableViewSectionProxy.m:113)\r\n4\t\r\nINSPI 0x000a5391 -[TiUITableView triggerActionForIndexPath:fromPath:tableView:wasAccessory:search:name:] (TiUITableView.m:906)\r\n5\t\r\nINSPI 0x000aa12d -[TiUITableView tableView:didSelectRowAtIndexPath:] (TiUITableView.m:2088)\r\n6\t\r\nUIKit 0x3524e28d -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 877\r\n7\t\r\nUIKit 0x352d0f81 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 157\r\n8\t\r\nFoundation 0x33c92277 __NSFireDelayedPerform + 451\r\n9\t\r\nCoreFoundation 0x333595df __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 15\r\n10\t\r\nCoreFoundation 0x33359291 __CFRunLoopDoTimer + 273\r\n11\t\r\nCoreFoundation 0x33357f01 __CFRunLoopRun + 1233\r\n12\t\r\nCoreFoundation 0x332caebd CFRunLoopRunSpecific + 357\r\n13\t\r\nCoreFoundation 0x332cad49 CFRunLoopRunInMode + 105\r\n14\t\r\nGraphicsServices 0x36ea12eb GSEventRunModal + 75\r\n15\t\r\nUIKit 0x351e0301 UIApplicationMain + 1121\r\n16\t\r\nINSPI 0x0004a5d3 main (main.m:36)\r\n17\t\r\nINSPI 0x0004a010 start + 40\r\n{code}\r\n\r\nh6.Concept\r\nA global onerror event that can be accessed in a production environment will allow to figure out root cause problem quicker.\r\n\r\nWith a app-wide error event, We would like to retrieve:\r\n\r\n1. the file that the error occurred in (including path)\r\n2. the line number of the error\r\n3. the error that was thrown\r\n4. the stack trace that lead to the error\r\n\r\nh6.Proposed Ti equivalent\r\n{code}\r\nTi.App.addEventListener('error', function(e){\r\n //e.error\r\n //e.stack\r\n});\r\n{code}\r\n\r\nIt seems trivial to add such a hook to the titanium SDK, as in development, a red window appears showing the error. Whatever event that is hooking into needs to be exposed to the developer as well.", "attachment": [], "flagged": false, "summary": "I need to convert a crash report into a Titanium stack trace", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "245817", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Not sure why this is assigned to me.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2013-04-04T22:30:58.000+0000", "updated": "2013-04-04T22:30:58.000+0000" }, { "id": "307998", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This would be epic, +1! Crash reporting would be great, but many times a JS error halts the functioning of a production app without resulting in a crash, so those errors never get attention unless the user reports them. An event we can listen to would handle this perfectly for my needs as well.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T13:50:09.000+0000", "updated": "2014-06-09T13:50:09.000+0000" }, { "id": "352320", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For anyone still curious about this, I'm using https://github.com/dbankier/TiLogCatcher to listen for JS errors.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-12T20:15:34.000+0000", "updated": "2015-05-12T20:15:34.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }