{ "id": "135944", "key": "AC-1025", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-09-28T15:37:13.000+0000", "created": "2014-09-01T09:26:31.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:21.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "h2. Problem\r\nWhen loading the map just after the login process, the map crashes pretty often, producing the following error: \"Unfortunately, AppName has stopped\". This intermittent crash occurs while adding the map component to its parent's view.\r\nSome more information about the application:\r\n• There is only one \"heavy window\" in the application (only one activity at once). The map is loaded on a view. \r\n• The application window is fully loaded and displayed when loading the map component.\r\n• The parent view is already a part of the views' hierarchy when loading the map component.\r\n• There is only one map component in the application.\r\n\r\nh2. Test case\r\n{code:lang=javascript|title=app.js}\r\n// Pseudo code representing an attempt to delay the addition of the map the view hierarchy\r\n// If the map is put directly in the XML template, this leads to an immediate crash.\r\nvar win = Titanium.UI.createWindow({\r\n title:'Window',\r\n});\r\nwin.open();\r\n\r\nvar mapView = require('ti.map').createView({\r\n animate : false,\r\n regionFit : true,\r\n userLocation : true,\r\n mapType : Alloy.Globals.Map.NORMAL_TYPE\r\n});\r\n\r\nvar mapContainer = Titanium.UI.createView();\r\n\r\n// We now suspect that the crash could happen when we open new windows/activities during map initialization\r\nvar winWaiter = Titanium.UI.createWindow({\r\n title:'Please wait...',\r\n});\r\nwinWaiter.open();\r\n\r\n// Foo application process code\r\nsetTimeout(function() {\r\n winWaiter.close();\r\n}, 1500);\r\n\r\n// Intermittent crash when adding the view\r\nmapContainer.add(mapView);\r\n {code}\r\n\r\nh2. Logs\r\n\r\nLog of the crash when the fragments are not controlled properly:\r\n{code:lang=none|title=console}\r\njava.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\r\n at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1327)\r\n at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager:1338)\r\n at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)\r\n at android.support.v4.app.BackStackRecord.commit(BackStackRecord:574)\r\n at android.support.v4.app.DialogFragment.show(DialogFragment:127)\r\n {code}\r\n\r\nGeneral error log:\r\n{code:lang=none|title=console}\r\n[ERROR] : TiApplication: (main) [10692,10692] Sending event: exception\r\non thread: main msg:java.lang.RuntimeException: Unable to pause activity\r\n{com.ourapplication/org.appcelerator.titanium.TiTranslucentActivity}:\r\njava.lang.IllegalStateException: Can not perform this action after onSaveInstanceState; Titanium 3.2.3,2014/04/22 10:17,b958a70\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to pause activity \r\n{com.ourapplication/org.appcelerator.titanium.TiTranslucentActivity}:\r\njava.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3196)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3151)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3129)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.access$900(ActivityThread.java:159)\r\n[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1333)\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)\r\n[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:176)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5419)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:525)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)\r\n[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)\r\n[ERROR] : TiApplication: Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState\r\n[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1343)\r\n[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1361)\r\n[ERROR] : TiApplication: at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)\r\n[ERROR] : TiApplication: at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.view.TiUIFragment.(TiUIFragment.java:49)\r\n[ERROR] : TiApplication: at ti.map.TiUIMapView.(TiUIMapView.java:59)\r\n[ERROR] : TiApplication: at ti.map.ViewProxy.createView(ViewProxy.java:68)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:463)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:566)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:218)\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:389)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:374)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:252)\r\n[ERROR] : TiApplication: at org.appcelerato\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:186)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:763)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onPause(TiBaseActivity.java:975)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onPause(TiActivity.java:44)\r\n[ERROR] : TiApplication: at android.app.Activity.performPause(Activity.java:5474)\r\n[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1250)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3182)\r\n[ERROR] : TiApplication: ... 12 more\r\n {code}\r\n\r\nh2. Discussions\r\nhttp://developer.appcelerator.com/question/176956/map-crash-in-android-application#comment-217798\r\n\r\n", "attachment": [ { "id": "55176", "filename": "Bug.txt", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-29T19:29:15.000+0000", "size": 1163, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Map - application crash when adding the map component", "creator": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version: 3.3.0.GA, 3.2.3.GA\r\nPlatform & version: Android 4.2, 4.3, 4.4\r\nDevice Details: Samsung Galaxy S4 (GT-I9505), Galaxy Note2, Galaxy S3, Galaxy S3 Mini, Sony M2\r\nHost Operating System: Windows 7 Professional, OS X 10.9.4\r\nTitanium Studio version: 3.3.0.201407100905\r\n \r\n", "comment": { "comments": [ { "id": "328317", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any news regarding the issue?", "updateAuthor": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-16T13:57:09.000+0000", "updated": "2014-10-16T13:57:09.000+0000" }, { "id": "335564", "author": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "body": "*edit* I just answered my own question. It looks like the navigation drawer window I'm using has a bug that causes mapviews to crash the app in exactly the manner described above. See https://github.com/manumaticx/Ti.DrawerLayout/issues/4 ", "updateAuthor": { "name": "shodan_uk", "key": "shodan_uk", "displayName": "Terry Morgan", "active": true, "timeZone": "Europe/London" }, "created": "2014-12-09T11:58:41.000+0000", "updated": "2014-12-09T22:18:51.000+0000" }, { "id": "348681", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~Anna] is this still an issue, we can not replicate", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-04-06T23:35:40.000+0000", "updated": "2015-04-06T23:35:40.000+0000" }, { "id": "350231", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, it's still a big issue.", "updateAuthor": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-21T11:23:06.000+0000", "updated": "2015-04-21T11:23:06.000+0000" }, { "id": "350233", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Are there any particular configurations to add in the tiapp.xml for the map module?\r\nRight now, we have these configurations:\r\n \r\n", "updateAuthor": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-21T11:29:40.000+0000", "updated": "2015-04-21T11:29:40.000+0000" }, { "id": "350321", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~Anna] you must follow the docs, please check that you have your keys and everything configured correctly, here's the documentation:\r\n[Map Module| http://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map ]\r\n\r\n", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-04-21T22:36:45.000+0000", "updated": "2015-04-21T22:36:45.000+0000" }, { "id": "350978", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Radamantis, \r\nThe bug that I described in this issue is fixed in the version 4.0.0\r\nhttps://github.com/appcelerator/titanium_mobile/commit/3c79460d4c79473637902179d1524b41d4ea55b5\r\n\r\n\r\n", "updateAuthor": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-28T08:22:08.000+0000", "updated": "2015-04-28T08:22:08.000+0000" }, { "id": "351171", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please check the attached file. \r\nIt explains the issue and provides the test case.", "updateAuthor": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-29T19:30:31.000+0000", "updated": "2015-04-29T19:30:31.000+0000" }, { "id": "351181", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~Anna] if this has been fixed in 4.0.0 we are going to close it as fixed, are you positive that you can not reproduce anymore with 4.0.0?\r\n\r\nThanks", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-04-29T20:24:57.000+0000", "updated": "2015-04-29T20:24:57.000+0000" }, { "id": "351283", "author": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No, this issue cannot be closed since 4.0.0 GA is not released yet. Once it's available, I'll check it and tell you if it's OK.\r\nDo you know when 4.0.0 GA will be released? \r\n", "updateAuthor": { "name": "Anna", "key": "anna", "displayName": "Anna Tchevardov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-30T15:52:15.000+0000", "updated": "2015-04-30T15:52:15.000+0000" }, { "id": "361374", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe have tested this issue again and it works as expected.\r\nCheck map image: http://oi62.tinypic.com/2e33jwl.jpg\r\n\r\n*Result:* It's not a bug.\r\n\r\n*Steps to Test:*\r\n1. Create a classic project.\r\n2. Paste this code in app.js file.\r\n3. Add the map module and API key in tiapp.xml file.\r\n4. Run this code with the testing environment.\r\n\r\n*Testing Environment:*\r\nCommand-Line Interface, version 4.1.2,\r\nTi SDK: 4.1.0.GA,\r\nAndroid Version: 4.2.2, 4.4.2, 5.1.0,\r\nMap module: 2.3.1,\r\nStudio Version: 4.1.1\r\n\r\n{code:title=app.js}\r\nvar win = Titanium.UI.createWindow({\r\n\ttitle : 'Window',\r\n});\r\nwin.open();\r\n\r\nvar MapModule = require('ti.map');\r\n\r\nvar mapView = MapModule.createView({\r\n\tanimate : false,\r\n\tregionFit : true,\r\n\tuserLocation : true,\r\n\tmapType : MapModule.NORMAL_TYPE\r\n});\r\n\r\nvar mapContainer = Titanium.UI.createView();\r\n\r\n// We now suspect that the crash could happen when we open new windows/activities during map initialization\r\nvar winWaiter = Titanium.UI.createWindow({\r\n\ttitle : 'Please wait...',\r\n});\r\nwinWaiter.open();\r\n\r\n// Foo application process code\r\nsetTimeout(function() {\r\n\twinWaiter.close();\r\n}, 1500);\r\n\r\n// Intermittent crash when adding the view\r\nmapContainer.add(mapView);\r\nwin.add(mapContainer);\r\n\r\n{code}\r\n\r\n\r\nPlease let us know your test results if you notice the error existing.\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-27T06:42:52.000+0000", "updated": "2015-09-15T07:00:11.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }