{ "id": "155778", "key": "TIMOB-20585", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2018-08-01T16:07:59.000+0000", "created": "2016-03-16T20:22:15.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "mapView" ], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2018-08-01T16:08:12.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "In this new window I have one button called go back and pressing this button will close this window and taking you to the first map view to the scrollable view.But this is crashing here when we are at 2 map view in scrollable view and click go back.\r\nPlease find the attached test project .\r\n\r\nEnvironment \r\n{code}\r\nandroid 5.0.2 \r\nti.map 2.3.6\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11.2\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 0.12.0\r\n npm Version = 3.8.1\r\nTitanium CLI\r\n CLI Version = 5.0.6\r\nTitanium SDK\r\n SDK Version = 5.2.0.GA\r\n SDK Path = /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA\r\n Target Platform = android\r\n{code}\r\nThanks", "attachment": [ { "id": "58935", "filename": "Android error log.rtf", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-13T07:08:08.000+0000", "size": 3690, "mimeType": "text/rtf" }, { "id": "58643", "filename": "SampleMap.zip", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2016-03-16T20:25:24.000+0000", "size": 8531177, "mimeType": "application/zip" }, { "id": "58936", "filename": "sampleMapMultipleView.zip", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-13T07:07:41.000+0000", "size": 8414655, "mimeType": "application/zip" }, { "id": "59134", "filename": "sampleMapMultipleView 2.zip", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-04T04:13:32.000+0000", "size": 8414773, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android : Crashing when we are at two map view in scrollable view and click go back", "creator": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "subtasks": [], "reporter": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "environment": null, "closedSprints": [ { "id": 1045, "state": "closed", "name": "2018 Sprint 13 SDK", "startDate": "2018-06-17T20:47:13.621Z", "endDate": "2018-07-01T20:47:00.000Z", "completeDate": "2018-07-02T18:40:05.029Z", "originBoardId": 114 }, { "id": 1050, "state": "closed", "name": "2018 Sprint 14 SDK", "startDate": "2018-07-01T18:40:57.193Z", "endDate": "2018-07-15T18:40:00.000Z", "completeDate": "2018-07-16T03:27:08.720Z", "originBoardId": 114 }, { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 }, { "id": 1039, "state": "closed", "name": "2018 Sprint 12 SDK", "startDate": "2018-06-03T15:22:23.401Z", "endDate": "2018-06-17T15:22:00.000Z", "completeDate": "2018-06-18T20:45:36.363Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "380999", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Crash Logs:\r\n{code}\r\n03-29 20:10:35.586 7813 7813 D AndroidRuntime: Shutting down VM\r\n03-29 20:10:35.589 7813 7813 E TiApplication: (main) [460476,460476] Sending event: exception on thread: main msg:java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState; Titanium 5.2.0,2016/02/20 08:05,384775e\r\n03-29 20:10:35.589 7813 7813 E TiApplication: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1448)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1466)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:634)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:613)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat org.appcelerator.titanium.view.TiUIFragment.release(TiUIFragment.java:88)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat ti.map.TiUIMapView.release(TiUIMapView.java:905)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:539)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:536)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter.destroyItem(TiUIScrollableView.java:503)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.view.PagerAdapter.destroyItem(PagerAdapter.java:124)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.view.ViewPager.populate(ViewPager.java:1074)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:552)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:514)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:506)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat ti.modules.titanium.ui.widget.TiUIScrollableView.move(TiUIScrollableView.java:395)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat ti.modules.titanium.ui.widget.TiUIScrollableView.scrollTo(TiUIScrollableView.java:401)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat ti.modules.titanium.ui.ScrollableViewProxy.handleMessage(ScrollableViewProxy.java:99)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.os.Looper.loop(Looper.java:148)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5417)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n03-29 20:10:35.589 7813 7813 E TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n03-29 20:10:35.596 381 1229 D audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: FATAL EXCEPTION: main\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: Process: com.appcelerator.test.sg, PID: 7813\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1448)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1466)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:634)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:613)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat org.appcelerator.titanium.view.TiUIFragment.release(TiUIFragment.java:88)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat ti.map.TiUIMapView.release(TiUIMapView.java:905)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:539)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:536)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter.destroyItem(TiUIScrollableView.java:503)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.view.PagerAdapter.destroyItem(PagerAdapter.java:124)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.view.ViewPager.populate(ViewPager.java:1074)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:552)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:514)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:506)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat ti.modules.titanium.ui.widget.TiUIScrollableView.move(TiUIScrollableView.java:395)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat ti.modules.titanium.ui.widget.TiUIScrollableView.scrollTo(TiUIScrollableView.java:401)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat ti.modules.titanium.ui.ScrollableViewProxy.handleMessage(ScrollableViewProxy.java:99)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.os.Looper.loop(Looper.java:148)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:5417)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n03-29 20:10:35.625 7813 7813 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n03-29 20:10:35.627 865 1618 W ActivityManager: Force finishing activity com.appcelerator.test.sg/org.appcelerator.titanium.TiActivity\r\n03-29 20:10:35.640 381 1229 D AudioFlinger: mixer(0xb3e40000) throttle end: throttle time(4)\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-03-30T03:12:11.000+0000", "updated": "2016-03-30T03:12:11.000+0000" }, { "id": "381006", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~aislam] Issue seems to be this part of the code:-\r\n{code}\r\nfunction openWindow(e) {\r\n Alloy.createController(\"popup\",{\r\n gotoPageCallBack : moveToPage\r\n }).getView().open();\r\n}\r\n{code}\r\nWhen you call the \"moveToPage\" on callback, the error as above occurs. \r\n{code}\r\nfunction moveToPage(id){\r\n $.svMainView.scrollToView(id);\r\n}\r\n{code}\r\nThis occurs cause that method is being called when the other window is still present. Is that method necessary? ", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-03-30T05:41:54.000+0000", "updated": "2016-03-30T05:41:54.000+0000" }, { "id": "382454", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "It seems that the purpose is to scroll to view 0 once you go back to the scrollable view.\r\nHere's a work around that works:-\r\npopup.js\r\n{code}\r\nvar args = arguments[0] || {};\r\n\r\nfunction goBack(){\r\n\t\r\n\t$.popup.close();\r\n\t//args.gotoPageCallBack(0);\r\n}\r\n{code}\r\n\r\nindex.js\r\n{code}\r\nMap = require(\"ti.map\");\r\nvar moment = require('alloy/moment');\r\nfunction openWindow(e) {\r\n\tAlloy.createController(\"popup\",{\r\n\t\tgotoPageCallBack : moveToPage\r\n\t}).getView().open();\r\n}\r\n\r\nfor (var i = 0; i < 4; i++) {\r\n\tvar mountainView = Map.createAnnotation({\r\n\t\tlatitude : 22.572646,\r\n\t\tlongitude : 88.363895,\r\n\t\ttitle : \"Appcelerator Headquarters\",\r\n\t\tsubtitle : 'Mountain View, CA',\r\n\t\tpincolor : Map.ANNOTATION_RED,\r\n\t\tmyid : 1 // Custom property to uniquely identify this annotation.\r\n\t});\r\n\tvar mapview = Map.createView({\r\n\t\tmapType : Map.NORMAL_TYPE,\r\n\t\tregion : {\r\n\t\t\tlatitude : 22.572646,\r\n\t\t\tlongitude : 88.363895,\r\n\t\t\tlatitudeDelta : 0.9,\r\n\t\t\tlongitudeDelta : 0.9\r\n\t\t},\r\n\t\ttop : \"50\",\r\n\t\tanimate : true,\r\n\t\tregionFit : true,\r\n\t\tannotations : [mountainView]\r\n\t});\r\n\tvar mapContainer = Titanium.UI.createView({\r\n\t\twidth : \"80%\",\r\n\t\theight : Titanium.UI.FILL,\r\n\t\ttouchEnabled : false,\r\n\t\tbackgroundColor : \"#000000\"\r\n\t});\r\n\t\r\n\t\r\n\t\r\n\t//mapview.addEventListener(\"complete\",completed);\r\n\tmapContainer.add(mapview);\r\n\t$.svMainView.addView(mapContainer);\r\n\t\r\n}\r\n$.lPageNo.text = \"Current page is \" + $.svMainView.getCurrentPage();\r\n$.index.open();\r\n$.index.addEventListener('focus', function(e) {\r\n moveToPage(0);\r\n});\r\n\r\n// function completed(){\r\n// mapview.annotations = [mountainView];\r\n// }\r\n\r\n//alert(pickupDate);\r\nfunction onScrollend(){\r\n\t$.lPageNo.text = \"Current page is \" + $.svMainView.getCurrentPage(); \r\n}\r\nfunction moveToPage(id){\r\n\t$.svMainView.scrollToView(id);\r\n}\r\n{code}\r\n\r\nThe issue is scrollToView is being called while the popup window is closing in android and the scrollableview is coming back in view. Basically the sequence of things.\r\n\r\nThe workaround code that I've written puts a listener on the mainview to scroll to view 0 once it comes back to focus. \r\n\r\n[~aislam] and [~rmitro] is this workaround okay? Calling scrollToView from a callback in another window is not really advisable.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-12T08:28:56.000+0000", "updated": "2016-04-12T08:28:56.000+0000" }, { "id": "382571", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~msamah] For the second issue- if each view of the scrollable view has more views along with map view, then during the swiping to the left or right of the scrollable view also causes app crashes with the same error log. Please see the attached source code and error log. It is not happening all the time, but if you scroll left, right very quickly then it is happening. The Customer is using Samsung galaxy s6.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-13T07:07:13.000+0000", "updated": "2016-04-13T07:07:13.000+0000" }, { "id": "382668", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Thank you for the information. Will look into this.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-14T02:40:53.000+0000", "updated": "2016-04-14T02:40:53.000+0000" }, { "id": "382690", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~rmitro]\r\nWas able to reproduce the crash. Here's a fix for that\r\nIn the loadDetails.xml change line 31 to this:-\r\n``\r\n\r\nBasically to set ScrollableView to use a cache for the views with size 5. If they are going to use more views, the cacheSize should be equal or more to that. This should stop it from crashing.\r\n\r\nLet me know if it solves the issue. If everything is okay, I'll resolve this ticket.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-14T05:57:03.000+0000", "updated": "2016-04-14T06:36:11.000+0000" }, { "id": "383228", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I'll resolve this as it seems there's no more updates or issues.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-20T02:23:59.000+0000", "updated": "2016-04-20T02:23:59.000+0000" }, { "id": "384548", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~rmitro] Does running this on 5.2.2.GA cause any crash for you? It doesn't seem to be crashing on 5.2.2.GA. (I'm not using any cacheSize)", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-05-03T07:41:13.000+0000", "updated": "2016-05-03T07:41:13.000+0000" } ], "maxResults": 32, "total": 32, "startAt": 0 } } }