{ "id": "105220", "key": "TIMOB-11824", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14788", "description": "2012 Sprint 26 Core", "name": "2012 Sprint 26 Core", "archived": true, "released": true, "releaseDate": "2012-12-31" }, { "id": "14786", "description": "2012 Sprint 26", "name": "2012 Sprint 26", "archived": true, "released": true, "releaseDate": "2012-12-31" }, { "id": "15277", "description": "2013 Sprint 06 Core", "name": "2013 Sprint 06 Core", "archived": true, "released": true, "releaseDate": "2013-03-25" }, { "id": "14816", "description": "2013 Sprint 06", "name": "2013 Sprint 06", "archived": true, "released": true, "releaseDate": "2013-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-10T22:54:02.000+0000", "created": "2012-11-19T20:47:51.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-closed-3.1.0", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "22927", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "104300", "key": "TIMOB-11642", "fields": { "summary": "Android: Enable click event listeners for app icon/app logo in action bar", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-03T07:10:54.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": "When testing TIMOB-11642, I tried the following code:\r\n\r\n{code}\r\nwin1.addEventListener(\"open\", function(evt) {\r\n var actionBar = win1.activity.actionBar;\r\n Ti.API.info(\"In evt. listener, actionBar is: \" + actionBar);\r\n actionBar.title = \"Title Demo\";\r\n actionBar.onHomeIconItemSelected = function() {\r\n alert(\"Home clicked!\");\r\n }\r\n});\r\n{code}\r\n\r\nAs reported by @igorsantos07, I got a crash on this. If I replace the alert with a Ti.API.info call, all goes well. Weird.\r\n", "attachment": [], "flagged": false, "summary": "Android: Opening alert() from action bar \"home\" icon click handler causes crash", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "230318", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3545\n\nFull test case:\n\n{code}\nvar win = Ti.UI.createWindow({\n fullscreen : true\n});\n \nwin.addEventListener('open', function(){\n var actionBar = win.activity.actionBar;\n actionBar.onHomeIconItemSelected = function() {\n alert('home clicked');\n }\n});\n \nwin.open();\n{code}", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-06T22:39:41.000+0000", "updated": "2012-12-06T22:39:41.000+0000" }, { "id": "239790", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "As soon as app is executed. It crashes.\r\n\r\nTested on:\r\nGoogle nexus, android verison: 4.1\r\nSDK version: 3.1.0.v20130225195538\r\nCLI version : 3.0.24\r\nOS : MAC OSX 10.7.5\r\nXCode : 4.5.1\r\nStudio : 3.0.2.201302041757\r\n\r\nExpected : \r\nOpening alert() from action bar, app should not crash.\r\n\r\nActual:\r\nApplication crashes.", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-02-26T11:54:20.000+0000", "updated": "2013-02-26T11:54:20.000+0000" }, { "id": "242929", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving... I tried three devices and it worked fine. Galaxy Nexus (4.1), Nexus 4 (4.2), and Galaxy tab (3.2). If you see this issue, please also attach logs.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T17:04:36.000+0000", "updated": "2013-03-19T17:04:36.000+0000" }, { "id": "246842", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "App still crashes as soon as it executes.\r\n\r\nTested on:\r\nDevice : Google Nexus 7, Android Version: 4.1\r\nSDK: 3.1.0.v20130409124549\r\nCLI version : 3.1.0-cr\r\nOS : MAC OSX 10.7.5\r\nAppcelerator Studio, build: 3.1.0.201304052347\r\nXCode : 4.5.1\r\n\r\n\r\n\r\nHere's the log\r\n\r\n04-10 15:09:57.214: W/dalvikvm(25018): threadid=1: thread exiting with uncaught exception (group=0x411bd300)\r\n04-10 15:09:57.214: E/TiApplication(25018): (main) [45,45] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.1.0,2013/04/09 12:46,485b313\r\n04-10 15:09:57.214: E/TiApplication(25018): java.lang.NullPointerException\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat org.appcelerator.titanium.proxy.ActionBarProxy.handleMessage(ActionBarProxy.java:222)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat android.os.Looper.loop(Looper.java:137)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat android.app.ActivityThread.main(ActivityThread.java:4745)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)\r\n04-10 15:09:57.214: E/TiApplication(25018): \tat dalvik.system.NativeStart.main(Native Method)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): FATAL EXCEPTION: main\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): java.lang.NullPointerException\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat org.appcelerator.titanium.proxy.ActionBarProxy.handleMessage(ActionBarProxy.java:222)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat android.os.Looper.loop(Looper.java:137)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat android.app.ActivityThread.main(ActivityThread.java:4745)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)\r\n04-10 15:09:57.254: E/AndroidRuntime(25018): \tat dalvik.system.NativeStart.main(Native Method)\r\n04-10 15:09:57.254: W/ActivityManager(348): Force finishing activity com.APPLE/org.appcelerator.titanium.TiActivity\r\n04-10 15:09:57.284: W/ActivityManager(348): Force finishing activity com.APPLE/.Test01Activity\r\n04-10 15:09:57.784: W/ActivityManager(348): Activity pause timeout for ActivityRecord{41e30a68 com.APPLE/org.appcelerator.titanium.TiActivity}\r\n04-10 15:10:00.104: I/Process(25018): Sending signal. PID: 25018 SIG: 9\r\n", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-04-10T09:43:06.000+0000", "updated": "2013-04-10T09:43:06.000+0000" }, { "id": "246968", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This error only occurs if you didn't specify your app to be API 11 and above.\n\nPlease add this to your tiapp.xml:\n{code}\n \n \n \n \n \n{code}\n\nPlease see http://docs.appcelerator.com/titanium/latest/#!/guide/Android_Action_Bar for more info.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-10T22:53:53.000+0000", "updated": "2013-04-10T22:53:53.000+0000" }, { "id": "247029", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nSDK: 3.1.0.v20130409124549\r\nStudio:3.1.0.201304011603\r\nDevice: Nexus 7(v 4.1)\r\nOS: OSX 10.7.5\r\n\r\nWorks as expected after specifying android:targetSdkVersion=\"11\" along with the specified code.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T08:48:53.000+0000", "updated": "2013-04-11T08:48:53.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }