java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apsquared.navtest/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

Appcelerator JIRA | Manuel Lehner | 2 years ago
  1. 0

    The issue title may be a little general but I'm not able to be more specific because this happens whenever the parent view of the mapview is a Fragment. You can easily reproduce this bug with this test code: {code:javascript} Ti.UI.createAlertDialog({ androidView: require('ti.map').createView() }).show(); {code} App crashes with this: {code} [ERROR] : TiApplication (main) [712,712] Sending event: exception on thread: main msg:android.content.res.Resources$NotFoundException: Unable to find resource ID #0x3e8; Titanium 3.6.0,2014/12/11 14:51,7bde3b5 [ERROR] : TiApplication android.content.res.Resources$NotFoundException: Unable to find resource ID #0x3e8 [ERROR] : TiApplication at android.content.res.Resources.getResourceName(Resources.java:2026) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:939) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126) [ERROR] : TiApplication at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:454) [ERROR] : TiApplication at android.os.Handler.handleCallback(Handler.java:739) [ERROR] : TiApplication at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication at android.os.Looper.loop(Looper.java:135) [ERROR] : TiApplication at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] : TiApplication at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] : TiApplication at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code} This not just happening with AlertDialogs, I've seen this error since a while here: https://github.com/manumaticx/Ti.DrawerLayout/issues/4 I think the cause for this is somewhere in [TiUIFragment|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java] as the FragmentManager fails to resolve the containers resource id. I've tested this with several Titanium versions (3.3.0 to 3.6.0).

    Appcelerator JIRA | 2 years ago | Manuel Lehner
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apsquared.navtest/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
  2. 0

    [TIMOB-13864] Android: Maps v2 crashes inside a tab - Appcelerator JIRA

    appcelerator.org | 11 months ago
    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
  3. 0

    Crash report 2.9 - IllegalStateException in ReaderActivity.showListFragmentForTag

    GitHub | 3 years ago | maxme
    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting illegalstateexception while exiting from fragment containing map

    Stack Overflow | 2 years ago | Achuthan M
    java.lang.RuntimeException: Unable to destroy activity {com.igloo.marinaretail/com.igloo.marinaretail.UserMain}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
  6. 0

    FragmentTransaction working only in portrait mode

    Stack Overflow | 2 years ago | Gianluca
    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Can not perform this action after onSaveInstanceState

    at android.support.v4.app.FragmentManagerImpl.checkStateLoss()
  2. Android Support v4
    BackStackRecord.commit
    1. android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1354)
    2. android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1372)
    3. android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)
    4. android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)
    4 frames
  3. org.appcelerator.titanium
    TiUIFragment.<init>
    1. org.appcelerator.titanium.view.TiUIFragment.<init>(TiUIFragment.java:49)
    1 frame
  4. ti.map
    ViewProxy.createView
    1. ti.map.TiUIMapView.<init>(TiUIMapView.java:59)
    2. ti.map.ViewProxy.createView(ViewProxy.java:68)
    2 frames
  5. org.appcelerator.titanium
    TiViewProxy.getOrCreateView
    1. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:483)
    2. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469)
    3. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:507)
    4. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491)
    5. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469)
    5 frames
  6. dk.napp.drawer
    Drawer.processProperties
    1. dk.napp.drawer.Drawer.processProperties(Drawer.java:317)
    1 frame
  7. org.appcelerator.kroll
    KrollProxy.setModelListener
    1. org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1185)
    1 frame
  8. dk.napp.drawer
    DrawerProxy.windowCreated
    1. dk.napp.drawer.DrawerProxy.windowCreated(DrawerProxy.java:145)
    1 frame
  9. org.appcelerator.titanium
    TiActivity.onCreate
    1. org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32)
    2. org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:442)
    3. org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:524)
    4. org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
    4 frames
  10. Android Platform
    ActivityThread.main
    1. android.app.Activity.performCreate(Activity.java:5451)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2359)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2453)
    5. android.app.ActivityThread.access$900(ActivityThread.java:173)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
    7. android.os.Handler.dispatchMessage(Handler.java:102)
    8. android.os.Looper.loop(Looper.java:136)
    9. android.app.ActivityThread.main(ActivityThread.java:5579)
    9 frames
  11. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  12. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
    2 frames
  13. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame