❔ UWP NavigationCacheMode enable cause app to crash

Our team is currently developing a Proof of Concept (PoC) application that requires the use of NavigationCacheMode.Enabled. This is to maintain the scroll position of the list from the previous page and for connected animation purposes. However, we are encountering an issue where the application crashes upon navigation, returning the following exception message:
Link repository: https://github.com/Strypper/Petaverse
Branch: master

Page that crash: FosterCenterPage.xaml
Steps to reproduce
  1. Navigate to any of the FosterCenter in the Home page
  2. Inside foster center page select a member
  3. When successfully navigated to the member page please press the back button to navigate back to the foster center page
  4. Application navigate back to foster page and then crash with the below Exception and stack trace

    Exception

    ```bash
    One or more errors occurred. (The object has been closed.
The given object has already been closed / disposed and may no longer be used.)
### Stack trace
bash
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
at Microsoft.Toolkit.Uwp.UI.Animations.AnimationSet.StartAsync(UIElement element)
at Microsoft.Toolkit.Uwp.UI.Animations.AnimationSet.<Start>d__16.MoveNext()
at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()
```
GitHub
A desktop app of Petaverse service, a social media for pet owners. - GitHub - Strypper/Petaverse: A desktop app of Petaverse service, a social media for pet owners.
Was this page helpful?