{ "id": "140915", "key": "TIMOB-18131", "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": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-17T19:57:51.000+0000", "created": "2014-12-03T23:39:56.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.5.0", "regression" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-12-17T19:57:51.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": "h5.Description\r\n\r\nWhen an error is thrown using the 3.5.0 SDK the following is printed out in the console\r\n\r\n{code}\r\n[ERROR] : Script Error {\r\n[ERROR] : column = 11;\r\n[ERROR] : line = 8;\r\n[ERROR] : sourceURL = \"file:///private/var/mobile/Containers/Bundle/Application/8E9433FD-3F80-4060-8BBB-2C1C249744CB/TIMOB-10501.app/app.js\";\r\n[ERROR] : stack = \"global code@file:///private/var/mobile/Containers/Bundle/Application/8E9433FD-3F80-4060-8BBB-2C1C249744CB/TIMOB-10501.app/app.js:8:11\";\r\n[ERROR] : }\r\n{code}\r\n\r\nIn the error logs in the console there should be a message telling the user where the error is as shown when using 3.4.1.GA SDK \r\n\r\n{code}\r\n[ERROR] : Script Error {\r\n[ERROR] : backtrace = \"#0 () at :0\";\r\n[ERROR] : line = 8;\r\n[ERROR] : message = \"'undefined' is not a function (evaluating 'win.foobar()')\";\r\n[ERROR] : name = TypeError;\r\n[ERROR] : sourceId = 48024064;\r\n[ERROR] : sourceURL = \"file:///private/var/mobile/Containers/Bundle/Application/E979FC89-452D-43B9-85F5-32FE7920445B/TIMOB-10501.app/app.js\";\r\n[ERROR] : }\r\n{code}\r\n\r\n\r\nThis *is a regression* as context is given in 3.4.1.GA\r\nOn the device there are also differences, see the attached images for examples of these.\r\n\r\nh5.Steps To Reproduce\r\n\r\n1. Add the code below to an exisiting project and run the project on a device or sim\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win = Titanium.UI.createWindow({ \r\n title: 'test'\r\n});\r\n \r\nvar obj = require('module')();\r\nwin.foobar();\r\n\r\n\r\nwin.open();\r\n{code}\r\nh5.Actual Result\r\n\r\nThe app will crash and will only show a reference to the line numbers rather than providing context\r\n\r\nh5.Expected Result\r\n\r\nThe app will crash and should provide context, e.g. it should say \"message = \"'undefined' is not a function (evaluating 'e.foobar()')\";\"", "attachment": [ { "id": "52997", "filename": "3.4.1.PNG", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-12-03T23:39:56.000+0000", "size": 124770, "mimeType": "image/png" }, { "id": "52998", "filename": "3.5.0.PNG", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-12-03T23:39:56.000+0000", "size": 107061, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: When an application error is thrown no reason is given", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Mac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.5.0.v20141203132514\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPhone 6 Plus (8.1.1), iPhone 6 Simulator (8.1)", "comment": { "comments": [ { "id": "334695", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jalter] [~pec1985] [~mlangston] [~vduggal] FYI", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-03T23:49:37.000+0000", "updated": "2014-12-03T23:49:37.000+0000" }, { "id": "335403", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nhttps://github.com/appcelerator/tijscore/pull/19", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-08T18:32:04.000+0000", "updated": "2014-12-08T18:32:04.000+0000" }, { "id": "335755", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.5.0.v20141208122514\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPhone 6 Plus (8.1), iPhone 6 Simulator (8.1), iPhone 5s (7.1.1)\r\n\r\n{code}\r\n//var cloud = require('ti.cloud');\r\nvar x = y;\r\nTitanium.UI.setBackgroundColor('#fff'); \r\nvar win = Titanium.UI.createWindow({title: 'test'}); \r\n//win.foobar();\r\nwin.open();\r\n{code}\r\n\r\nUsing the code above, built to device and sim. Each time the application included the correct information was included in the application error screen and the console log (see example log below). \r\n\r\n{code}\r\n[ERROR] : Script Error {\r\n[ERROR] : column = 10;\r\n[ERROR] : line = 3;\r\n[ERROR] : message = \"Can't find variable y\";\r\n[ERROR] : sourceURL = \"file:///private/var/mobile/Containers/Bundle/Application/A181D005-7B8E-4E6B-A34D-39593215B14F/Testy.app/app.js\";\r\n[ERROR] : stack = \"global code@file:///private/var/mobile/Containers/Bundle/Application/A181D005-7B8E-4E6B-A34D-39593215B14F/Testy.app/app.js:3:10\";\r\n[ERROR] : }\r\n{code}\r\n\r\nThe following was what was tried:\r\n\r\n* Require ti.cloud and not add it to tiapp.xml\r\n* Undefined function (view.foobar)\r\n* Undefined variable (var x = y)\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-12-10T00:08:22.000+0000", "updated": "2014-12-10T00:08:22.000+0000" }, { "id": "336857", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to add affects version\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-17T19:57:10.000+0000", "updated": "2014-12-17T19:57:10.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }