{ "id": "86155", "key": "TIMOB-7678", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-08-28T20:32:17.000+0000", "created": "2012-02-07T00:29:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [ { "id": "20366", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "84551", "key": "TIMOB-7024", "fields": { "summary": "Android: ActivityIndicator on window focus event crash", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "20361", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "84551", "key": "TIMOB-7024", "fields": { "summary": "Android: ActivityIndicator on window focus event crash", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T20:38: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h3. Problem Description\r\nOn Android (2.3, but reports of 2.2 also), using SDK 1.8+, OptionDialog behaviour seems to be erratic.\r\n\r\nThere seems to be two separate issues:\r\n\r\n# Dialogs on our main screen open fine one first load, repeated opening and closing, however once you navigate away from that window, when you return, the dialogs no longer display\r\n# App wide events which display dialogs open fine once, but sometimes not subsequently\r\n\r\nSome code to replicate issue 1 is below. This bug occurs on both device and emulator. This does not occur with SDK < 1.8\r\n\r\nh3. Actual results\r\noption dialog not showing, and you get this in the log:\r\nW/TiUIDialog( 386): (main) [2,8442] dialog activity is destroyed, unable to show dialog with message: null\r\n\r\nh3. Expected Results\r\nThe option dialog showing always\r\n\r\nh3. Test case\r\n# Open app\r\n# Click \"Open dialog\", dialog opens\r\n# Close dialog\r\n# Click \"Open window\", window 2 opens\r\n# Go back to window 1\r\n# Click \"Open dialog\", dialog does not open\r\n# If dialog opens, repeat steps 3-6 multiple times, dialog will fail within 2-3 repeats\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Window 1',\r\n backgroundColor:'#fff'\r\n});\r\n \r\nvar button1 = Titanium.UI.createButton({\r\n title: 'Open window',\r\n top: 30\r\n})\r\n \r\nvar button2 = Titanium.UI.createButton({\r\n title: 'Open dialog',\r\n top: 80\r\n})\r\n \r\nbutton1.addEventListener('click',function(){\r\n var win2 = Titanium.UI.createWindow({\r\n backgroundColor: '#fff',\r\n modal: true,\r\n title: 'Window 2'\r\n })\r\n win2.open()\r\n});\r\n \r\nbutton2.addEventListener('click',function(){\r\n \r\n var optionDialog = Titanium.UI.createOptionDialog({\r\n buttonNames: ['Ok'],\r\n title: 'Dialog'\r\n })\r\n optionDialog.show()\r\n});\r\n \r\nwin1.add(button1);\r\nwin1.add(button2);\r\n \r\nwin1.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: OptionDialog does not always not always open", "creator": { "name": "simonr", "key": "simonr", "displayName": "Simon R", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "simonr", "key": "simonr", "displayName": "Simon R", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium SDK version: 1.8.1 (fails) , 1.9CI (fails), 1.7.5 (works fine), 2.0.2.GA (fails)\r\nJavascript Engine: Rhino / V8 \r\nPlatform & version: Android 2.2 / Android 2.3\r\nDevice Details: Android emulator / HTC ChaCha / Samsung Galaxy Note (2.3)\r\nHost Operating System: OSX Lion\r\nTitanium Studio version: 1.0.8", "comment": { "comments": [ { "id": "182182", "author": { "name": "simonr", "key": "simonr", "displayName": "Simon R", "active": true, "timeZone": "Europe/London" }, "body": "I should have added this is related to this Q&A post: [http://developer.appcelerator.com/question/131734/android-23-optiondialog-issues]", "updateAuthor": { "name": "simonr", "key": "simonr", "displayName": "Simon R", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-07T00:30:56.000+0000", "updated": "2012-02-07T00:30:56.000+0000" }, { "id": "202042", "author": { "name": "amplop21", "key": "amplop21", "displayName": "amplop keren", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I had your problem, try not to use local variable when createOptionDialog on android.\r\nTry use global variable as you can see on the Kitchen Sink example of Option Dialog", "updateAuthor": { "name": "amplop21", "key": "amplop21", "displayName": "amplop keren", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-08T23:31:27.000+0000", "updated": "2012-07-08T23:31:27.000+0000" }, { "id": "216658", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The fix for timob-7024 fixes this problem. Here's the PR link: https://github.com/appcelerator/titanium_mobile/pull/2324\r\nWe will backport this fix to 2.0.X.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-28T17:22:09.000+0000", "updated": "2012-08-28T17:22:09.000+0000" }, { "id": "414897", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T20:38:02.000+0000", "updated": "2017-03-22T20:38:02.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }