{ "id": "134179", "key": "AC-1178", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-09-03T18:28:38.000+0000", "created": "2014-08-05T11:41:47.000+0000", "labels": [ "TCSupportTriage", "android", "appcompat", "crashes", "defect", "sdk3.3", "triageSupport" ], "versions": [], "issuelinks": [ { "id": "40854", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "130615", "key": "TIMOB-17016", "fields": { "summary": "Android: Closing Window and returning to TabGroup crashes app with \"Unable to instantiate fragment\"", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "updated": "2016-03-08T07:37:33.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "It looks like this behavior appears only in the 3.3.0 version of the titanium SDK.\r\n\r\nWhen the app running in the background, auto killed by the device to free up memory for other apps, is brought back to the foreground, the app hang up and freezes for 2-6 seconds(depending on the device specs and performances, the better the device, the shorter the freeze), pops-up an alert dialog box \"Unfortunately, APP_NAME has stopped\", crashes, and then it only starts up.\r\n\r\nHOW TO REPRODUCE :-\r\nRun the kitchen sink project/any hello world program (appcompat theme) and put the app to the background .\r\nOpen up a browser and navigates to some huge websites loaded with big images and such, so as to make the system force kill our titanium app.\r\nWhen it has been finally killed, try to bring back the same app to the foreground.\r\n\r\nEXPECTED BEHAVIOR -\r\nThe app should starts up again normally and there should not be a freeze/alert dialog box popping up/crash.\r\n\r\n\r\nHere is the crash report\r\n[code]\r\njava.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.id/org.appcelerator.titanium.TiActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public\r\nat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)\r\nat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)\r\nat android.app.ActivityThread.access$800(ActivityThread.java:135)\r\nat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)\r\nat android.os.Handler.dispatchMessage(Handler.java:102)\r\nat android.os.Looper.loop(Looper.java:136)\r\nat android.app.ActivityThread.main(ActivityThread.java:5001)\r\nat java.lang.reflect.Method.invokeNative(Native Method)\r\nat java.lang.reflect.Method.invoke(Method.java:515)\r\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)\r\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)\r\nat dalvik.system.NativeStart.main(Native Method)\r\nCaused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public\r\nat android.support.v4.app.Fragment.instantiate(Fragment.java:413)\r\nat android.support.v4.app.FragmentState.instantiate(Fragment.java:97)\r\nat android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1801)\r\nat android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:213)\r\nat android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:97)\r\nat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:473)\r\nat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)\r\nat android.app.Activity.performCreate(Activity.java:5231)\r\nat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)\r\nat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)\r\n... 11 more\r\nCaused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor\r\nat java.lang.Class.newInstanceImpl(Native Method)\r\nat java.lang.Class.newInstance(Class.java:1208)\r\nat android.support.v4.app.Fragment.instantiate(Fragment.java:402)\r\n... 20 more\r\n[/code]\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: App crashes and doesn't starts up normally after been terminated by the device ", "creator": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.3.0\r\nTitanium studio version 3.3.0\r\nCli version 3.3.0\r\nPlatform android\r\nOS: Macintosh Intel Mac OS X 10_9_4", "comment": { "comments": [ { "id": "317227", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "can't reproduce. ", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-08-06T05:55:55.000+0000", "updated": "2014-08-06T05:55:55.000+0000" }, { "id": "317931", "author": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Shuo Liang,\r\nI dont know why you are closing the issues as irreproducible. In case if you missed anything, here is the exact steps that you need to follow to reproduce it -\r\n\r\n1. Create a classic (not alloy) default titanium mobile app project (Tabbed app) or if you have trouble with it, here's the app.js file that you can straightway copy-paste\r\n\r\n{code}\r\n\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\n\r\n//\r\n// create base UI tab and root window\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 label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin1.add(label1);\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n{code}\r\n\r\n2. Modify the android tag in your manifest files to something like this\r\n\r\n{code}\r\n \r\n armeabi-v7a,x86\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n3. Now install the created app to a real device and run it.\r\n4. Put the titanium app to background.\r\n5. Opens up and run as many applications from the phone or go to a really big website and starts browsing and try to force kill our titanium app .\r\n6. When the titanium app is finally killed by the device, try to bring back the titanium app from the background.\r\n\r\nTHE APP FREEZES with just nothing but an empty TABGROUP and hangs forever!", "updateAuthor": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-11T09:43:55.000+0000", "updated": "2014-08-11T09:43:55.000+0000" }, { "id": "318112", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey I encountered the same crash report, after submitting my app to Play Store with SDK 3.3.0. Here is my report. Basically the same:\r\n\r\njava.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.id/org.appcelerator.titanium.TiActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public\r\nat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)\r\nat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2146)\r\nat android.app.ActivityThread.access$700(ActivityThread.java:140)\r\nat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)\r\nat android.os.Handler.dispatchMessage(Handler.java:99)\r\nat android.os.Looper.loop(Looper.java:137)\r\nat android.app.ActivityThread.main(ActivityThread.java:4947)\r\nat java.lang.reflect.Method.invokeNative(Native Method)\r\nat java.lang.reflect.Method.invoke(Method.java:511)\r\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)\r\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)\r\nat dalvik.system.NativeStart.main(Native Method)\r\nCaused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public\r\nat android.support.v4.app.Fragment.instantiate(Fragment.java:413)\r\nat android.support.v4.app.FragmentState.instantiate(Fragment.java:97)\r\nat android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1801)\r\nat android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:213)\r\nat android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:97)\r\nat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:473)\r\nat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)\r\nat android.app.Activity.performCreate(Activity.java:5207)\r\nat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)\r\nat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2085)\r\n... 11 more\r\nCaused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor\r\nat java.lang.Class.newInstanceImpl(Native Method)\r\nat java.lang.Class.newInstance(Class.java:1319)\r\nat android.support.v4.app.Fragment.instantiate(Fragment.java:402)\r\n... 20 more\r\n", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-12T00:48:31.000+0000", "updated": "2014-08-12T00:48:31.000+0000" }, { "id": "318113", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "[~mpmiranda], Any idea about this situation? we can't reproduce, but customers keeps saying the problem existing.", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-08-12T00:52:21.000+0000", "updated": "2014-08-12T00:52:21.000+0000" }, { "id": "318116", "author": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Our is kind of popular in the playstore and we are receiving more than 70-90 crashes and ANR report per day.\r\nAnd we have to continuously keep reminding the users to not background the app during the session of usage , which overall create a horrible bad user experience!\r\n\r\nThe crash is producible only in a real device and not on emulator as it seems like emulator never terminates a backgrounded app due to memory exhaustion!\r\n\r\nConfirmed and tested on nexus 5 and samsung phones!", "updateAuthor": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-12T01:07:33.000+0000", "updated": "2014-08-12T01:07:33.000+0000" }, { "id": "318117", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I didn't get such crash report before SDK 3.3.0. That's the thing.\r\n\r\nWhat do you mean \"not to background the app during the session of usage?\" Is that something I can control as an developer?\r\n\r\nThanks!", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-12T01:14:13.000+0000", "updated": "2014-08-12T01:14:13.000+0000" }, { "id": "318119", "author": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't think you can control over that!\r\nIf your app is in the background, the device can kills it anytime when it starts to run low on memory.\r\n\r\nIf the App is normally exited via back button, no such crash is produced! But however if the app is auto killed first by the device, then the app will first splash a white screen, crash it, prompts up an alert dialog box about the crash, and will only starts up again!\r\n\r\nI'm not sure which causes the crAsh - sdk 3.3.0 or studio 3.3.0 or cli 3.3.0 but one thing that I'm so sure of it is - THIS CRASH STARTS TO APPEARS ONLY AFTER I UPGRADE TO ALL THESE THREE!", "updateAuthor": { "name": "spaceman12", "key": "spaceman12", "displayName": "Lee phela", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-12T01:39:00.000+0000", "updated": "2014-08-12T01:39:00.000+0000" }, { "id": "318224", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've placed this into triage.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-12T16:54:11.000+0000", "updated": "2014-08-12T16:54:11.000+0000" }, { "id": "320206", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hpham] to mark as a duplicate of a related issue.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-25T21:23:00.000+0000", "updated": "2014-08-25T21:23:00.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }