{ "id": "117238", "key": "TIMOB-14566", "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": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-26T01:23:32.000+0000", "created": "2013-07-16T20:29:20.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_label", "parity", "qe-testadded" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "30251", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "116320", "key": "ALOY-717", "fields": { "summary": "Improve \"reflow\"/\"repaint\" functionality when adding and removing classes", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "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": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-06-19T12:43:43.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": "h2. problem\r\n\r\nWhen setting the *visible* property of a Ti.UI.View to *null* it causes a runtime exception on android. On iOS and Mobileweb the view would simply become invisible. I'm not certain whether it should be visible or invisible, but they should be the same behavior regardless of platform.\r\n\r\nh2. expected\r\n\r\nWhen I set the the *visible* property of a Ti.UI.Label to *null*, I expect the behavior, whether it makes the view visible or invisible, to be the same on all platforms. It should not cause a runtime exception\r\n\r\nh2. test case \r\n\r\nh4. app.js\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff',\r\n\tmodal: false,\r\n\texitOnClose: true\r\n});\r\nvar label = Ti.UI.createLabel({\r\n\ttext: 'just a test label'\r\n});\r\nlabel.addEventListener('click', function(e) {\r\n\tlabel.visible = null;\r\n});\r\n\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n\r\nh2. error log (adb)\r\n\r\n{code}\r\nW/dalvikvm( 486): threadid=1: thread exiting with uncaught exception (group=0x40015560)\r\nE/TiApplication( 486): (main) [1415,31700] Sending event: exception on thread: main msg:java.lang.IllegalArgumentException: Unable to convert null to boolean.; Titanium 3.1.1,2013/06/15 16:10,f7592c1\r\nE/TiApplication( 486): java.lang.IllegalArgumentException: Unable to convert null to boolean.\r\nE/TiApplication( 486): \tat org.appcelerator.titanium.util.TiConvert.toBoolean(TiConvert.java:356)\r\nE/TiApplication( 486): \tat org.appcelerator.titanium.view.TiUIView.propertyChanged(TiUIView.java:543)\r\nE/TiApplication( 486): \tat ti.modules.titanium.ui.widget.TiUILabel.propertyChanged(TiUILabel.java:168)\r\nE/TiApplication( 486): \tat org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21)\r\nE/TiApplication( 486): \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1011)\r\nE/TiApplication( 486): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:316)\r\nE/TiApplication( 486): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiApplication( 486): \tat android.os.Looper.loop(Looper.java:130)\r\nE/TiApplication( 486): \tat android.app.ActivityThread.main(ActivityThread.java:3683)\r\nE/TiApplication( 486): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiApplication( 486): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/TiApplication( 486): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\nE/TiApplication( 486): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\nE/TiApplication( 486): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/AndroidRuntime( 486): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 486): java.lang.IllegalArgumentException: Unable to convert null to boolean.\r\nE/AndroidRuntime( 486): \tat org.appcelerator.titanium.util.TiConvert.toBoolean(TiConvert.java:356)\r\nE/AndroidRuntime( 486): \tat org.appcelerator.titanium.view.TiUIView.propertyChanged(TiUIView.java:543)\r\nE/AndroidRuntime( 486): \tat ti.modules.titanium.ui.widget.TiUILabel.propertyChanged(TiUILabel.java:168)\r\nE/AndroidRuntime( 486): \tat org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21)\r\nE/AndroidRuntime( 486): \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1011)\r\nE/AndroidRuntime( 486): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:316)\r\nE/AndroidRuntime( 486): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/AndroidRuntime( 486): \tat android.os.Looper.loop(Looper.java:130)\r\nE/AndroidRuntime( 486): \tat android.app.ActivityThread.main(ActivityThread.java:3683)\r\nE/AndroidRuntime( 486): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 486): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/AndroidRuntime( 486): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\nE/AndroidRuntime( 486): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\nE/AndroidRuntime( 486): \tat dalvik.system.NativeStart.main(Native Method)\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Setting \"visible\" to null on View causes exception", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.1.1\r\nAndroid 2.3.3, 4.2.2", "comment": { "comments": [ { "id": "262321", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "PR:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4459", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-07-18T11:16:55.000+0000", "updated": "2013-07-18T11:16:55.000+0000" }, { "id": "274585", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with:\r\n\r\nAppc-Studio: 3.2.0.201310100354\r\nSdk:3.2.0.v20131009134844\r\nalloy:1.2.2\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processor:1.0.3\r\nDevice:Google Nexus 7(v4.3),ipodTouch1(v7.0)\r\nXcode: 5\r\n\r\nSetting visible to null on view does not cause exception now. Works fine on both iOS and Android.\r\n\r\nHave checked with view as well as label.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-10T12:05:54.000+0000", "updated": "2013-10-10T12:05:54.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }