Skip to content

Exception on app suspend/resume after navigation with long Slide transition #6510

Closed

Description

@manoldonev
  1. Create new app with root frame
  2. From default page navigate to a second page via button tap like this:
export function onTap(args) {
    const navigationEntry = {
        moduleName: "home/second-page",
        animated: true,
        transition: {
            name: "slide",
            duration: 5000,
            curve: "easeIn"
        }
    };

    args.object.page.frame.navigate(navigationEntry);
}
  1. Suspend the app
  2. Resume the app quickly (within 5 seconds so the "exit" transition is still playing) -- the "exit" slide animation is ongoing and crashes the app mid-way with the following exception:
An uncaught Exception occurred on "main" thread.
android.content.res.Resources$NotFoundException: Unable to find resource ID #0xfffffff6
	at android.content.res.ResourcesImpl.getResourceTypeName(ResourcesImpl.java:271)
	at android.content.res.Resources.getResourceTypeName(Resources.java:1986)
	at android.support.v4.app.FragmentManagerImpl.loadAnimation(FragmentManager.java:1172)
	at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1808)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
	at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:802)
	at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
	at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
	at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6669)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Most probably we should cancel/clear the animator if we detect app is going to suspend as we should not be seeing the "exit" transition on app resume.

Activity

  1. changed the title [-]Resources$NotFoundException on app suspend/resume after navigation with long Slide transition[/-] [+]Exception on app suspend/resume after navigation with long Slide transition[/+] on Nov 5, 2018
  2. Egor3f commented on Nov 30, 2018

    @Egor3f

    Here is another example of this bug, with shorter transition duration, but existing nested frames: https://github.com/NativeScript/android-runtime/issues/1218
    Error does not happen, if I just copy-paste https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/transition/slide-transition.android.ts class into my project and use transition: {instance: }}

  3. self-assigned this
    on Nov 30, 2018
  4. manoldonev commented on Dec 12, 2018

    @manoldonev
    ContributorAuthor

    @Egor3f the exception is the same but as far as I can tell this one and the one you logged are two separate issues. #6698 (nested fragments case) should be addressed with #6677 while this one is still open and under investigation.

  5. ghost removed on Dec 17, 2018
  6. lock commented on Dec 17, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked and limited conversation to collaborators on Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions