Note that there are some explanatory texts on larger screens.

plurals
  1. POApp is crashing after Home is pressed. Unable to pause - Derived class did not call super.onSaveInstanceState()
    text
    copied!<p>When I press the Home button, the app should be paused, save all state and work fine. Instead I get this error:</p> <blockquote> <p>java.lang.RuntimeException: Unable to pause activity {be.test.tester/be.test.tester.DataScreen}: java.lang.IllegalStateException: Derived class did not call super.onSaveInstanceState() at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3641) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3598) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3574) at android.app.ActivityThread.access$2500(ActivityThread.java:136) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2186) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:143) at android.app.ActivityThread.main(ActivityThread.java:5068) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method)</p> <p>Caused by: java.lang.IllegalStateException: Derived class did not call super.onSaveInstanceState() at android.view.View.dispatchSaveInstanceState(View.java:6087) at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:1207) at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:1207) at android.view.View.saveHierarchyState(View.java:6068) at com.android.internal.policy.impl.PhoneWindow.saveHierarchyState(PhoneWindow.java:1475) at android.app.Activity.onSaveInstanceState(Activity.java:1106) at android.app.Activity.performSaveInstanceState(Activity.java:1056) at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1289) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3623) ... 12 more</p> </blockquote> <p>My activity reacts on touch:</p> <pre><code>public class DataScreen extends Activity implements OnGestureListener{ </code></pre> <p>I'm getting some extra's from the intent:</p> <pre><code>totUsage = Integer.parseInt(getIntent().getStringExtra("extraTotUsage")); limit = Integer.parseInt(getIntent().getStringExtra("extraLimit")); Bundle bundle = getIntent().getExtras(); mylist = (ArrayList&lt;HashMap&lt;String, String&gt;&gt;) bundle.get("extraMyList"); </code></pre> <p>A custom view is showing data (canvas). When you scroll on screen, data changes in custom view (set, get method) and redraws itself.</p> <p>I don't really manage the onSaveInstanceState here, don't really know if I have to.</p> <p>My app is onTop of the stack, because of:</p> <pre><code>i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); </code></pre> <p>I don't understand the error.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload