Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-1178

Android: App crashes and doesn't starts up normally after been terminated by the device

    Details

      Description

      It looks like this behavior appears only in the 3.3.0 version of the titanium SDK.

      When 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.

      HOW TO REPRODUCE :-
      Run the kitchen sink project/any hello world program (appcompat theme) and put the app to the background .
      Open 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.
      When it has been finally killed, try to bring back the same app to the foreground.

      EXPECTED BEHAVIOR -
      The app should starts up again normally and there should not be a freeze/alert dialog box popping up/crash.

      Here is the crash report
      [code]
      java.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
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
      at android.app.ActivityThread.access$800(ActivityThread.java:135)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:136)
      at android.app.ActivityThread.main(ActivityThread.java:5001)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:515)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
      at dalvik.system.NativeStart.main(Native Method)
      Caused 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
      at android.support.v4.app.Fragment.instantiate(Fragment.java:413)
      at android.support.v4.app.FragmentState.instantiate(Fragment.java:97)
      at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1801)
      at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:213)
      at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:97)
      at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:473)
      at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
      at android.app.Activity.performCreate(Activity.java:5231)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
      ... 11 more
      Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor
      at java.lang.Class.newInstanceImpl(Native Method)
      at java.lang.Class.newInstance(Class.java:1208)
      at android.support.v4.app.Fragment.instantiate(Fragment.java:402)
      ... 20 more
      [/code]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rtlechuga Radamantis Torres-Lechuga (Inactive)
                Reporter:
                spaceman12 Lee phela
              • Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code