-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Environment
- CLI: 5.1.0
- Cross-platform modules: 5.1.0
- Android Runtime: 5.1.0
Describe the bug
Error: java.lang.IllegalStateException: Failure saving state: active fragment1[1]<Page(10)@file:///app/players/players-items-page.xml:1:1;> has cleared index: -1
android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:2960)
android.support.v4.app.Fragment.performSaveInstanceState(Fragment.java:2628)
android.support.v4.app.FragmentManagerImpl.saveFragmentBasicState(FragmentManager.java:2910)
android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:2971)
android.support.v4.app.FragmentController.saveAllState(FragmentController.java:134)
android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:591)
android.support.v7.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:510)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
com.tns.Runtime.callJSMethod(Runtime.java:983)
After a specific set of navigation actions in a nested frame scenario with app suspend/resume.
To Reproduce
- Tap "Player Two" (nested frame navigation)
- Tap "navigate to some page" button (parent frame navigation)
- Go back via hardware button (parent frame back navigation)
- Go back via "arrow" button to the players list (nested frame back navigation)
- Tap "Player Two" again (nested frame navigation)
- Try to suspend the app -- app crashes with the exception above.
Sample project
https://play.nativescript.org/?template=play-tsc&id=BZfk8A NOTE: playground sample crashes with a different exception as it is not using the latest binaries -- use just the source files for reference!
Use the attached zip to debug: NSPlayground.zip