Repository navigation
App crashes with Resources$NotFoundException if page navigated after app minimize #6698
Description
Environment
- CLI: 5.0.2
- Cross-platform modules: 5.0.5
- Android Runtime: 5.0.0
- iOS Runtime (if applicable):
- Plugin(s): nativescript-vue
Describe the bug
It's a runtime bug. Application crashes with the following stacktrace:
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:274)
at android.content.res.Resources.getResourceTypeName(Resources.java:1991)
at android.support.v4.app.FragmentManagerImpl.loadAnimation(FragmentManager.java:1172)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1543)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at android.support.v4.app.FragmentManagerImpl.dispatchDestroyView(FragmentManager.java:3254)
at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2674)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1533)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
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:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:171)
at android.app.ActivityThread.main(ActivityThread.java:6622)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
To Reproduce
- Launch sample application ( https://github.com/Egor3f/NativeScriptVueBugReport )
- Move to the second page (inside nested frame) with Next button
- Minimize the application with "home" button
- Restore the application from recents menu
- Try to navigate to StartPage (in the topmost frame)
Expected behavior
Navigation to Start Page
Sample project
https://github.com/Egor3f/NativeScriptVueBugReport
Application consists of App.vue component with topmost frame, which has 2 pages: WelcomeScreen and StartPage
Inside WelcomeScreen there is another nested frame with some pages (in this sample project they are the same), and a button leading to StartPage
Additional context
Bug occurs only when I'm navigating to StartPage in topmost frame right after minimizing and restoring application.
If I press Start button right after first launch, everything is ok.
Tried literally everything found in another issues, no luck.
Sorry for my bad English
Activity
[-]App crashes with Resources$NotFoundException if page navigated afte app minimize[/-][+]App crashes with Resources$NotFoundException if page navigated after app minimize[/+]manoldonev commentedon Dec 12, 2018
@Egor3f we are planning to include #6677 in tns-core-modules@5.1.1 patch release before Christmas but the fix is already available in tns-core-modules@next so you can test it if necessary.
anuragd7 commentedon Dec 18, 2018
Hi @manoldonev . I was facing a similar error that was closed in favour of this one and a few others. I just tried updating to
tns-core-modules 5.2.0-next-2018-12-18-114934-01and running my android project. I am still getting the same error:Here is my package.json
I am running
tns 5.1on my mac. The project works fine on IOS. Let me know if you need more information.manoldonev commentedon Dec 20, 2018
@anuragd7 let's keep the discussion in one place -- I can see @NickIliev is working with you on this here: https://github.com/NativeScript/android-runtime/issues/1212#issuecomment-448993678.