{ "id": "86707", "key": "AC-3015", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-03-25T08:49:35.000+0000", "created": "2012-02-20T12:25:54.000+0000", "labels": [ "android", "crash", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:02.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "h2.Problem\r\nWhen you \"Kill\" an app after a syntax error occurs at runtime (the red/white error dialog), the screen goes black and the app hangs, instead of dying off. Clicking the Android \"back\" button at that point does nothing.\r\n\r\nh2.Testcase\r\n# Create a new mobile project and paste in the code that follows.\r\n# Run the app on the Android 2.2 emulator.\r\n# Press the \"Next Window\" button.\r\n# Press the \"Cause error\" button. As expected, this causes a red/white syntax error to occur.\r\n# Click the \"Kill\" button.\r\n# *The screen goes black and does not respond.*\r\n# To see a different result, change the {noformat}if (false){noformat} in Button1Click to {noformat}if (true){noformat} and run the app again.\r\n# Press the \"Next Window\" button. As expected, this causes a red/white syntax error to occur.\r\n# Click the \"Kill\" button.\r\n# You will see that this time, the app restarts itself (is it really supposed to do this, or is it supposed to just die off?).\r\n\r\n{code:title=app.js}\r\nTi.UI.createWindow({url:'win1.js',\r\n exitOnClose:true,\r\n navBarHidden:true\r\n }).open();\r\n{code}\r\n{code:title=win1.js}\r\nvar win1=Ti.UI.currentWindow;\r\n\r\nvar Button1=Ti.UI.createButton({title:'Next Window'});\r\nfunction Button1Click()\r\n{\r\n if (false) // make this true to see a crash restart the app\r\n Button1.title=dne; // force a crash\r\n Ti.UI.createWindow({url:'win2.js',\r\n exitOnClose:false,\r\n navBarHidden:true\r\n }).open();\r\n}\r\nButton1.addEventListener('click',Button1Click);\r\nwin1.add(Button1);\r\n{code}\r\n{code:title=win2.js}\r\nvar CrashWin=Ti.UI.currentWindow;\r\n\r\nvar CrashButton=Ti.UI.createButton({title:'Cause error'});\r\nfunction CrashButtonClick()\r\n{\r\n CrashButton.title=dne; // force a crash\r\n}\r\nCrashButton.addEventListener('click',CrashButtonClick);\r\nCrashWin.add(CrashButton);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Syntax error hangs app when you choose \"Kill\"", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "- Titanium Mobile SDK 1.8.1\r\n- Android 2.2 emulator\r\n- Windows 7\r\n- Titanium Studio 1.0.8.201201262211\r\n", "comment": { "comments": [ { "id": "187175", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified that this is fixed in SDK 2.0.0.v20120319003254.\r\n", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-03-19T13:37:19.000+0000", "updated": "2012-03-19T13:37:19.000+0000" }, { "id": "188509", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Customer confirmed the fix in 2.0", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-25T08:49:35.000+0000", "updated": "2012-03-25T08:49:35.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }