Skip to content

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

@manoldonev

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions