Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-7293

Android: App Freeze after being too much time in the background

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: High High
    • Resolution: Duplicate
    • Affects Version/s: Release 1.7.5, Release 1.8.0.1
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Environment:

      Studio 1.0.7.201112281340,
      Mobile SDK 1.8.0.1,
      deploying on Android 4.0/4.0.3
      Also tried latest builds/Android 2.2.3 and older builds (1.7.6).

      Description

      PROBLEM DESCRIPTION

      blank (black in my case) screen after being to long in the background. App then freezes and the generated report says:

      ANR keyDispatchingTimedOut in TiTabActivity
      Freeze
      Activity appname.android.app/ti.modules.titanium.ui.TiTabActivity
      Cause ANR keyDispatchingTimedOut
      

      MORE INFO

      Customer tried this, without any success:

      <android xmlns:android="http://schemas.android.com/apk/res/android">
              <tool-api-level>8</tool-api-level>
              <manifest android:installLocation="auto" android:versionCode="2" android:versionName="1.1">
                  <uses-sdk android:minSdkVersion="7" />
                  <supports-screens android:anyDensity="true"
                      android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>
                  <application>
                      <activity android:alwaysRetainTaskState="true"
                          android:configChanges="keyboardHidden|orientation"
                          android:label="Applabel"
                          android:name=".ApplabelActivity" android:theme="@style/Theme.Titanium">
                          <intent-filter>
                              <action android:name="android.intent.action.MAIN"/>
                              <category android:name="android.intent.category.LAUNCHER"/>
                          </intent-filter>
                      </activity>
                  </application>
              </manifest>
          </android>
      
      1. stacktrace.txt
        6 kB
        Mauro Parra-Miranda

        Issue Links

          Activity

          Hide
          Miles Lyon added a comment -

          Similar issue here and I'd like to just upgrade to 1.8.2 if possible, but via Titanium I could only update to 2.0.1GA2. Unfortunately this introduced some new bugs and issues into my app. How do I get the 1.8.2 or 1.8.3 version specifically so I can address this bug with less impact to my app?

          Show
          Miles Lyon added a comment - Similar issue here and I'd like to just upgrade to 1.8.2 if possible, but via Titanium I could only update to 2.0.1GA2. Unfortunately this introduced some new bugs and issues into my app. How do I get the 1.8.2 or 1.8.3 version specifically so I can address this bug with less impact to my app?
          Hide
          Miles Lyon added a comment -

          Actually another follow up question as well. If I update to 1.8.2/3 can I leave my app 'as is' or do I still specifically need to add changes to tiapp.xml as listed above? Like is the behavior corrected regardless in 1.8.2 and 2.0.1GA2 or just corrected so that the tiapp.xml changes will now work?

          Show
          Miles Lyon added a comment - Actually another follow up question as well. If I update to 1.8.2/3 can I leave my app 'as is' or do I still specifically need to add changes to tiapp.xml as listed above? Like is the behavior corrected regardless in 1.8.2 and 2.0.1GA2 or just corrected so that the tiapp.xml changes will now work?
          Hide
          Miles Lyon added a comment -

          Can I get a response on how to get v1.8.2 of the SDK?

          Show
          Miles Lyon added a comment - Can I get a response on how to get v1.8.2 of the SDK?
          Hide
          Neeraj Gupta added a comment -

          Please use the steps described here and specify the SDK that you want to use:
          http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Installing_Titanium_SDK_Continuous_Builds

          Show
          Neeraj Gupta added a comment - Please use the steps described here and specify the SDK that you want to use: http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Installing_Titanium_SDK_Continuous_Builds
          Hide
          Paul Hamilton added a comment - - edited

          I wouldn't say this bug was 'fixed'. Bug still exists. The problem is less and the workaround imposed is... interesting. Certainly better then before and i applaud the effort. App goes from being unreleasable to 'i can live with it if i MUST'. I've seen many sweeping changes to Appecelerator and many of the breaking bugs i've encountered have been fixed in a timely manner, within an update or so.

          Calling this fixed though is a bit of a stretch, although the damage is certainly mitigated. On Android the app still times out and goes to a blank screen. However, when starting back up Titanium seemingly detects this state and closes the app. The user must then manually open the application a 2nd time.

          This is just terrible user experience, which i know Appcelerator prides itself on. Calling this resolved and not working on it further would be a mistake.

          Thoughts: Either prevent this state from occuring in the first place or perhaps just have app.js run again if this state is detected? This would occur rather then closing the app. Apps in memory are freed after a period of time and it would not be unreasonable and/or expected to have to start from the beginning after being away from the application for a long period of time.

          Show
          Paul Hamilton added a comment - - edited I wouldn't say this bug was 'fixed'. Bug still exists. The problem is less and the workaround imposed is... interesting. Certainly better then before and i applaud the effort. App goes from being unreleasable to 'i can live with it if i MUST'. I've seen many sweeping changes to Appecelerator and many of the breaking bugs i've encountered have been fixed in a timely manner, within an update or so. Calling this fixed though is a bit of a stretch, although the damage is certainly mitigated. On Android the app still times out and goes to a blank screen. However, when starting back up Titanium seemingly detects this state and closes the app. The user must then manually open the application a 2nd time. This is just terrible user experience, which i know Appcelerator prides itself on. Calling this resolved and not working on it further would be a mistake. Thoughts: Either prevent this state from occuring in the first place or perhaps just have app.js run again if this state is detected? This would occur rather then closing the app. Apps in memory are freed after a period of time and it would not be unreasonable and/or expected to have to start from the beginning after being away from the application for a long period of time.

            People

            • Assignee:
              Bill Dawson
              Reporter:
              Mauro Parra-Miranda
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development