{ "id": "166719", "key": "AC-4867", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-03-21T20:44:31.000+0000", "created": "2017-03-21T15:31:01.000+0000", "labels": [ "CommonJS", "Crash", "View" ], "versions": [ { "id": "17032", "name": "Appcelerator Studio 4.3.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T20:44:31.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": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "Hi I am having this code\r\n\r\nexports.alarmPicker = function(args) {\r\n\tvar that = this;\r\n\tvar param = args;\r\n\tvar alarmPicker = Ti.UI.createPicker({\r\n\t\tselectionIndicator : true,\r\n\t\tbottom : 0,\r\n\t\tleft : 0,\r\n\t\tright : 0,\r\n\t\ttype : Ti.UI.PICKER_TYPE_DATE_AND_TIME\r\n\t});\r\n\r\n\talarmPicker.addEventListener('change', function(e) {\r\n\t\tTi.API.info(JSON.stringify(e));\r\n\t});\r\n\r\n\tvar transparent = Ti.UI.createView({\r\n\t\ttop : 0,\r\n\t\theight : Ti.UI.FILL,\r\n\t\twidth : Ti.UI.FILL,\r\n\t\tbackgroundColor : 'transparent',\r\n\t\tzIndex : 2\r\n\r\n\t});\r\n\tvar transparentGradientView = Ti.UI.createView({\r\n\t\ttop : 0,\r\n\t\theight : Ti.UI.FILL,\r\n\t\twidth : Ti.UI.FILL,\r\n\t\tbackgroundColor : 'gray',\r\n\t\topacity : 0.6\r\n\t});\r\n\r\n\ttransparent.add(transparentGradientView);\r\n\r\n\ttransparent.add(alarmPicker);\r\n\r\n\tvar alarmTitle = Titanium.UI.createLabel({\r\n\t\ttext : L('alarmTitleLabelText', 'Alarm'),\r\n\t\tcolor : '#000000'\r\n\t});\r\n\tvar toolBar = undefined;\r\n\tvar set = undefined;\r\n\tvar cancel = undefined;\r\n\r\n\tif (OS_IOS) {\r\n\t\tset = Titanium.UI.createButton({\r\n\t\t\ttitle : L('setPickerTitle', 'Set'),\r\n\t\t\tstyle : Titanium.UI.iOS.SystemButtonStyle.DONE,\r\n\t\t});\r\n\r\n\t\tcancel = Titanium.UI.createButton({\r\n\t\t\tsystemButton : Titanium.UI.iOS.SystemButton.CANCEL,\r\n\t\t\ttitle : L('cancelPickerTitle', 'Cancel')\r\n\t\t});\r\n\r\n\t\tvar flexSpace = Titanium.UI.createButton({\r\n\t\t\tsystemButton : Titanium.UI.iOS.SystemButton.FLEXIBLE_SPACE\r\n\t\t});\r\n\r\n\t\ttoolbar = Titanium.UI.iOS.createToolbar({\r\n\t\t\titems : [cancel, flexSpace, alarmTitle, flexSpace, set],\r\n\t\t\tbottom : 0,\r\n\t\t\tborderTop : true,\r\n\t\t\tborderBottom : false\r\n\t\t});\r\n\t} else {\r\n\t\tset = Titanium.UI.createButton({\r\n\t\t\ttitle : L('setPickerTitle', 'Set'),\r\n\t\t\tright : '20dp',\r\n\t\t\tcolor : '#167AFF',\r\n\t\t\tbackgroundColor : 'transparent'\r\n\t\t});\r\n\r\n\t\tcancel = Titanium.UI.createButton({\r\n\t\t\ttitle : L('cancelPickerTitle', 'Cancel'),\r\n\t\t\tleft : '20dp',\r\n\t\t\tcolor : '#167AFF',\r\n\t\t\tbackgroundColor : 'transparent'\r\n\t\t});\r\n\r\n\t\ttoolbar = Titanium.UI.createView({\r\n\t\t\theight : 50,\r\n\t\t\twidth : Ti.UI.FILL,\r\n\t\t\tbackgroundColor : '#EAEAEA'\r\n\t\t});\r\n\r\n\t\ttoolbar.add(cancel);\r\n\t\ttoolbar.add(alarmTitle);\r\n\t\ttoolbar.add(set);\r\n\r\n\t}\r\n\ttransparent.add(toolbar);\r\n\r\n\tcancel.addEventListener('click', function(e) {\r\n\t\tthat.remove();\r\n\t\targs.alarmSwitch.value = 0;\r\n\t\targs.alarmLabel.setVisible(false);\r\n\t\targs.alarmLabel.setText('');\r\n\t});\r\n\r\n\tset.addEventListener('click', function(e) {\r\n\t\tparam.callback(alarmPicker.value);\r\n\t\tthat.remove();\r\n\t});\r\n\r\n\ttoolbar.addEventListener('postlayout', function(e) {\r\n\t\tthis.bottom = alarmPicker.size.height;\r\n\t});\r\n\r\n\tthis.remove = function(e) {\r\n\t\targs.window.remove(transparent);\r\n\t};\r\n\r\n\tthis.add = function(e) {\r\n\t\targs.window.add(transparent);\r\n\t};\r\n};\r\n\r\nWhen i am calling .add method i am getting the crash attached.\r\n\r\nThis seems to be a bug and is critical", "attachment": [ { "id": "61883", "filename": "device-2017-03-21-205222.png", "author": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2017-03-21T15:30:16.000+0000", "size": 372455, "mimeType": "image/png" } ], "flagged": false, "summary": "Adding A View to a window is crashing Using CommonJS", "creator": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "MacOS Sierra,\r\nAppc studio - latest\r\nSDK 6.0.2GA", "comment": { "comments": [ { "id": "414199", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "hello, Please provide a full reproducible code for us to test. Your code has missing component. Please share a project that reproduce the issue. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-03-21T16:23:21.000+0000", "updated": "2017-03-21T16:23:21.000+0000" }, { "id": "414350", "author": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Hi,\r\nJust saw the console logs in detail. It says Date_Time picker is not allowed in android.\r\nHow is it possible, also in api docs there is nothing like that mentioned", "updateAuthor": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2017-03-21T19:32:23.000+0000", "updated": "2017-03-21T19:32:23.000+0000" }, { "id": "414352", "author": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "body": "PickerProxy: The useSpinner property is deprecated. Please refer to the documentation for more information\r\n[WARN] : PickerProxy: Date+Time timer not supported in Titanium for Android\r\n[WARN] : W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.view.TiUIView.registerForTouch()' on a null object reference\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:499)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:514)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:498)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:677)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:571)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:872)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1095)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:354)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:158)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:7229)\r\n[WARN] : W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)", "updateAuthor": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2017-03-21T19:37:16.000+0000", "updated": "2017-03-21T19:37:16.000+0000" }, { "id": "414353", "author": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Well close this issue. Thanks,\r\nI found a work around", "updateAuthor": { "name": "ishansingh20132012", "key": "ishansingh20132012", "displayName": "Ishan Singh", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2017-03-21T19:47:08.000+0000", "updated": "2017-03-21T19:47:08.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }