{ "id": "154557", "key": "TIMOB-20332", "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": "19988", "description": "", "name": "Release 7.0.1", "archived": false, "released": true, "releaseDate": "2017-12-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-12-15T16:45:31.000+0000", "created": "2016-01-28T12:51:29.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "andoid", "ti.map" ], "versions": [], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2017-12-19T18:52:14.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": "Attempting to close a Ti.UI.TabGroup when it contains a ti.map map view in one of it's tabs causes the app crash. \r\n\r\nTest case:\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({\r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar Map = require('ti.map');\r\nvar mapview = Map.createView();\r\n\r\nwin1.add(mapview);\r\ntabGroup.addTab(tab1);\r\ntabGroup.open();\r\n\r\n// Close the tabGroup after 8 seconds\r\nsetTimeout(function(){\r\n console.log(\"Closing tabGroup\");\r\n tabGroup.close();\r\n}, 8000);\r\n{code}\r\n\r\nStack trace:\r\n\r\n{panel}\r\n[ERROR] TiApplication: (main) [8315,8315] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference; Titanium 5.1.2,2015/12/16 19:00,ca822b2\r\n[ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference\r\n[ERROR] TiApplication: \tat android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261)\r\n[ERROR] TiApplication: \tat android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168)\r\n[ERROR] TiApplication: \tat android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)\r\n[ERROR] TiApplication: \tat android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)\r\n[ERROR] TiApplication: \tat android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)\r\n[ERROR] TiApplication: \tat android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)\r\n[ERROR] TiApplication: \tat android.os.Handler.handleCallback(Handler.java:739)\r\n[ERROR] TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR] TiApplication: \tat android.os.Looper.loop(Looper.java:145)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5832)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invoke(Method.java:372)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\n[ERROR] AndroidRuntime: FATAL EXCEPTION: main\r\n[ERROR] AndroidRuntime: Process: com.thevirtualforge.tabtest2, PID: 6616\r\n[ERROR] AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.set(int, java.lang.Object)' on a null object reference\r\n[ERROR] AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1261)\r\n[ERROR] AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1168)\r\n[ERROR] AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)\r\n[ERROR] AndroidRuntime: \tat android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)\r\n[ERROR] AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)\r\n[ERROR] AndroidRuntime: \tat android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)\r\n[ERROR] AndroidRuntime: \tat android.os.Handler.handleCallback(Handler.java:739)\r\n[ERROR] AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR] AndroidRuntime: \tat android.os.Looper.loop(Looper.java:145)\r\n[ERROR] AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:5832)\r\n[ERROR] AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] AndroidRuntime: \tat java.lang.reflect.Method.invoke(Method.java:372)\r\n[ERROR] AndroidRuntime: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n[ERROR] AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\n{panel}", "attachment": [], "flagged": false, "summary": "Closing a Ti.UI.TabGroup that contains a ti.map view crashes the app on Android", "creator": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "environment": "Android 5.0, 5.1 & 6\r\nSamsung S5\r\nNexus 5X\r\nTi SDK 5.1.0.GA + 5.1.2.GA", "comment": { "comments": [ { "id": "375556", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello \r\n\r\nWe tested this issue using provided test code but couldn't reproduce it. App runs as expected in our environment.\r\n\r\n*Testing Environment:*\r\nAppcelerator Studio, build: 4.4.0.201511241829\r\nAppcelerator Command-Line Interface, version 5.1.0\r\nTitanium Command-Line Interface, CLI version 5.0.5, \r\nTitanium SDK version : 5.1.0GA, 5.1.2 GA\r\nDevice : Nexus 7(android version: 6)\r\n\r\n*Test code*: Provided by the reporter\r\n\r\n*Test output*:\r\n{code}\r\n[INFO] : Project built successfully in 1m 31s 134ms\r\n-- Start application log -----------------------------------------------------\r\n[INFO] : TiApplication: (main) [0,0] checkpoint, app created.\r\n[INFO] : TiApplication: (main) [91,91] Titanium 5.1.2 (2015/12/16 19:00 ca822b2)\r\n[WARN] : TiVerify: (Timer-0) [5004,5004] Verifying module licenses...\r\n[INFO] : TiVerify: (Timer-0) [978,5982] Succesfully verified module licenses\r\n[INFO] : APSAnalyticsService: Analytics Service Started\r\n{code}\r\n\r\nThanks\r\n", "updateAuthor": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-01-31T08:16:04.000+0000", "updated": "2016-02-02T05:37:12.000+0000" }, { "id": "375705", "author": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "body": "We can reproduce this consistently across two different developer's environments.\r\n\r\nPlease can you confirm what version of ti.map you're using in your test?", "updateAuthor": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-02T07:59:30.000+0000", "updated": "2016-02-02T07:59:30.000+0000" }, { "id": "375710", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nI am using ti.map version 2.3.4.\r\n\r\nThanks.", "updateAuthor": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-02-02T08:35:36.000+0000", "updated": "2016-02-02T08:36:18.000+0000" }, { "id": "375712", "author": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "body": "Thanks, can you also confirm the following please:\r\n\r\n1/ You saw the map open correctly. This issue is specific to maps in tabGroups. The map must display to trigger the crash.\r\n2/ You waited 8 seconds and saw the tabGroup close normally.", "updateAuthor": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-02T08:44:47.000+0000", "updated": "2016-02-02T08:44:47.000+0000" }, { "id": "375718", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello\r\n\r\nYes, map opens correctly. After 8 seconds tabGroup closes and on device it shows \"Unfortunately, app has stopped\" message. If we click on ok button of the message then it doesn't show any error on the console log.\r\n\r\nThanks.", "updateAuthor": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-02-02T09:43:48.000+0000", "updated": "2016-02-02T09:43:48.000+0000" }, { "id": "375719", "author": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "body": "\r\n{quote}on device it shows \"Unfortunately, app has stopped\" message{quote}\r\n\r\nSo, the app IS crashing? You're just not seeing the stack trace, correct?\r\n", "updateAuthor": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-02T09:45:52.000+0000", "updated": "2016-02-02T09:46:23.000+0000" }, { "id": "375720", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Can you share your tiapp.xml? Make sure you have made all the necessary changes in the tiapp.xml file like adding the API key for the map because stack trace doesn't show any crash log on my side.\r\nUseful link: http://docs.appcelerator.com/platform/latest/#!/api/Modules.Map\r\nOr, you can share your full project in a github link so that we can look into this issue.\r\n\r\nThanks.", "updateAuthor": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-02-02T10:18:52.000+0000", "updated": "2016-02-02T10:18:52.000+0000" }, { "id": "375721", "author": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "body": "The stack trace not appearing is irrelevant really. That's just a symptom the crash which you have reproduced, as indicated by the \"Unfortunately, the app has stopped\" message you are seeing.\r\n\r\nHere's my tiapp.xml, as requested. You'll need to add your own Google Maps api key in place of xxxxxxx:\r\n\r\n{code}\r\n\r\n\r\n\tmyappid.tabtest2\r\n\ttabTest2\r\n\t1.0\r\n\tnot specified\r\n\t\r\n\t\r\n\tnot specified\r\n\tappicon.png\r\n\tfalse\r\n\tfalse\r\n\ttrue\r\n\t741e5d6a-703a-40e6-9dc9-27cd2a1a1390\r\n\tdp\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tUISupportedInterfaceOrientations~iphone\r\n\t\t\t\t\r\n\t\t\t\t\tUIInterfaceOrientationPortrait\r\n\t\t\t\t\r\n\t\t\t\tUISupportedInterfaceOrientations~ipad\r\n\t\t\t\t\r\n\t\t\t\t\tUIInterfaceOrientationPortrait\r\n\t\t\t\t\tUIInterfaceOrientationPortraitUpsideDown\r\n\t\t\t\t\tUIInterfaceOrientationLandscapeLeft\r\n\t\t\t\t\tUIInterfaceOrientationLandscapeRight\r\n\t\t\t\t\r\n\t\t\t\tUIRequiresPersistentWiFi\r\n\t\t\t\t\r\n\t\t\t\tUIPrerenderedIcon\r\n\t\t\t\t\r\n\t\t\t\tUIStatusBarHidden\r\n\t\t\t\t\r\n\t\t\t\tUIStatusBarStyle\r\n\t\t\t\tUIStatusBarStyleDefault\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n \r\n \r\n \r\n \r\n \r\n \r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\ttrue\r\n\t\t\ttrue\r\n\t\t\r\n\t\tdefault\r\n\t\r\n\t\r\n ti.map\r\n\t\r\n\t\r\n\t\ttrue\r\n\t\tfalse\r\n\t\tfalse\r\n\t\tfalse\r\n\t\tfalse\r\n\t\r\n\t5.1.2.GA\r\n\r\n{code}", "updateAuthor": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-02T10:31:37.000+0000", "updated": "2016-02-02T10:31:37.000+0000" }, { "id": "381427", "author": { "name": "l0wb1rd", "key": "l0wb1rd", "displayName": "Low Bird", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can confirm this bug. For me, it only happens if you close the tabgroup via \"tabGroup.close();\". It does not crash if you use the android backbutton to close the tabgroup.\r\n\r\nSo a workaround for me is to write\r\n\r\n{code:javascript}\r\ntabGroup.activity.finish();\r\n{code}\r\n\r\ninstead of\r\n\r\n{code:javascript}\r\ntabGroup.close()\r\n{code}", "updateAuthor": { "name": "l0wb1rd", "key": "l0wb1rd", "displayName": "Low Bird", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-04T08:41:04.000+0000", "updated": "2016-04-04T08:41:04.000+0000" }, { "id": "409470", "author": { "name": "appsol", "key": "appsol", "displayName": "Muhammad Qasim", "active": true, "timeZone": "Asia/Karachi" }, "body": "For me this even happens if I remove the map view like this:\r\n{noformat}\r\nvar mapWrapper = Ti.UI.createView();\r\nvar mapView = mapModule.createView({\r\n\tanimate: true\r\n});\r\nmapWrapper.add(mapView);\r\n$.showMapView = function(){\r\n\tself.add(mapWrapper);\r\n};\r\n\r\n$.hideMapView = function(){\r\n\tself.remove(mapWrapper);\r\n};\r\n{noformat}\r\nThe app crashes as soon as the remove method is executed. Has anybody tried this way?", "updateAuthor": { "name": "appsol", "key": "appsol", "displayName": "Muhammad Qasim", "active": true, "timeZone": "Asia/Karachi" }, "created": "2017-03-07T06:52:09.000+0000", "updated": "2017-03-07T06:55:53.000+0000" }, { "id": "429031", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This should be fixed since a while, can someone confirm with Ti.Map Android 3.3.x (e.g. 3.3.2)?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-12T16:40:09.000+0000", "updated": "2017-10-12T16:40:09.000+0000" }, { "id": "431101", "author": { "name": "gfigueras", "key": "gfigueras", "displayName": "Guillermo Figueras", "active": true, "timeZone": "Europe/Madrid" }, "body": "No news on this?", "updateAuthor": { "name": "gfigueras", "key": "gfigueras", "displayName": "Guillermo Figueras", "active": true, "timeZone": "Europe/Madrid" }, "created": "2017-11-21T09:19:12.000+0000", "updated": "2017-11-21T09:19:12.000+0000" }, { "id": "431103", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I did not receive any response lately, especially after using latest Ti.Map. If you still see this issue, we can schedule it.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-21T10:45:12.000+0000", "updated": "2017-11-21T10:45:12.000+0000" }, { "id": "431301", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9628", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2017-11-27T14:39:39.000+0000", "updated": "2017-11-27T14:39:39.000+0000" }, { "id": "431990", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for master.\r\nWaiting for merge to get enabled.\r\n\r\n[~ybanev], please provide a backport for this ticket.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-11T23:09:10.000+0000", "updated": "2017-12-11T23:09:10.000+0000" }, { "id": "432022", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "7_0_X: https://github.com/appcelerator/titanium_mobile/pull/9678", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2017-12-12T10:14:28.000+0000", "updated": "2017-12-12T10:14:28.000+0000" }, { "id": "432045", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for backport, waiting for CR & merge to get enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-12T19:38:13.000+0000", "updated": "2017-12-12T19:38:13.000+0000" }, { "id": "432300", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Master & backport PR merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-18T18:09:50.000+0000", "updated": "2017-12-18T18:09:50.000+0000" }, { "id": "432412", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 7.0.1.v20171218104141 & 7.1.0.v20171218101353.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.0.0.201712081732\r\nSDK Ver: 7.0.1.v20171218104141, 7.1.0.v20171218101353\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.11\r\nAppc CLI: 7.0.1-master.5\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.10\r\nNode Ver: 8.9.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Pixel --- Android 7.1.1\r\n ⇨ google Nexus 5 --- Android 6.0.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-19T18:52:06.000+0000", "updated": "2017-12-19T18:52:06.000+0000" } ], "maxResults": 21, "total": 21, "startAt": 0 } } }