{ "id": "173788", "key": "TIMOB-27256", "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": "20845", "name": "Release 8.1.1", "archived": false, "released": true, "releaseDate": "2019-08-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-08-21T13:28:34.000+0000", "created": "2019-06-20T01:29:00.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "alert", "android", "dialog", "engSchedule", "regression" ], "versions": [ { "id": "20432", "name": "Release 8.0.1", "archived": false, "released": true, "releaseDate": "2019-05-15" } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2019-08-21T13:28:34.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "It is working fine in 8.0.0 but not in 8.0.1\r\nin 8.0.1 it return \"Dialog activity is destroyed, unable to show dialog with message: null\"\r\n\r\nso here the case\r\n1. i have 1 component of alert dialog with android view which used in multiple page of screen\r\n2. when i show the alert dialog in first screen it works fine\r\n3. when i show the same alert dialog in second screen, the alertdialog not showing, but instead it's on the first screen (when i close the second page, i saw the alert dialog in 1st page)\r\n4. in first page when i try to show the same alertdialog, it return error \"Dialog activity is destroyed, unable to show dialog with message: null\"\r\n\r\nWorkaround for this issue\r\n1. Keep re-creating new alertdialog unlike previous approach which using 1 alertdialog and used in multiple places.", "attachment": [], "flagged": false, "summary": "Android: AlertDialog cannot be re-shown in a different window as of 8.0.1", "creator": { "name": "dyan02", "key": "dyan02", "displayName": "ardy wongso", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dyan02", "key": "dyan02", "displayName": "ardy wongso", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android \r\nAppc SDK 8.0.1", "closedSprints": [ { "id": 1160, "state": "closed", "name": "2019 Sprint 17", "startDate": "2019-08-12T07:59:28.950Z", "endDate": "2019-08-25T07:59:00.000Z", "completeDate": "2019-08-26T15:35:29.980Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "449320", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hi ! \r\nThanks for reporting the issue. Can you please try using latest ti sdk 8.0.2.GA and check if you experience the same? You can download the sdk using this command: *appc ti sdk install 8.0.2.GA* \r\nLet us know the update.", "updateAuthor": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-06-25T09:46:02.000+0000", "updated": "2019-06-25T09:46:02.000+0000" }, { "id": "449440", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can reproduce this issue in Titanium 8.0.1 and above with the following code...\r\n{code:javascript}\r\nvar dialog = Ti.UI.createAlertDialog({\r\n\ttitle: \"Alert Dialog\",\r\n\tmessage: \"This is the alert message.\",\r\n\tbuttonNames: [\"OK\", \"Cancel\"],\r\n\tcancel: 1,\r\n});\r\n\r\nvar window = Ti.UI.createWindow();\r\nvar button = Ti.UI.createButton({ title: \"Show Alert\" });\r\nbutton.addEventListener(\"click\", function(e) {\r\n\tvar childWindow = Ti.UI.createWindow({ title: \"Child Window\" });\r\n\tchildWindow.addEventListener(\"open\", function() {\r\n\t\tfunction dialogEventHandler() {\r\n\t\t\tdialog.removeEventListener(\"click\", dialogEventHandler);\r\n\t\t\tdialog.removeEventListener(\"cancel\", dialogEventHandler);\r\n\t\t\tchildWindow.close();\r\n\t\t}\r\n\t\tdialog.addEventListener(\"click\", dialogEventHandler);\r\n\t\tdialog.addEventListener(\"cancel\", dialogEventHandler);\r\n\t\tdialog.show();\r\n\t});\r\n\tchildWindow.open();\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n\r\nThis is likely due to the changes we've made to [TIMOB-26978], where there were known rare crashes with {{AlertDialog}} and {{ProgressIndicator}} dialog when showing/hiding them from a destroyed activity window. Especially if Android's \"Don't keep activities\" developer option was turned on. A native Android dialog is designed to be attached to a single activity window and it can internally throw a Java exception on Google's end when showing/hiding it from a destroyed activity. \r\n\r\nWe'll re-look into this. On iOS, a dialog is always shown on top of the app and is not bound to any window. I think we need to look into better replicating this behavior on Android without the above mentioned exceptions that can happen.\r\n\r\nIn the meantime, I recommend that you re-create the alert dialog like you're doing now.\r\n_(Natively, I think that's our only option as well to get the same effect.)_\r\n\r\nThanks for bringing this issue to our attention.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-28T03:11:13.000+0000", "updated": "2019-06-28T03:11:13.000+0000" }, { "id": "450009", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/11073", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2019-07-23T08:38:11.000+0000", "updated": "2019-07-23T08:38:11.000+0000" }, { "id": "450171", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. \r\nWaiting for 8.1.0 GA before merge.\r\nKindly back-port to 8_1_X branch.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-30T22:23:03.000+0000", "updated": "2019-07-30T22:23:03.000+0000" }, { "id": "450182", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR (8_1_X): https://github.com/appcelerator/titanium_mobile/pull/11096", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2019-07-31T14:37:38.000+0000", "updated": "2019-07-31T14:37:38.000+0000" }, { "id": "450572", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR (8_3_X): https://github.com/appcelerator/titanium_mobile/pull/11156", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2019-08-19T14:23:34.000+0000", "updated": "2019-08-19T14:23:34.000+0000" }, { "id": "450628", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master, 8_3_X and 8_1_X", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-08-20T17:07:16.000+0000", "updated": "2019-08-20T17:07:22.000+0000" }, { "id": "450667", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket* fix verified in SDK version {{8.2.0.v20190820104021}}, {{8.1.1.v20190820143437}} and {{8.3.0.v20190820103430}}.\r\n\r\nTest and other information can be found at:\r\nPR (8_3_X): https://github.com/appcelerator/titanium_mobile/pull/11156\r\nPR (8_1_X): https://github.com/appcelerator/titanium_mobile/pull/11096\r\nMaster PR: https://github.com/appcelerator/titanium_mobile/pull/11073", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-21T13:28:27.000+0000", "updated": "2019-08-21T13:28:27.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }