{ "id": "86545", "key": "TIMOB-7694", "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": "12096", "description": "", "name": "Sprint 2012-04", "archived": true, "released": true, "releaseDate": "2012-02-26" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-02-17T12:35:51.000+0000", "created": "2012-02-15T15:38:33.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "2.0.0", "module_window", "qe-testadded", "regression" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-02-21T14:02:32.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": "After upgrading from 1.8.1 to the latest CI build (2.0.0.v20120215111634), I am now receiving an error related to closing a window. If there is a TableView added to the window and the window has the navBarHidden property set (either to true or false), when closing that window it will cause a NullPointerException error.\r\n\r\n{code}\r\nD/AndroidRuntime(21347): Shutting down VM\r\nW/dalvikvm(21347): threadid=1: thread exiting with uncaught exception (group=0x401b7760)\r\nE/TiApplication(21347): (main) [1475,203564] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 2.0.0,2012/02/15 11:16,f358132\r\nE/TiApplication(21347): java.lang.NullPointerException\r\nE/TiApplication(21347): at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:496)\r\nE/TiApplication(21347): at android.view.View.layout(View.java:9601)\r\nE/TiApplication(21347): at android.view.ViewGroup.layout(ViewGroup.java:3879)\r\nE/TiApplication(21347): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382)\r\nE/TiApplication(21347): at android.view.View.layout(View.java:9601)\r\nE/TiApplication(21347): at android.view.ViewGroup.layout(ViewGroup.java:3879)\r\nE/TiApplication(21347): at android.widget.FrameLayout.onLayout(FrameLayout.java:400)\r\nE/TiApplication(21347): at android.view.View.layout(View.java:9601)\r\nE/TiApplication(21347): at android.view.ViewGroup.layout(ViewGroup.java:3879)\r\nE/TiApplication(21347): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1542)\r\nE/TiApplication(21347): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1403)\r\nE/TiApplication(21347): at android.widget.LinearLayout.onLayout(LinearLayout.java:1314)\r\nE/TiApplication(21347): at android.view.View.layout(View.java:9601)\r\nE/TiApplication(21347): at android.view.ViewGroup.layout(ViewGroup.java:3879)\r\nE/TiApplication(21347): at android.widget.FrameLayout.onLayout(FrameLayout.java:400)\r\nE/TiApplication(21347): at android.view.View.layout(View.java:9601)\r\nE/TiApplication(21347): at android.view.ViewGroup.layout(ViewGroup.java:3879)\r\nE/TiApplication(21347): at android.view.ViewRoot.performTraversals(ViewRoot.java:1286)\r\nE/TiApplication(21347): at android.view.ViewRoot.handleMessage(ViewRoot.java:2063)\r\nE/TiApplication(21347): at android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/TiApplication(21347): at android.os.Looper.loop(Looper.java:132)\r\nE/TiApplication(21347): at android.app.ActivityThread.main(ActivityThread.java:4126)\r\nE/TiApplication(21347): at java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiApplication(21347): at java.lang.reflect.Method.invoke(Method.java:491)\r\nE/TiApplication(21347): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)\r\nE/TiApplication(21347): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)\r\n{code}\r\n\r\nHere is code to reproduce the issue:\r\n\r\n{code}\r\n//create window 1.\r\nTi.API.info(\"opening window 1\");\r\nvar win = Ti.UI.createWindow({ \r\n\tbackgroundColor: \"#fff\", \r\n\tnavBarHidden: true, \r\n\tsoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE, \r\n\texitOnClose: true \r\n});\r\nwin.open();\r\n\r\nvar label = Ti.UI.createLabel({ text: \"Window 1\", width: \"auto\", height: \"auto\", top: 10 });\r\nwin.add(label);\r\n\r\nvar openWindow2Button = Ti.UI.createButton({ title: \"Open Window 2\", height: \"auto\", width: \"auto\", bottom: 10 });\r\nopenWindow2Button.addEventListener(\"click\", function() { \r\n\r\n\t//create window 2.\r\n\tTi.API.info(\"opening window 2\");\r\n\tvar win2 = Ti.UI.createWindow({ \r\n\t\tbackgroundColor: \"#fff\",\r\n\t\tnavBarHidden: true,//this causes crash on window 2 close!!\r\n\t\tsoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE, \r\n\t\texitOnClose: false \r\n\t});\r\n\twin2.open();\r\n\r\n\tvar label2 = Ti.UI.createLabel({ text: \"Window 2\", width: \"auto\", height: \"auto\", top: 10 });\r\n\twin2.add(label2);\r\n\t\r\n\tvar closeWindow2Button = Ti.UI.createButton({ title: \"Close Window 2\", height: \"auto\", width: \"auto\", bottom: 10 });\r\n\tcloseWindow2Button.addEventListener(\"click\", function() { \r\n\t\tTi.API.info(\"closing window 2\");\r\n\t\twin2.close(); \r\n\t});\r\n\twin2.add(closeWindow2Button);\r\n\r\n\tvar table = Ti.UI.createTableView({ top: 60, bottom: 60, left: 0, right: 0, data: [] });\r\n\twin2.add(table);\r\n\t\r\n});\r\nwin.add(openWindow2Button);\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Closing window with tableview and navBarHidden property set will result in NullPointerException", "creator": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Ti CI Build 2.0.0.v20120215111634\r\nAndroid 3.2\r\nSamsung Galaxy Tab", "comment": { "comments": [ { "id": "183488", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Master pull request:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/1451", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-16T17:44:55.000+0000", "updated": "2012-02-16T17:44:55.000+0000" }, { "id": "183495", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "1_8_X PR:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/1453", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-16T17:56:35.000+0000", "updated": "2012-02-16T17:56:35.000+0000" }, { "id": "183850", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Fixed.\r\nNote: Original fail case exists only in 2.0 beta.\r\nSDK: 1.8.2.v20120221114636\r\nAndroid: V8\r\nStudio: 1.0.9.201202131024\r\nOS: Lion\r\nDevices Tested: Galaxy Tab 10.1 3.2, Amaze 2.3.4", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-21T13:38:04.000+0000", "updated": "2012-02-21T13:38:04.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }